#utilities #primitive #toolkit

no-std scsys

scsys is a collection of primitives and utilities for use throughout the ecosystem

55 releases

Uses new Rust 2024

0.3.2 Sep 9, 2025
0.3.1 Jun 25, 2025
0.2.9 Jun 8, 2025
0.2.3 Sep 22, 2024
0.1.7 Jul 28, 2022

#152 in #primitive

Download history 150/week @ 2025-09-18 325/week @ 2025-09-25 210/week @ 2025-10-02 96/week @ 2025-10-09 236/week @ 2025-10-16 166/week @ 2025-10-23 193/week @ 2025-10-30 118/week @ 2025-11-06 141/week @ 2025-11-13 148/week @ 2025-11-20 179/week @ 2025-11-27 83/week @ 2025-12-04 77/week @ 2025-12-11 131/week @ 2025-12-18 145/week @ 2025-12-25 114/week @ 2026-01-01

487 downloads per month
Used in 38 crates (32 directly)

Apache-2.0

135KB
2.5K SLoC

scsys

crates.io docs.rs GitHub License


Welcome to scsys, a collection of useful utilities, types, and other primitives that are used in various projects developed by 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.

Usage

Before 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:

[dependencies.scsys]
default-features = true
features = [
    "derive",
]
version = "0.3.x"

Examples

For more detailed examples, please visit the examples directory in the repository. Below are some brief examples highlighting certain features of the library.

Example 1: Using the VariantConstructors derive macro

The VariantConstructors derive macro can be used to automatically generate functional accessors for named fields within a given structure. For example, given the following structure:

#[derive(
    Clone, 
    Copy, 
    Debug, 
    Default, 
    Eq, 
    Hash, 
    Ord, 
    PartialEq, 
    PartialOrd, 
    scsys::VariantConstructors
)
pub enum Sample {
    A,
    B(usize),
    C { x: f32, y: f32 },
}

we can automatically generate a functional constructors for each of the Sample variants:

let a = Sample::a();
let b = Sample::b(42);
let c = Sample::c(1.0, 2.0);
assert_eq!(a, Sample::A);
assert_eq!(b, Sample::B(42));
assert_eq!(c, Sample::C { x: 1.0, y: 2.0 });

Getting Started

To get started with scsys, you can check out the QUICKSTART.md file, which provides a step-by-step guide on how to set up your development environment and start using the library.

License

Licensed under the Apache License, Version 2.0, (LICENSE-APACHE)

Contribution

Contributions are welcome, however, ensure that you have read the CONTRIBUTING.md file before submitting a pull request.

Dependencies

~0.3–6.5MB
~113K SLoC