{"id":13503150,"url":"https://github.com/rust-num/num-derive","last_synced_at":"2025-10-04T12:07:44.250Z","repository":{"id":39261856,"uuid":"114705574","full_name":"rust-num/num-derive","owner":"rust-num","description":"Procedural macros to derive numeric traits in Rust","archived":false,"fork":false,"pushed_at":"2024-02-06T21:00:52.000Z","size":1349,"stargazers_count":201,"open_issues_count":13,"forks_count":29,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-15T00:04:52.727Z","etag":null,"topics":["num-derive","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-num.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2017-12-19T01:36:45.000Z","updated_at":"2025-05-11T03:37:59.000Z","dependencies_parsed_at":"2024-06-14T22:55:28.312Z","dependency_job_id":"163e6ba7-2ac5-44c1-bc83-3182d85bd36e","html_url":"https://github.com/rust-num/num-derive","commit_stats":{"total_commits":635,"total_committers":91,"mean_commits":6.978021978021978,"dds":0.6267716535433071,"last_synced_commit":"c259ebc252fdfd836878d11e3a8520022b6a28b7"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-num%2Fnum-derive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-num%2Fnum-derive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-num%2Fnum-derive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-num%2Fnum-derive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-num","download_url":"https://codeload.github.com/rust-num/num-derive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254040,"owners_count":22039792,"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":["num-derive","rust"],"created_at":"2024-07-31T22:02:39.038Z","updated_at":"2025-10-04T12:07:39.230Z","avatar_url":"https://github.com/rust-num.png","language":"Rust","readme":"# num-derive\n\n[![crate](https://img.shields.io/crates/v/num-derive.svg)](https://crates.io/crates/num-derive)\n[![documentation](https://docs.rs/num-derive/badge.svg)](https://docs.rs/num-derive)\n[![minimum rustc 1.56](https://img.shields.io/badge/rustc-1.56+-red.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)\n[![build status](https://github.com/rust-num/num-derive/workflows/master/badge.svg)](https://github.com/rust-num/num-derive/actions)\n\nProcedural macros to derive numeric traits in Rust.\n\n## Usage\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nnum-traits = \"0.2\"\nnum-derive = \"0.4\"\n```\n\nand this to your crate root:\n\n```rust\n#[macro_use]\nextern crate num_derive;\n```\n\nThen you can derive traits on your own types:\n\n```rust\n#[derive(FromPrimitive, ToPrimitive)]\nenum Color {\n    Red,\n    Blue,\n    Green,\n}\n```\n\n## Optional features\n\n- **`full-syntax`** — Enables `num-derive` to handle enum discriminants\n  represented by complex expressions. Usually can be avoided by\n  [utilizing constants], so only use this feature if namespace pollution is\n  undesired and [compile time doubling] is acceptable.\n\n[utilizing constants]: https://github.com/rust-num/num-derive/pull/3#issuecomment-359044704\n[compile time doubling]: https://github.com/rust-num/num-derive/pull/3#issuecomment-359172588\n\n## Releases\n\nRelease notes are available in [RELEASES.md](RELEASES.md).\n\n## Compatibility\n\nThe `num-derive` crate is tested for rustc 1.56 and greater.\n\n## License\n\nLicensed under either of\n\n * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n * [MIT license](http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-num%2Fnum-derive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-num%2Fnum-derive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-num%2Fnum-derive/lists"}