Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 2.2 KB

README.md

File metadata and controls

39 lines (29 loc) · 2.2 KB

cgp - Context-Generic Programming Libraries in Rust

Apache 2.0 Licensed Crates.io Rust Stable Rust 1.81+

Overview

The cgp project contains a collection of micro Rust crates that empowers context-generic programming (CGP), a new modular programming paradigm in Rust. To learn more about context-generic programming, check out the our website contextgeneric.dev, and our book Context-Generic Programming Patterns.

Crates Organization

The CGP core constructs are organized as many child crates that are intended to be minimal and stable. Having each construct defined in separate crate helps us avoid introducing breaking changes in semantic versioning, in case an unrelated construct is updated.

We also offers meta-crates that aggregate the dependencies from many CGP child crates into one place, so that users can use CGP by specifying only one dependency:

  • cgp - The main crate that includes all child crates defined in this project.
  • cgp-core - Meta crate that includes core CGP crates that
  • cgp-extra - Meta crate that includes additional CGP crates that may be non-essential or unstable.

The following library crates are provided:

  • cgp-component - Defines the core CGP component traits and macros.
  • cgp-async - Defines the Async trait as an alias for async-safe types.
  • cgp-error - Defines the HasErrorType component and error handling constructs.
  • cgp-field - Defines the HasField trait to enable the use of data-generic programming with CGP.
  • cgp-inner - Defines the HasInner component which enables composition-based implementation in CGP.
  • cgp-run - Defines the CanRun component for implementing async runners.