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

#1 in #hostname

Download history 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 244806/week @ 2024-03-18 240898/week @ 2024-03-25 294019/week @ 2024-04-01 241050/week @ 2024-04-08 245172/week @ 2024-04-15 261604/week @ 2024-04-22 256746/week @ 2024-04-29 241927/week @ 2024-05-06 264356/week @ 2024-05-13

1,037,819 downloads per month
Used in 1,727 crates (103 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–7MB