10 unstable releases (3 breaking)

0.4.3 May 13, 2023
0.4.1 Dec 1, 2022
0.4.0 Oct 28, 2022
0.2.3 Mar 12, 2022
0.2.0 Jan 22, 2019

#28 in Operating systems

Download history 210206/week @ 2023-12-11 192040/week @ 2023-12-18 109951/week @ 2023-12-25 175766/week @ 2024-01-01 208750/week @ 2024-01-08 222802/week @ 2024-01-15 244758/week @ 2024-01-22 242626/week @ 2024-01-29 238127/week @ 2024-02-05 240619/week @ 2024-02-12 228766/week @ 2024-02-19 244190/week @ 2024-02-26 238519/week @ 2024-03-04 232384/week @ 2024-03-11 244821/week @ 2024-03-18 228630/week @ 2024-03-25

957,467 downloads per month
Used in 1,600 crates (100 directly)

Apache-2.0

10KB
97 lines

gethostname.rs

Current release Documentation

gethostname() for all platforms.

use gethostname::gethostname;

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

License

Copyright 2019–2023 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

~0–6MB