MCPcopy Index your code
hub / github.com/contextgeneric/cgp

github.com/contextgeneric/cgp @v0.7.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.7.0 ↗ · + Follow
1,120 symbols 1,794 edges 474 files 11 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cgp - Context-Generic Programming 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.

[!WARNING] At the moment, the cgp crate its constructs are mostly undocumented within Rustdoc. The best way to understand CGP is to read the book Context-Generic Programming Patterns.

Extension points exported contracts — how you extend this code

TransformMap (Interface)
Natural transformation from `M1::Map ` to `M2::Map ` [5 implementers]
crates/cgp-field/src/traits/transform_map.rs
ContainsValue (Interface)
(no doc) [5 implementers]
crates/cgp-monad/src/traits/value.rs
Container (Interface)
(no doc) [5 implementers]
crates/cgp-tests/tests/extensible_data_tests/variants/shape.rs
CanUseComponent (Interface)
This is a convenient type alias that is used in the same way as [`IsProviderFor`], but with the `Self` type being th [1 …
crates/cgp-component/src/traits/can_use_component.rs
FinalizeOptionalImpl (Interface)
(no doc) [2 implementers]
crates/cgp-field-extra/src/impls/finalize_optional.rs
MapFieldHandler (Interface)
(no doc) [2 implementers]
crates/cgp-dispatch/src/providers/matchers/to_field_handlers.rs
ComposeProviders (Interface)
(no doc) [2 implementers]
crates/cgp-handler/src/providers/pipe.rs
HasErrorType (Interface)
(no doc) [1 implementers]
crates/cgp-error/src/traits/has_error_type.rs

Core symbols most depended-on inside this repo

as_ref
called by 36
crates/cgp-field/src/types/mref.rs
get_field
called by 11
crates/cgp-field/src/impls/chain.rs
symbol_from_string
called by 11
crates/cgp-macro-lib/src/symbol.rs
to_generic_args
called by 10
crates/cgp-macro-lib/src/derive_builder/utils.rs
derive_is_provider_for
called by 10
crates/cgp-macro-lib/src/derive_provider/derive.rs
finalize_extract_result
called by 9
crates/cgp-field/src/traits/extract_field.rs
build_field
called by 9
crates/cgp-field/src/traits/build_field.rs
build_from
called by 9
crates/cgp-field/src/impls/build_from.rs

Shape

Function 384
Interface 245
Class 237
Method 233
Enum 21

Languages

Rust100%

Modules by API surface

crates/cgp-macro/src/lib.rs28 symbols
crates/cgp-tests/tests/extensible_data_tests/variants/basic.rs20 symbols
crates/cgp-tests/tests/extensible_data_tests/variants/shape.rs17 symbols
crates/cgp-tests/src/tests/blanket_trait.rs17 symbols
crates/cgp-tests/src/tests/async/spawn.rs15 symbols
crates/cgp-tests/tests/component_tests/delegate_components/new_struct.rs13 symbols
crates/cgp-macro-lib/src/derive_getter/parse.rs13 symbols
crates/cgp-tests/tests/extensible_data_tests/records/basic.rs12 symbols
crates/cgp-tests/src/tests/has_field/chain.rs12 symbols
crates/cgp-tests/tests/component_tests/cgp_impl/shape.rs11 symbols
crates/cgp-macro-lib/src/parse/delegate_components.rs10 symbols
crates/cgp-tests/tests/extensible_data_tests/variants/shape_ref.rs9 symbols

For agents

$ claude mcp add cgp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact