12 releases (1 stable)

1.0.0 Feb 1, 2025
0.5.0 Jul 6, 2024
0.4.3 May 13, 2023
0.4.1 Dec 1, 2022
0.2.0 Jan 22, 2019

#35 in Operating systems

Download history 324360/week @ 2024-10-25 333932/week @ 2024-11-01 342931/week @ 2024-11-08 363771/week @ 2024-11-15 297058/week @ 2024-11-22 341873/week @ 2024-11-29 349418/week @ 2024-12-06 332184/week @ 2024-12-13 159671/week @ 2024-12-20 165296/week @ 2024-12-27 305660/week @ 2025-01-03 404962/week @ 2025-01-10 346228/week @ 2025-01-17 367735/week @ 2025-01-24 401619/week @ 2025-01-31 551622/week @ 2025-02-07

1,751,562 downloads per month
Used in 2,274 crates (118 directly)

Apache-2.0

11KB
85 lines

gethostname.rs

Current release Documentation

gethostname() for all platforms.

use gethostname::gethostname;

println!("Hostname: {:?}", gethostname());

This crate is stable and will not see many changes.

License

Copyright Sebastian Wiesner sebastian@swsnr.de

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependencies

~1.5–9.5MB
~114K SLoC