on-internet
← Community

Context-Generic Programming (CGP) v0.8.0 - cargo-cgp, new documentation, and namespaces

Lobsters ·

Author here. Context-Generic Programming (CGP) lets a Rust trait have several implementations that would normally overlap, such as one for every T: Display and another for every T: AsRef<[u8]>. Each application picks the implementation it wants, the compiler resolves that choice to direct calls, and CGP itself is an ordinary library on stable Rust. Most of this release is about making CGP easier to learn and debug: cargo-cgp v0.1.0 explains wiring errors in terms of the code you wrote, rather than the code the macros generated. When a provider needs a field your type lacks, for example, cargo

Comments

Sign in or sign up to comment and upvote.

No comments yet.