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 203730/week @ 2024-01-03 200733/week @ 2024-01-10 246158/week @ 2024-01-17 240536/week @ 2024-01-24 238093/week @ 2024-01-31 244179/week @ 2024-02-07 234337/week @ 2024-02-14 235870/week @ 2024-02-21 238883/week @ 2024-02-28 244183/week @ 2024-03-06 230874/week @ 2024-03-13 247009/week @ 2024-03-20 239106/week @ 2024-03-27 293281/week @ 2024-04-03 242978/week @ 2024-04-10 206775/week @ 2024-04-17

1,028,283 downloads per month
Used in 1,661 crates (101 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