This repository contains a set of crates that help you build robust highly scalable services in Rust.
These are the crates built out of this repo:
bytesbuf- Manipulate sequences of bytes for efficient I/O.data_privacy- Mechanisms to classify, manipulate, and redact sensitive data.data_privacy_macros- Macros for thedata_privacycrate.fundle- Compile-time safe dependency injection for Rust.fundle_macros- Macros for thefundlecrate.fundle_macros_impl- Macros for thefundlecrate.ohno- High-quality Rust error handling.ohno_macros- Macros for theohnocrate.thread_aware- Facilities to support thread-isolated state.thread_aware_macros- Macros for thethread_awarecrate.thread_aware_macros_impl- Macros for thethread_awarecrate.
-
Every PR submitted to this repo must follow the Conventional Commits specification.
-
Every crate built in this repo should:
- Have an entry in the Crates section above.
- Have an entry in CHANGELOG.md.
- Have a README.md file generated using
cargo-rdmewith a consistent set of badges (see crates/data_privacy/README.md as an example) - Have a CHANGELOG.md file generated using the
release-crate.ps1script. - Have a meaningful set of categories and keywords in their Cargo.toml file (see
crates/data_privacy/Cargo.toml as an example).
The
oxidizerkeyword should always be present. - Have a Rust-inspired logo and favicon.
The best way to get started with a new crate is to run scripts\add-crate.ps1 which will create a new folder
and populate it to get you started on a new crate.
We use standard Rust tooling to build, test, lint, and format our source base. In addition, we rely on these tools, which you may wish to install:
-
cargo-audit- used to ensure we don't use known-bad crate versions. -
cargo-check-external-types- used to control the types we expose -
cargo-hack- used to exhaustively run tests against multiple features. -
cargo miri- used to statically verify unsafe code sequences. -
cargo-mutants- used to perform mutation testing -
cargo-rdme- generates README files based on a crate's top-level docs. -
cargo-udeps- used to ensure crates don't declare superfluous dependencies.
Releasing new versions of crates to crates.io is handled by
an internal Microsoft automation process. To release a new version of any crate, use
the scripts\release-crate.ps1 script. For example:
-
Make the changes you'd like to release and commit them to the repo. Don't push them to GitHub, just commit them:
git add . git commit -m "feat: Add the GoFast feature"
-
Run the release script, supplying the name of the crate you want to release. The script will update the version number in a few places and update the appropriate
CHANGELOGfile:.\scripts\release-crate.ps1 <crate_name>
-
Amend the newly edited files back into your commit
git add . git commit --amend --no-edit -
Create a PR like normal.
Once your PR is merged, automation will kick in to tag the commit and push the crate to crates.io.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.