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 333488/week @ 2024-10-23 325049/week @ 2024-10-30 334789/week @ 2024-11-06 369900/week @ 2024-11-13 326569/week @ 2024-11-20 304380/week @ 2024-11-27 357060/week @ 2024-12-04 345400/week @ 2024-12-11 243036/week @ 2024-12-18 145894/week @ 2024-12-25 232217/week @ 2025-01-01 373823/week @ 2025-01-08 373683/week @ 2025-01-15 357319/week @ 2025-01-22 386478/week @ 2025-01-29 358714/week @ 2025-02-05

1,548,906 downloads per month
Used in 2,272 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
~113K SLoC