Pinned
My RustLab presentation on **How to stop fighting with coherence and start writing context-generic trait impls** is now available on YouTube: www.youtube.com/watch?v=gXIf...
Context-Generic Programming
@contextgeneric.dev
A new modular paradigm for Rust. Project account managed by @maybevoid.com. More info at https://contextgeneric.dev/
38 followers1 following56 posts
Pinned
My RustLab presentation on **How to stop fighting with coherence and start writing context-generic trait impls** is now available on YouTube: www.youtube.com/watch?v=gXIf...
How to stop fighting with coherence and start writing context-generic trait impls in Rust contextgeneric.dev/blog/rustlab... This blog post contains the slides and transcript for my presentation of Context-Generic Programming at RustLab 2025.
Supercharge Rust functions with implicit arguments using CGP v0.7.0 🚀 contextgeneric.dev/blog/v0.7.0-...
Context-Generic Programming (CGP) now has a new website! We have now migrated from Zola to Docusaurus. This blog post explains the reasons behind the move. contextgeneric.dev/blog/2026/02...
We're excited to announce the release of cgp v0.6.1, which brings several quality-of-life improvements to Context-Generic Programming in Rust. contextgeneric.dev/blog/v0-6-1-...
I am excited to announce the release of cgp-serde, a modular serialization library for Serde that leverages the power of Context-Generic Programming (CGP). contextgeneric.dev/blog/cgp-ser...
I’m excited to announce the release of CGP v0.6.0! This version introduces major ergonomic improvements that make provider and context implementations simpler and more intuitive to write. contextgeneric.dev/blog/v0-6-0-...
I am thrilled to announce the release of CGP v0.5.0! This new release includes many exciting features and improvements, including auto dispatchers, extensible datatype improvements, monadic computation, emulation of RTN, sneak preview of cgp-serde. #RustLang contextgeneric.dev/blog/v0-5-0-...
I will be presenting at RustLab on how to stop fighting with coherence and start writing context-generic programs with CGP. Use the discount code SP20FR to attend the conference with 20% discount!
Tired of fighting Rust’s coherence rules? S@maybevoid.com introduces Context-Generic Programming: a new way to write flexible trait impls without breaking the rules. 🧩 How to Stop Fighting with Coherence and Start Writing Context-Generic Trait Impls #rustlang #rustlab2025
Context-Generic Programming reposted
Context-Generic Programming reposted
I will be presenting at @rustlab.it on how to stop fighting with coherence and start writing context-generic programs with @contextgeneric.dev. Use the discount code SP20FR to attend the conference with 20% discount! rustlab.it/talks/how-to...
The third and fourth parts of Extensible Data Types for Rust - the design and implementation of extensible records and variants - has been published! contextgeneric.dev/blog/extensi... contextgeneric.dev/blog/extensi...
I am excited to share the second part of my blog series on Extensible Data Types with CGP. This post dives into how CGP leverages extensible variants to elegantly solve the expression problem. contextgeneric.dev/blog/extensi...
I'm excited to share the release of CGP v0.4.2, with new support for extensible records and variants! contextgeneric.dev/blog/extensi... In short extensible data types allows us to read, construct, and deconstruct a *generic* struct or enum without needing access to the concrete type.
Announcing Hypershell: a modular, type-level DSL for shell-scripting in Rust, powered by Context-Generic Programming! contextgeneric.dev/blog/hypersh...
I am excited to share about the new release of #CGP v0.4.0! This update solves a major challenge in debugging CGP-related errors in Rust, simplifies the developer experience with new macros, and added new features such as presets and datatype-generic programming. contextgeneric.dev/blog/v0-4-0-...
Also note that preset is an advanced concept in CGP that is yet to be formally introduced in our book. More updates will be coming very soon. But for now, you can check out the PR for a very high level overview of the changes: github.com/contextgener....
A lot of new features have been added to the `#[cgp_getter]` macro! For the basic use cases, you can now define getter methods that return &str or Option<&T>, and the macro will generate getter implementations that read from String or Option<T> fields. github.com/contextgener...
A great article that gives an overview of the coherence problem in typeclasses/traits has been surfaced on Hacker News. I am trying to take the opportunity to pitch about CGP and how it helps solve the given coherence problems. Help give me an upvote here: news.ycombinator.com/item?id=4334...
Here is the original article: programming-journal.org/2025/10/15/
CGP now has a new logo! The website has been updated with the new logo and color theme: contextgeneric.dev There are many exciting features in the upcoming v0.4.0 release. In particular, CGP now shows much more informative compile errors that makes it much easier to debug CGP code.
We have just published an update blog post on the release of #CGP v0.3.0, along with new book chapters! #RustLang contextgeneric.dev/blog/v0-3-0-...
I will write a full blog post and release note tomorrow. For now, do check out the revised chapters for CGP Patterns: patterns.contextgeneric.dev/error-handli... patterns.contextgeneric.dev/field-access...
A new chapter for #CGP Patterns have been released! patterns.contextgeneric.dev/field-access... This time, we go into deep dive various ways of defining and implementing field accessors using CGP, the HasField trait, and context-generic accessor providers. #RustLang
Another new chapter for #CGP Patterns have been released! patterns.contextgeneric.dev/error-wrappi... This time, we walk through an example config loader provider that reads a config file and parses the content as JSON, and how to wrap around #RustLang errors like std::io::Error with more details.
Another new chapter for #CGP Patterns has been released! This time on error reporting: patterns.contextgeneric.dev/error-report... The chapter walks through how we can decouple #RustLang code that produce errors from code that handles/report errors.
Happy new year! Another new chapter for #CGP #RustLang has been released: Error handling using delegated error raisers - patterns.contextgeneric.dev/delegated-er... This chapter dives into some advanced techniques in CGP to make it so that we can declaratively handle different source error types.
New chapter released for #CGP Patterns: Error Handling. patterns.contextgeneric.dev/error-handli... The introduction to error handling in CGP is very important, as it is very different from how error handling is typically done in #RustLang.
New chapter for CGP Patterns has been released! With the introduction of associated types, we can now walk through more practical examples of using CGP to validate authentication tokens using abstract time and auth token types. patterns.contextgeneric.dev/associated-t...
A reddit commentator has mentioned that #CGP looks similar to Scala's cake pattern. I have looked into one of the example code that uses cake pattern, and drafted an equivalent CGP #RustLang code that follows as closely with the original example: gist.github.com/soareschen/f...
The original Scala code was referred to here: www.baeldung.com/scala/cake-p... Do you find any similarity or difference between the two versions? Which version would you prefer?