{"id":15908022,"url":"https://github.com/svartalf/hostname","last_synced_at":"2025-04-04T21:06:34.428Z","repository":{"id":45308725,"uuid":"76356815","full_name":"svartalf/hostname","owner":"svartalf","description":"Cross-platform hostname functions in Rust","archived":false,"fork":false,"pushed_at":"2024-04-07T15:24:13.000Z","size":28,"stargazers_count":63,"open_issues_count":7,"forks_count":23,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T20:09:17.331Z","etag":null,"topics":["hostname","posix","rust","rust-lang","unix","windows"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/hostname","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/svartalf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-13T12:29:09.000Z","updated_at":"2025-01-18T13:16:57.000Z","dependencies_parsed_at":"2023-12-27T00:22:38.752Z","dependency_job_id":"9ec4fa76-492a-43dc-84b6-c14b5d8ba430","html_url":"https://github.com/svartalf/hostname","commit_stats":{"total_commits":37,"total_committers":7,"mean_commits":5.285714285714286,"dds":"0.43243243243243246","last_synced_commit":"3c1df88dfd6df167e75afb91e55e747d1aaf2472"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svartalf%2Fhostname","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svartalf%2Fhostname/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svartalf%2Fhostname/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svartalf%2Fhostname/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svartalf","download_url":"https://codeload.github.com/svartalf/hostname/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249524,"owners_count":20908212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hostname","posix","rust","rust-lang","unix","windows"],"created_at":"2024-10-06T14:08:53.991Z","updated_at":"2025-04-04T21:06:34.393Z","avatar_url":"https://github.com/svartalf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hostname\n\n[![Latest Version](https://img.shields.io/crates/v/hostname.svg)](https://crates.io/crates/hostname)\n[![Latest Version](https://docs.rs/hostname/badge.svg)](https://docs.rs/hostname)\n[![Build Status](https://github.com/svartalf/hostname/actions/workflows/ci.yml/badge.svg)](https://github.com/svartalf/hostname/actions)\n![Minimum rustc version](https://img.shields.io/badge/rustc-1.67+-green.svg)\n![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)\n![Crates.io](https://img.shields.io/crates/d/hostname)\n\n\u003e Cross-platform system's host name functions in Rust\n\n## Supported platforms\n\n * [POSIX-compliant](https://en.wikipedia.org/wiki/POSIX#POSIX-oriented_operating_systems) systems\\\n   (Linux, macOS, Android, FreeBSD, OpenBSD, NetBSD, Solaris, Redox, and so on)\n * Windows\n\n## Rust version requirements\n\nSince version `0.4.0` this crate requires Rust version `1.67.0` or greater.\n\nThis version is explicitly tested in CI\nand may be bumped in any major or minor release as needed.\\\nMaintaining compatibility with older compilers is a priority though,\nso the bar for bumping the minimum supported version is set very high.\nAny changes to the supported minimum version will be called out in the release notes.\n\n## Usage\n\nAdd the following dependency to your Cargo manifest:\n\n```toml\n[dependencies]\nhostname = \"^0.4\"\n```\n\nCrate API provides two simple functions for retrieving and setting the system's host name:\n\n```rust\nuse std::io;\n\nfn main() -\u003e io::Result\u003c()\u003e {\n    // Retrieve the hostname\n    dbg!(hostname::get()?);\n\n    // And set a new one\n    hostname::set(\"potato\")?;\n\n    Ok(())\n}\n```\n\n## License\n\nhostname is primarily distributed under the terms of the MIT license\n([LICENSE](LICENSE) or http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvartalf%2Fhostname","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvartalf%2Fhostname","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvartalf%2Fhostname/lists"}