Skip to content

Instantly share code, notes, and snippets.

@MaulingMonkey
Last active February 10, 2021 08:18
Show Gist options
  • Save MaulingMonkey/c81a9f18811079f19326dac4daa5a359 to your computer and use it in GitHub Desktop.
Save MaulingMonkey/c81a9f18811079f19326dac4daa5a359 to your computer and use it in GitHub Desktop.
MaulingMonkey's Rust Policies

Versioning

  • 0.0.1 - Very early, no guarantees made.
  • 0.1.0 - Far from feature complete, but I'm generally begining to care about tracking breaking changes at least.
  • 1.0.0 - Feature complete, strict policies about breaking changes.

Minimum Supported Rust Versions (MSRV)

  • Advertized MSRV should be enforced by CI.
  • Bumping the Advertized MSRV is a breaking change.
  • Bumping "MSRV in Practice" is not a breaking change.
  • Advertize MSRV with: rust: 1.36.0+ rust: 1.39.0+ rust: stable rust: nightly
    [![rust: 1.36.0+](https://img.shields.io/badge/rust-1.36.0%2B-green.svg)](https://gist.github.com/MaulingMonkey/c81a9f18811079f19326dac4daa5a359#minimum-supported-rust-versions-msrv)
    [![rust: 1.39.0+](https://img.shields.io/badge/rust-1.39.0%2B-green.svg)](https://gist.github.com/MaulingMonkey/c81a9f18811079f19326dac4daa5a359#minimum-supported-rust-versions-msrv)
    [![rust: stable](https://img.shields.io/badge/rust-stable-yellow.svg)](https://gist.github.com/MaulingMonkey/c81a9f18811079f19326dac4daa5a359#minimum-supported-rust-versions-msrv)
    [![rust: nightly](https://img.shields.io/badge/rust-nightly-red.svg)](https://gist.github.com/MaulingMonkey/c81a9f18811079f19326dac4daa5a359#minimum-supported-rust-versions-msrv)

Unsafe Code Policies

  • Avoid if possible. Aside from FFI, it's almost always possible to avoid.
  • At least make the APIs sound, and hard to misuse, if you must write unsafe code.
  • Except perhaps for FFI, prioritize using more widely reviewed and vetted crates.
  • Unsafe badges: unsafe: no unsafe: yes
     [![unsafe: no](https://img.shields.io/github/search/MaulingMonkey/CRATE_NAME/unsafe%2bextension%3Ars?color=green&label=unsafe)](https://github.com/MaulingMonkey/CRATE_NAME/search?q=unsafe+extension%3Ars)
    [![unsafe: yes](https://img.shields.io/github/search/MaulingMonkey/CRATE_NAME/unsafe%2bextension%3Ars?color=yellow&label=unsafe)](https://github.com/MaulingMonkey/CRATE_NAME/search?q=unsafe+extension%3Ars)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment