{"id":29210638,"url":"https://github.com/embarkstudios/spdx","last_synced_at":"2025-07-02T21:07:22.646Z","repository":{"id":34979218,"uuid":"205886297","full_name":"EmbarkStudios/spdx","owner":"EmbarkStudios","description":"🆔 Helper crate for SPDX expressions. 🦀","archived":false,"fork":false,"pushed_at":"2025-05-22T14:12:28.000Z","size":1581,"stargazers_count":49,"open_issues_count":4,"forks_count":21,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-30T22:02:28.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://embark.rs","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/EmbarkStudios.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-02T15:30:42.000Z","updated_at":"2025-06-25T12:52:18.000Z","dependencies_parsed_at":"2024-02-26T10:26:19.628Z","dependency_job_id":"66a424c0-8230-48fb-9cb0-ad35dfda23b4","html_url":"https://github.com/EmbarkStudios/spdx","commit_stats":{"total_commits":83,"total_committers":17,"mean_commits":4.882352941176471,"dds":0.2650602409638554,"last_synced_commit":"711e3c4eeb9bb23020471f2380075c9d77a4c418"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":"EmbarkStudios/opensource-template","purl":"pkg:github/EmbarkStudios/spdx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fspdx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fspdx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fspdx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fspdx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmbarkStudios","download_url":"https://codeload.github.com/EmbarkStudios/spdx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fspdx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263215299,"owners_count":23431895,"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":"2025-07-02T21:07:21.950Z","updated_at":"2025-07-02T21:07:22.617Z","avatar_url":"https://github.com/EmbarkStudios.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable no-inline-html first-line-heading --\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# `🆔 spdx`\n\n**Helper crate for [SPDX](https://spdx.org/about) [license expressions](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60)**\n\n[![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev)\n[![Embark](https://img.shields.io/badge/discord-ark-%237289da.svg?logo=discord)](https://discord.gg/dAuKfZS)\n[![Crates.io](https://img.shields.io/crates/v/spdx.svg)](https://crates.io/crates/spdx)\n[![Docs](https://docs.rs/spdx/badge.svg)](https://docs.rs/spdx)\n[![Minimum Stable Rust Version](https://img.shields.io/badge/Rust-1.65.0-blue?color=fc8d62\u0026logo=rust)](https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html)\n[![SPDX Version](https://img.shields.io/badge/SPDX%20Version-3.26.0-blue.svg)](https://spdx.org/licenses/)\n[![dependency status](https://deps.rs/repo/github/EmbarkStudios/spdx/status.svg)](https://deps.rs/repo/github/EmbarkStudios/spdx)\n[![Build Status](https://github.com/EmbarkStudios/spdx/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/spdx/actions?workflow=CI)\n\n\u003c/div\u003e\n\n## Usage\n\n```rust\nuse spdx::Expression;\n\nfn main() {\n    let this_is_fine = Expression::parse(\"MIT OR Apache-2.0\").unwrap();\n\n    assert!(this_is_fine.evaluate(|req| {\n        if let spdx::LicenseItem::Spdx { id, .. } = req.license {\n            // Both MIT and Apache-2.0 are OSI approved, so this expression\n            // evaluates to true\n            return id.is_osi_approved();\n        }\n\n        false\n    }));\n\n    assert!(!this_is_fine.evaluate(|req| {\n        if let spdx::LicenseItem::Spdx { id, .. } = req.license {\n            // This is saying we don't accept any licenses that are OSI approved\n            // so the expression will evaluate to false as both sides of the OR\n            // are now rejected\n            return !id.is_osi_approved();\n        }\n\n        false\n    }));\n\n    // `NOPE` is not a valid SPDX license identifier, so this expression\n    // will fail to parse\n    let _this_is_not = Expression::parse(\"MIT OR NOPE\").unwrap_err();\n}\n```\n\n## Updating SPDX list\n\nYou can update the list of SPDX identifiers for licenses and exceptions by running the update program `cargo run --manifest-path=update/Cargo.toml -- v3.6` where `v3.6` is the tag in the [SPDX data repo](https://github.com/spdx/license-list-data).\n\n## Contributing\n\n[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v1.4-ff69b4.svg)](CODE_OF_CONDUCT.md)\n\nWe welcome community contributions to this project.\n\nPlease read our [Contributor Guide](CONTRIBUTING.md) for more information on how to get started.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembarkstudios%2Fspdx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fembarkstudios%2Fspdx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembarkstudios%2Fspdx/lists"}