enum-code
snafu
enum-code | snafu | |
---|---|---|
1 | 2 | |
6 | 1,298 | |
- | - | |
5.3 | 8.0 | |
11 months ago | 3 days ago | |
Rust | Rust | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
enum-code
-
Just open source a process macro「enum-code」for mapping enum values to error codes in Rust.
You can find the code on Github: https://github.com/Kunduin/enum-code and crates.io: https://crates.io/crates/enum-code.
snafu
-
Modular Errors in Rust
I encourage people to check out my SNAFU crate [1]. I encourage creating many distinct error types (usually enums but also structs) and composing them. So much so that I advocate that you never create one specific error in more than one source location. That means that the collection of error types produces a unique trace through your program, uniquely identifying the source of the error with no runtime cost (compare this to a runtime-collected stacktrace / backtrace).
[1]: https://docs.rs/snafu/
-
Announcing Rust 1.58.0
Yes, all procedural macros are inherently unhygienic. This has even bitten us once before.
What are some alternatives?
nutype - Rust newtype with guarantees 🇺🇦 🦀
rust - Empowering everyone to build reliable and efficient software.
crates.io - The Rust package registry
miette - Fancy extension for std::error::Error with pretty, detailed diagnostic printing.
winresult - Debug-friendly rust types/codes for windows results
deno - A modern runtime for JavaScript and TypeScript.
ebec - A collection of extensible ES6 error classes for different contexts.
unsafe-code-guidelines - Forum for discussion about what unsafe code can and can't do
maud - :pencil: Compile-time HTML templates for Rust
gust - Built in Rust and leveraging Docker, JSON, and SQLite (with future integration of a GraphQL API), 'gust' simplifies the process of preserving your recipes and creating comprehensive grocery shopping lists.
ariadne - A fancy diagnostics & error reporting crate