{"id":21334570,"url":"https://github.com/scattered-systems/scsys","last_synced_at":"2025-07-25T23:18:41.635Z","repository":{"id":62287858,"uuid":"553065998","full_name":"Scattered-Systems/scsys","owner":"Scattered-Systems","description":"A convenience library implementing primitives and utilities for use throughout the scsys ecosystem.","archived":false,"fork":false,"pushed_at":"2024-10-20T15:49:44.000Z","size":721,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-10-20T18:13:19.053Z","etag":null,"topics":["crate","rust","scsys"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/scsys","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/Scattered-Systems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["scattered-systems"],"open_collective":"scsys"}},"created_at":"2022-10-17T16:56:59.000Z","updated_at":"2024-09-22T17:34:34.000Z","dependencies_parsed_at":"2023-02-12T11:16:13.415Z","dependency_job_id":"2b65bd8a-9550-4573-bd86-d18272b98b54","html_url":"https://github.com/Scattered-Systems/scsys","commit_stats":{"total_commits":283,"total_committers":3,"mean_commits":94.33333333333333,"dds":"0.15194346289752647","last_synced_commit":"73a57ea7717cc09683f2ac68c23c8d643e48b74c"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scattered-Systems%2Fscsys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scattered-Systems%2Fscsys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scattered-Systems%2Fscsys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scattered-Systems%2Fscsys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scattered-Systems","download_url":"https://codeload.github.com/Scattered-Systems/scsys/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225816893,"owners_count":17528610,"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":["crate","rust","scsys"],"created_at":"2024-11-21T23:23:28.929Z","updated_at":"2025-07-12T11:30:54.468Z","avatar_url":"https://github.com/Scattered-Systems.png","language":"Rust","funding_links":["https://github.com/sponsors/scattered-systems","https://opencollective.com/scsys"],"categories":[],"sub_categories":[],"readme":"# scsys\n\n[![crates.io](https://img.shields.io/crates/v/scsys?style=for-the-badge\u0026logo=rust)](https://crates.io/crates/scsys)\n[![docs.rs](https://img.shields.io/docsrs/scsys?style=for-the-badge\u0026logo=docs.rs)](https://docs.rs/scsys)\n[![GitHub License](https://img.shields.io/github/license/scattered-systems/scsys?style=for-the-badge\u0026logo=github)](https://github.com/scattered-systems/scsys/blob/main/LICENSE)\n\n***\n\nWelcome to `scsys`, a collection of useful utilities, types, and other primitives that are used in various projects developed by [Scattered Systems](https://github.com/scattered-systems). The library is designed to be a general-purpose utility library that can be used in any Rust project, aiming to provide a standardized set of tools that can be used to build robust and reliable software.\n\n## Usage\n\nBefore you start using `scsys`, make sure to add it as a dependency in your `Cargo.toml` file. You can do this by adding the following lines:\n\n```toml\n[dependencies.scsys]\ndefault-features = true\nfeatures = [\n    \"derive\",\n]\nversion = \"0.2.x\"\n```\n\n### Examples\n\nFor more detailed examples, please visit the [examples](https://github.com/scattered-systems/scsys/tree/main/examples) directory in the repository. Below are some brief examples highlighting certain features of the library.\n\n#### Example 1: _Using the `VariantConstructors` derive macro_\n\nThe `VariantConstructors` derive macro can be used to automatically generate functional accessors for named fields within a given structure. For example, given the following structure:\n\n```rust\n#[derive(\n    Clone, \n    Copy, \n    Debug, \n    Default, \n    Eq, \n    Hash, \n    Ord, \n    PartialEq, \n    PartialOrd, \n    scsys::VariantConstructors\n)\npub enum Sample {\n    A,\n    B(usize),\n    C { x: f32, y: f32 },\n}\n```\n\nwe can automatically generate a functional constructors for each of the `Sample` variants:\n\n```rust\nlet a = Sample::a();\nlet b = Sample::b(42);\nlet c = Sample::c(1.0, 2.0);\nassert_eq!(a, Sample::A);\nassert_eq!(b, Sample::B(42));\nassert_eq!(c, Sample::C { x: 1.0, y: 2.0 });\n```\n\n## Getting Started\n\nTo get started with `scsys`, you can check out the [QUICKSTART.md](QUICKSTART.md) file, which provides a step-by-step guide on how to set up your development environment and start using the library.\n\n## License\n\nLicensed under the Apache License, Version 2.0, ([LICENSE-APACHE](http://www.apache.org/licenses/LICENSE-2.0))\n\n## Contribution\n\nContributions are welcome, however, ensure that you have read the [CONTRIBUTING.md](CONTRIBUTING.md) file before submitting a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscattered-systems%2Fscsys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscattered-systems%2Fscsys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscattered-systems%2Fscsys/lists"}