rust-typed-builder
Our great sponsors
rust-typed-builder | rust-foundation-community-grant | |
---|---|---|
6 | 7 | |
823 | 20 | |
- | - | |
8.3 | 0.0 | |
13 days ago | over 1 year ago | |
Rust | Rust | |
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.
rust-typed-builder
-
Introducing tidy-builder: A Compile-time Correct Builder Generator in Rust
derive_builder works in runtime - you have to unwrap built result. And code editors cannot use auto-import builder-types. That's why I switched to [typed-builder|https://github.com/idanarye/rust-typed-builder] which looks similar to builder-pattern but more popular.
-
Should I start renaming my crate repositories that have "rust" in their names?
I'm the author of the typed-builder crate (and a couple of other crates in a similar position). The name of the crate's repository on GitHub is rust-typed-builder. Does the new trademark policy mean I have to change the repository's name to typed-builder-rs or typed-builder.rs or something similar, or am I in the clear because only the repository name is has the word "rust" in it and the crate itself is only named "typed-builder"?
-
Hey Rustaceans! Got a question? Ask here! (42/2022)!
There are also crates which can do that for you (e.g. https://github.com/idanarye/rust-typed-builder).
-
Survey of bad error messages emitted by the "misuse" of trait heavy crates
I can open a PR if desired but typed-builder is a big example for me of where this would be super useful. It's a good example of using traits/type safety for compile-time guarantees but the error messages are really subpar compared to the standard Rust experience, so feels like a very arbitrary compromise on Rust's strengths.
-
Buildstructor: a proc macro to build builders from constructors
Yes! The inspiration came from: * rust-typed-builder which is the struct equivalent of this crate. * https://users.rust-lang.org/t/typesafe-builder-design/58784
-
Thoughts on Rust Builder Pattern?
Rust Typed Builder
rust-foundation-community-grant
-
When do Rust's traits make your life difficult?
That's a topic where already some work exists. You might want to checkout my collection of bad error messages from such trait heavy crates for example. It's important to notice that most of these errors look complicated, but mostly have a quite simple cause. In some of these cases it's even possible to reword these error messages by removing most of the complicated looking type stuff to something much simpler which then is easier to understand.
-
dfdx v0.10.0 - deep learning now with even more const generic goodness
As with everything in static type checking, the upfront costs seem high (deciphering type errors can be a bit daunting for both diesel, and to a certain extent dfdx), but I feel like (1) this will get better (especially with the work /u/weiznich is doing), and (2) history has shown the upfront costs are worth it (as evidenced by the takeover of typescript and typed Python).
-
Diesel 2.0.0 RC1
This change is hopefully only the starting point to a number of future improvements. I've got a project grant as part of the rust foundation community grant program to work on improving the error messages for trait heavy crates like diesel. Hopefully this will result in other improvements as well. I track this work here. If you hit bad error messages with diesel or any other trait heavy crate, please fill an issue there.
-
Survey of bad error messages emitted by the "misuse" of trait heavy crates
axum does basically ]the trick as bevy](https://docs.rs/axum/latest/axum/handler/trait.Handler.html#impl-Handler%3C(T1%2C)%2C%20B%3E) to emulate variadics and someone already filed this https://github.com/weiznich/rust-foundation-community-grant/issues/2
What are some alternatives?
patterns - A catalogue of Rust design patterns, anti-patterns and idioms
metrics
crab - A community fork of a language named after a plant fungus. All of the memory-safe features you love, now with 100% less bureaucracy!
uom - Units of measurement -- type-safe zero-cost dimensional analysis
buildstructor - Derive a builder for your constructors in Rust
async-bb8-diesel - Safe asynchronous access to Diesel and the bb8 connection manager
diesel - A safe, extensible ORM and Query Builder for Rust
tower-biscuit-auth - Integrating Biscuit authentication with the Tower ecosystem.
tokio-diesel - Integrate Diesel into Tokio cleanly and efficiently.
console - a debugger for async rust!
aquascope - Interactive visualizations of Rust at compile-time and run-time