{"id":20523002,"url":"https://github.com/openbytedev/build-target","last_synced_at":"2025-04-14T03:03:48.625Z","repository":{"id":62438623,"uuid":"391474789","full_name":"OpenByteDev/build-target","owner":"OpenByteDev","description":"A crate that provides programmatic access to information about the current build target inside build.rs.","archived":false,"fork":false,"pushed_at":"2022-04-29T21:23:49.000Z","size":67,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-14T11:49:01.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/OpenByteDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-31T22:27:00.000Z","updated_at":"2022-07-22T18:34:33.000Z","dependencies_parsed_at":"2022-11-01T21:16:24.106Z","dependency_job_id":null,"html_url":"https://github.com/OpenByteDev/build-target","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenByteDev%2Fbuild-target","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenByteDev%2Fbuild-target/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenByteDev%2Fbuild-target/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenByteDev%2Fbuild-target/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenByteDev","download_url":"https://codeload.github.com/OpenByteDev/build-target/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224854926,"owners_count":17380953,"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":[],"created_at":"2024-11-15T22:37:33.978Z","updated_at":"2024-11-15T22:37:34.502Z","avatar_url":"https://github.com/OpenByteDev.png","language":"Rust","readme":"# build-target\n\n[![CI](https://github.com/OpenByteDev/build-target/actions/workflows/ci.yml/badge.svg)](https://github.com/OpenByteDev/build-target/actions/workflows/ci.yml)\n[![crates.io](https://img.shields.io/crates/v/build-target.svg)](https://crates.io/crates/build-target)\n[![Documentation](https://docs.rs/build-target/badge.svg)](https://docs.rs/build-target)\n[![dependency status](https://deps.rs/repo/github/openbytedev/build-target/status.svg)](https://deps.rs/repo/github/openbytedev/build-target)\n[![MIT](https://img.shields.io/crates/l/build-target.svg)](https://github.com/OpenByteDev/build-target/blob/master/LICENSE)\n\nA crate that provides programmatic access to information about the current build target inside `build.rs`.\n\n## Examples\nPrints all available information about the current build target.\n```rust\n// inside build.rs\n\nfn main() {\n    // The panic is just used to print the information to the console.\n    panic!(\"current build target: {:#?}\",\n        build_target::target().unwrap()\n    );\n}\n```\n\nGets the parts of the current build target individually.\n```rust\n// inside build.rs\n\nfn main() {\n    let arch   = build_target::target_arch().unwrap();   // eg. \"x86_64\", \"aarch64\", ...\n    let env    = build_target::target_env().unwrap();    // eg. \"gnu\", \"msvc\", ...\n    let family = build_target::target_family().unwrap(); // eg. \"windows\", \"unix\", ...\n    let os     = build_target::target_os().unwrap();     // eg. \"android\", \"linux\", ...\n    let triple = build_target::target_triple().unwrap(); // eg. \"x86_64-unknown-linux-gnu\", ...\n}\n```\n\n## Attribution\nThis crate is inspired by and partially based on [`platforms`](https://crates.io/crates/platforms).\n\n## License\nLicensed under MIT license ([LICENSE](https://github.com/OpenByteDev/build-target/blob/master/LICENSE) or http://opensource.org/licenses/MIT)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbytedev%2Fbuild-target","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenbytedev%2Fbuild-target","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbytedev%2Fbuild-target/lists"}