From fc387d92fb4dc413d0d211aa57ad2506dfd74ae1 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Mon, 16 Nov 2026 21:45:13 +0100 Subject: [PATCH 1/3] Set the crate versions to 0.8.0-prerelease The workspace and every crate move from 0.8.0-alpha to 0.8.0-prerelease, the version the publish dry run packages. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 64 +++++++++---------- Cargo.toml | 58 ++++++++--------- crates/core/cgp-base-types/Cargo.toml | 2 +- crates/core/cgp-component/Cargo.toml | 2 +- crates/core/cgp-error/Cargo.toml | 4 +- crates/core/cgp-field/Cargo.toml | 2 +- crates/core/cgp-type/Cargo.toml | 4 +- crates/extra/cgp-dispatch/Cargo.toml | 4 +- crates/extra/cgp-error-extra/Cargo.toml | 4 +- crates/extra/cgp-field-extra/Cargo.toml | 2 +- crates/extra/cgp-handler/Cargo.toml | 4 +- crates/extra/cgp-monad/Cargo.toml | 4 +- crates/extra/cgp-run/Cargo.toml | 4 +- crates/extra/cgp-runtime/Cargo.toml | 4 +- crates/macros/cgp-async-macro/Cargo.toml | 2 +- crates/macros/cgp-macro-core/Cargo.toml | 2 +- crates/macros/cgp-macro-extra-core/Cargo.toml | 2 +- crates/macros/cgp-macro-extra-lib/Cargo.toml | 2 +- crates/macros/cgp-macro-extra/Cargo.toml | 2 +- crates/macros/cgp-macro-lib/Cargo.toml | 2 +- .../macros/cgp-macro-test-util-lib/Cargo.toml | 2 +- crates/macros/cgp-macro-test-util/Cargo.toml | 2 +- crates/macros/cgp-macro/Cargo.toml | 2 +- crates/main/cgp-base-extra/Cargo.toml | 2 +- crates/main/cgp-base/Cargo.toml | 2 +- crates/main/cgp-core/Cargo.toml | 2 +- crates/main/cgp-extra/Cargo.toml | 2 +- crates/main/cgp/Cargo.toml | 2 +- .../error/cgp-error-anyhow/Cargo.toml | 4 +- .../error/cgp-error-eyre/Cargo.toml | 4 +- .../standalone/error/cgp-error-std/Cargo.toml | 4 +- crates/tests/cgp-macro-tests/Cargo.toml | 2 +- crates/tests/cgp-no-std-tests/Cargo.toml | 2 +- crates/tests/cgp-tests/Cargo.toml | 2 +- 34 files changed, 104 insertions(+), 104 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 136038e71..4ac8f7f49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,7 +28,7 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cgp" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", "cgp-extra", @@ -36,7 +36,7 @@ dependencies = [ [[package]] name = "cgp-async-macro" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "proc-macro2", "quote", @@ -45,7 +45,7 @@ dependencies = [ [[package]] name = "cgp-base" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-base-types", "cgp-component", @@ -54,7 +54,7 @@ dependencies = [ [[package]] name = "cgp-base-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-base", "cgp-type", @@ -62,15 +62,15 @@ dependencies = [ [[package]] name = "cgp-base-types" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" [[package]] name = "cgp-component" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" [[package]] name = "cgp-core" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-async-macro", "cgp-base", @@ -83,7 +83,7 @@ dependencies = [ [[package]] name = "cgp-dispatch" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", "cgp-handler", @@ -92,7 +92,7 @@ dependencies = [ [[package]] name = "cgp-error" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-base-extra", "cgp-field", @@ -102,7 +102,7 @@ dependencies = [ [[package]] name = "cgp-error-anyhow" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "anyhow", "cgp-core", @@ -110,14 +110,14 @@ dependencies = [ [[package]] name = "cgp-error-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", ] [[package]] name = "cgp-error-eyre" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", "eyre", @@ -125,14 +125,14 @@ dependencies = [ [[package]] name = "cgp-error-std" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", ] [[package]] name = "cgp-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", "cgp-dispatch", @@ -147,7 +147,7 @@ dependencies = [ [[package]] name = "cgp-field" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-base-types", "cgp-component", @@ -156,21 +156,21 @@ dependencies = [ [[package]] name = "cgp-field-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-field", ] [[package]] name = "cgp-handler" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", ] [[package]] name = "cgp-macro" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-macro-lib", "syn", @@ -178,7 +178,7 @@ dependencies = [ [[package]] name = "cgp-macro-core" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "itertools", "proc-macro2", @@ -188,7 +188,7 @@ dependencies = [ [[package]] name = "cgp-macro-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-macro-extra-lib", "syn", @@ -196,7 +196,7 @@ dependencies = [ [[package]] name = "cgp-macro-extra-core" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-macro-core", "proc-macro2", @@ -206,7 +206,7 @@ dependencies = [ [[package]] name = "cgp-macro-extra-lib" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-macro-core", "cgp-macro-extra-core", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cgp-macro-lib" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-macro-core", "itertools", @@ -228,7 +228,7 @@ dependencies = [ [[package]] name = "cgp-macro-test-util" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-macro-core", "cgp-macro-lib", @@ -240,7 +240,7 @@ dependencies = [ [[package]] name = "cgp-macro-test-util-lib" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-macro-core", "cgp-macro-extra-lib", @@ -253,7 +253,7 @@ dependencies = [ [[package]] name = "cgp-macro-tests" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp", "cgp-macro-core", @@ -269,7 +269,7 @@ dependencies = [ [[package]] name = "cgp-monad" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", "cgp-handler", @@ -277,28 +277,28 @@ dependencies = [ [[package]] name = "cgp-no-std-tests" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp", ] [[package]] name = "cgp-run" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", ] [[package]] name = "cgp-runtime" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-core", ] [[package]] name = "cgp-tests" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp", "cgp-error-anyhow", @@ -315,7 +315,7 @@ dependencies = [ [[package]] name = "cgp-type" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" dependencies = [ "cgp-base", "cgp-component", diff --git a/Cargo.toml b/Cargo.toml index c74f6578d..7f25f1552 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,37 +54,37 @@ categories = ["rust-patterns", "no-std"] description = "A language extension for Rust, with pluggable trait implementations at compile-time." [workspace.dependencies] -cgp = { version = "0.8.0-alpha", path = "./crates/main/cgp" } -cgp-base = { version = "0.8.0-alpha", path = "./crates/main/cgp-base" } -cgp-base-extra = { version = "0.8.0-alpha", path = "./crates/main/cgp-base-extra" } -cgp-core = { version = "0.8.0-alpha", path = "./crates/main/cgp-core" } -cgp-extra = { version = "0.8.0-alpha", path = "./crates/main/cgp-extra" } +cgp = { version = "0.8.0-prerelease", path = "./crates/main/cgp" } +cgp-base = { version = "0.8.0-prerelease", path = "./crates/main/cgp-base" } +cgp-base-extra = { version = "0.8.0-prerelease", path = "./crates/main/cgp-base-extra" } +cgp-core = { version = "0.8.0-prerelease", path = "./crates/main/cgp-core" } +cgp-extra = { version = "0.8.0-prerelease", path = "./crates/main/cgp-extra" } -cgp-base-types = { version = "0.8.0-alpha", path = "./crates/core/cgp-base-types" } -cgp-component = { version = "0.8.0-alpha", path = "./crates/core/cgp-component" } -cgp-type = { version = "0.8.0-alpha", path = "./crates/core/cgp-type" } -cgp-field = { version = "0.8.0-alpha", path = "./crates/core/cgp-field" } -cgp-error = { version = "0.8.0-alpha", path = "./crates/core/cgp-error" } +cgp-base-types = { version = "0.8.0-prerelease", path = "./crates/core/cgp-base-types" } +cgp-component = { version = "0.8.0-prerelease", path = "./crates/core/cgp-component" } +cgp-type = { version = "0.8.0-prerelease", path = "./crates/core/cgp-type" } +cgp-field = { version = "0.8.0-prerelease", path = "./crates/core/cgp-field" } +cgp-error = { version = "0.8.0-prerelease", path = "./crates/core/cgp-error" } -cgp-field-extra = { version = "0.8.0-alpha", path = "./crates/extra/cgp-field-extra" } -cgp-error-extra = { version = "0.8.0-alpha", path = "./crates/extra/cgp-error-extra" } -cgp-handler = { version = "0.8.0-alpha", path = "./crates/extra/cgp-handler" } -cgp-monad = { version = "0.8.0-alpha", path = "./crates/extra/cgp-monad" } -cgp-dispatch = { version = "0.8.0-alpha", path = "./crates/extra/cgp-dispatch" } -cgp-run = { version = "0.8.0-alpha", path = "./crates/extra/cgp-run" } -cgp-runtime = { version = "0.8.0-alpha", path = "./crates/extra/cgp-runtime" } +cgp-field-extra = { version = "0.8.0-prerelease", path = "./crates/extra/cgp-field-extra" } +cgp-error-extra = { version = "0.8.0-prerelease", path = "./crates/extra/cgp-error-extra" } +cgp-handler = { version = "0.8.0-prerelease", path = "./crates/extra/cgp-handler" } +cgp-monad = { version = "0.8.0-prerelease", path = "./crates/extra/cgp-monad" } +cgp-dispatch = { version = "0.8.0-prerelease", path = "./crates/extra/cgp-dispatch" } +cgp-run = { version = "0.8.0-prerelease", path = "./crates/extra/cgp-run" } +cgp-runtime = { version = "0.8.0-prerelease", path = "./crates/extra/cgp-runtime" } -cgp-error-anyhow = { version = "0.8.0-alpha", path = "./crates/standalone/error/cgp-error-anyhow" } -cgp-error-eyre = { version = "0.8.0-alpha", path = "./crates/standalone/error/cgp-error-eyre" } -cgp-error-std = { version = "0.8.0-alpha", path = "./crates/standalone/error/cgp-error-std" } +cgp-error-anyhow = { version = "0.8.0-prerelease", path = "./crates/standalone/error/cgp-error-anyhow" } +cgp-error-eyre = { version = "0.8.0-prerelease", path = "./crates/standalone/error/cgp-error-eyre" } +cgp-error-std = { version = "0.8.0-prerelease", path = "./crates/standalone/error/cgp-error-std" } -cgp-async-macro = { version = "0.8.0-alpha", path = "./crates/macros/cgp-async-macro" } -cgp-macro = { version = "0.8.0-alpha", path = "./crates/macros/cgp-macro" } -cgp-macro-core = { version = "0.8.0-alpha", path = "./crates/macros/cgp-macro-core" } -cgp-macro-lib = { version = "0.8.0-alpha", path = "./crates/macros/cgp-macro-lib" } -cgp-macro-extra = { version = "0.8.0-alpha", path = "./crates/macros/cgp-macro-extra" } -cgp-macro-extra-core = { version = "0.8.0-alpha", path = "./crates/macros/cgp-macro-extra-core" } -cgp-macro-extra-lib = { version = "0.8.0-alpha", path = "./crates/macros/cgp-macro-extra-lib" } -cgp-macro-test-util = { version = "0.8.0-alpha", path = "./crates/macros/cgp-macro-test-util" } +cgp-async-macro = { version = "0.8.0-prerelease", path = "./crates/macros/cgp-async-macro" } +cgp-macro = { version = "0.8.0-prerelease", path = "./crates/macros/cgp-macro" } +cgp-macro-core = { version = "0.8.0-prerelease", path = "./crates/macros/cgp-macro-core" } +cgp-macro-lib = { version = "0.8.0-prerelease", path = "./crates/macros/cgp-macro-lib" } +cgp-macro-extra = { version = "0.8.0-prerelease", path = "./crates/macros/cgp-macro-extra" } +cgp-macro-extra-core = { version = "0.8.0-prerelease", path = "./crates/macros/cgp-macro-extra-core" } +cgp-macro-extra-lib = { version = "0.8.0-prerelease", path = "./crates/macros/cgp-macro-extra-lib" } +cgp-macro-test-util = { version = "0.8.0-prerelease", path = "./crates/macros/cgp-macro-test-util" } -cgp-macro-test-util-lib = { version = "0.8.0-alpha", path = "./crates/macros/cgp-macro-test-util-lib" } +cgp-macro-test-util-lib = { version = "0.8.0-prerelease", path = "./crates/macros/cgp-macro-test-util-lib" } diff --git a/crates/core/cgp-base-types/Cargo.toml b/crates/core/cgp-base-types/Cargo.toml index e38293062..a8cb03064 100644 --- a/crates/core/cgp-base-types/Cargo.toml +++ b/crates/core/cgp-base-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-base-types" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/core/cgp-component/Cargo.toml b/crates/core/cgp-component/Cargo.toml index 4acfe7a1a..e23ee352d 100644 --- a/crates/core/cgp-component/Cargo.toml +++ b/crates/core/cgp-component/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-component" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/core/cgp-error/Cargo.toml b/crates/core/cgp-error/Cargo.toml index 99d588306..1dd6add7f 100644 --- a/crates/core/cgp-error/Cargo.toml +++ b/crates/core/cgp-error/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -12,7 +12,7 @@ categories = { workspace = true } description = "CGP's error components: the abstract error type, raising, and wrapping." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../main/cgp-base-extra", package = "cgp-base-extra" } +cgp = { version = "0.8.0-prerelease", path = "../../main/cgp-base-extra", package = "cgp-base-extra" } cgp-macro = { workspace = true } cgp-type = { workspace = true } cgp-field = { workspace = true } diff --git a/crates/core/cgp-field/Cargo.toml b/crates/core/cgp-field/Cargo.toml index 63745d37b..0eba03112 100644 --- a/crates/core/cgp-field/Cargo.toml +++ b/crates/core/cgp-field/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-field" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/core/cgp-type/Cargo.toml b/crates/core/cgp-type/Cargo.toml index 6e74fa673..d0fe55687 100644 --- a/crates/core/cgp-type/Cargo.toml +++ b/crates/core/cgp-type/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-type" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -12,6 +12,6 @@ categories = { workspace = true } description = "CGP's abstract types: a type the context chooses behind a trait." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../main/cgp-base", package = "cgp-base" } +cgp = { version = "0.8.0-prerelease", path = "../../main/cgp-base", package = "cgp-base" } cgp-component = { workspace = true } cgp-macro = { workspace = true } diff --git a/crates/extra/cgp-dispatch/Cargo.toml b/crates/extra/cgp-dispatch/Cargo.toml index d22713ea5..2730ac24c 100644 --- a/crates/extra/cgp-dispatch/Cargo.toml +++ b/crates/extra/cgp-dispatch/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-dispatch" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -12,6 +12,6 @@ categories = { workspace = true } description = "CGP's dispatch providers, which match, extract, and build a value on the way to a handler." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../main/cgp-core", package = "cgp-core" } +cgp = { version = "0.8.0-prerelease", path = "../../main/cgp-core", package = "cgp-core" } cgp-monad = { workspace = true } cgp-handler = { workspace = true } diff --git a/crates/extra/cgp-error-extra/Cargo.toml b/crates/extra/cgp-error-extra/Cargo.toml index 5b53a3166..ea9b62637 100644 --- a/crates/extra/cgp-error-extra/Cargo.toml +++ b/crates/extra/cgp-error-extra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -18,7 +18,7 @@ default = [] alloc = [] [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../main/cgp-core", package = "cgp-core" } +cgp = { version = "0.8.0-prerelease", path = "../../main/cgp-core", package = "cgp-core" } [package.metadata.docs.rs] all-features = true diff --git a/crates/extra/cgp-field-extra/Cargo.toml b/crates/extra/cgp-field-extra/Cargo.toml index ea7457935..befc6fdcf 100644 --- a/crates/extra/cgp-field-extra/Cargo.toml +++ b/crates/extra/cgp-field-extra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-field-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/extra/cgp-handler/Cargo.toml b/crates/extra/cgp-handler/Cargo.toml index 448a249c2..f2abbba8f 100644 --- a/crates/extra/cgp-handler/Cargo.toml +++ b/crates/extra/cgp-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-handler" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -12,4 +12,4 @@ categories = { workspace = true } description = "CGP's handler family: the computation components and the combinators that compose them." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../main/cgp-core", package = "cgp-core" } +cgp = { version = "0.8.0-prerelease", path = "../../main/cgp-core", package = "cgp-core" } diff --git a/crates/extra/cgp-monad/Cargo.toml b/crates/extra/cgp-monad/Cargo.toml index f7d6d9570..71b023c4b 100644 --- a/crates/extra/cgp-monad/Cargo.toml +++ b/crates/extra/cgp-monad/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-monad" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -12,5 +12,5 @@ categories = { workspace = true } description = "CGP's monadic handlers, which compose handlers through a monad." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../main/cgp-core", package = "cgp-core" } +cgp = { version = "0.8.0-prerelease", path = "../../main/cgp-core", package = "cgp-core" } cgp-handler = { workspace = true } diff --git a/crates/extra/cgp-run/Cargo.toml b/crates/extra/cgp-run/Cargo.toml index de24ffcff..2f9177a3a 100644 --- a/crates/extra/cgp-run/Cargo.toml +++ b/crates/extra/cgp-run/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-run" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -12,4 +12,4 @@ categories = { workspace = true } description = "CGP's task runners, which run a task named by a type-level code." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../main/cgp-core", package = "cgp-core" } +cgp = { version = "0.8.0-prerelease", path = "../../main/cgp-core", package = "cgp-core" } diff --git a/crates/extra/cgp-runtime/Cargo.toml b/crates/extra/cgp-runtime/Cargo.toml index d404acad5..fcd3aaba1 100644 --- a/crates/extra/cgp-runtime/Cargo.toml +++ b/crates/extra/cgp-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-runtime" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -12,4 +12,4 @@ categories = { workspace = true } description = "CGP's runtime abstraction, which lets a context choose its async runtime." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../main/cgp-core", package = "cgp-core" } +cgp = { version = "0.8.0-prerelease", path = "../../main/cgp-core", package = "cgp-core" } diff --git a/crates/macros/cgp-async-macro/Cargo.toml b/crates/macros/cgp-async-macro/Cargo.toml index f72f3669b..fba7aaf83 100644 --- a/crates/macros/cgp-async-macro/Cargo.toml +++ b/crates/macros/cgp-async-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-async-macro" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/macros/cgp-macro-core/Cargo.toml b/crates/macros/cgp-macro-core/Cargo.toml index d42f91efd..bcddc6e97 100644 --- a/crates/macros/cgp-macro-core/Cargo.toml +++ b/crates/macros/cgp-macro-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro-core" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/macros/cgp-macro-extra-core/Cargo.toml b/crates/macros/cgp-macro-extra-core/Cargo.toml index 0db917742..27589d033 100644 --- a/crates/macros/cgp-macro-extra-core/Cargo.toml +++ b/crates/macros/cgp-macro-extra-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro-extra-core" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/macros/cgp-macro-extra-lib/Cargo.toml b/crates/macros/cgp-macro-extra-lib/Cargo.toml index d0307e38b..40259a090 100644 --- a/crates/macros/cgp-macro-extra-lib/Cargo.toml +++ b/crates/macros/cgp-macro-extra-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro-extra-lib" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/macros/cgp-macro-extra/Cargo.toml b/crates/macros/cgp-macro-extra/Cargo.toml index 4078425fb..3feeb97ed 100644 --- a/crates/macros/cgp-macro-extra/Cargo.toml +++ b/crates/macros/cgp-macro-extra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/macros/cgp-macro-lib/Cargo.toml b/crates/macros/cgp-macro-lib/Cargo.toml index 573e96991..0a80da487 100644 --- a/crates/macros/cgp-macro-lib/Cargo.toml +++ b/crates/macros/cgp-macro-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro-lib" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/macros/cgp-macro-test-util-lib/Cargo.toml b/crates/macros/cgp-macro-test-util-lib/Cargo.toml index d613aa199..db5d74585 100644 --- a/crates/macros/cgp-macro-test-util-lib/Cargo.toml +++ b/crates/macros/cgp-macro-test-util-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro-test-util-lib" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/macros/cgp-macro-test-util/Cargo.toml b/crates/macros/cgp-macro-test-util/Cargo.toml index 71c01a0d6..e4a655c3d 100644 --- a/crates/macros/cgp-macro-test-util/Cargo.toml +++ b/crates/macros/cgp-macro-test-util/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro-test-util" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/macros/cgp-macro/Cargo.toml b/crates/macros/cgp-macro/Cargo.toml index b38d4098b..87760fbd9 100644 --- a/crates/macros/cgp-macro/Cargo.toml +++ b/crates/macros/cgp-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/main/cgp-base-extra/Cargo.toml b/crates/main/cgp-base-extra/Cargo.toml index a9dbdcc71..60953481f 100644 --- a/crates/main/cgp-base-extra/Cargo.toml +++ b/crates/main/cgp-base-extra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-base-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/main/cgp-base/Cargo.toml b/crates/main/cgp-base/Cargo.toml index 522142bc3..4e47e5392 100644 --- a/crates/main/cgp-base/Cargo.toml +++ b/crates/main/cgp-base/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-base" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/main/cgp-core/Cargo.toml b/crates/main/cgp-core/Cargo.toml index 94644a9ca..192601034 100644 --- a/crates/main/cgp-core/Cargo.toml +++ b/crates/main/cgp-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-core" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/main/cgp-extra/Cargo.toml b/crates/main/cgp-extra/Cargo.toml index 79778d08b..3f6440723 100644 --- a/crates/main/cgp-extra/Cargo.toml +++ b/crates/main/cgp-extra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-extra" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/main/cgp/Cargo.toml b/crates/main/cgp/Cargo.toml index c177a79bb..1c0674cb8 100644 --- a/crates/main/cgp/Cargo.toml +++ b/crates/main/cgp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" readme = "./README.md" edition = { workspace = true } license = { workspace = true } diff --git a/crates/standalone/error/cgp-error-anyhow/Cargo.toml b/crates/standalone/error/cgp-error-anyhow/Cargo.toml index 82b88f62a..90e41779b 100644 --- a/crates/standalone/error/cgp-error-anyhow/Cargo.toml +++ b/crates/standalone/error/cgp-error-anyhow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error-anyhow" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" readme = "./README.md" edition = { workspace = true } license = { workspace = true } @@ -13,5 +13,5 @@ categories = { workspace = true } description = "CGP error providers that make anyhow::Error a context's abstract error type." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../../main/cgp-core", package = "cgp-core" } +cgp = { version = "0.8.0-prerelease", path = "../../../main/cgp-core", package = "cgp-core" } anyhow = { version = "1.0.104", default-features = false } diff --git a/crates/standalone/error/cgp-error-eyre/Cargo.toml b/crates/standalone/error/cgp-error-eyre/Cargo.toml index b6b0614c7..78651268c 100644 --- a/crates/standalone/error/cgp-error-eyre/Cargo.toml +++ b/crates/standalone/error/cgp-error-eyre/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error-eyre" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" readme = "./README.md" edition = { workspace = true } license = { workspace = true } @@ -13,7 +13,7 @@ categories = [ "rust-patterns" ] description = "CGP error providers that make eyre::Report a context's abstract error type." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../../main/cgp-core", package = "cgp-core" } +cgp = { version = "0.8.0-prerelease", path = "../../../main/cgp-core", package = "cgp-core" } # `auto-install` installs eyre's default report handler on first use. Without it, building any # `eyre::Report` panics unless the application has called `eyre::set_hook` first. # diff --git a/crates/standalone/error/cgp-error-std/Cargo.toml b/crates/standalone/error/cgp-error-std/Cargo.toml index 05daad083..26c3091f3 100644 --- a/crates/standalone/error/cgp-error-std/Cargo.toml +++ b/crates/standalone/error/cgp-error-std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error-std" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" readme = "./README.md" edition = { workspace = true } license = { workspace = true } @@ -13,4 +13,4 @@ categories = { workspace = true } description = "CGP error providers that make a boxed core::error::Error a context's abstract error type." [dependencies] -cgp = { version = "0.8.0-alpha", path = "../../../main/cgp-core", package = "cgp-core" } +cgp = { version = "0.8.0-prerelease", path = "../../../main/cgp-core", package = "cgp-core" } diff --git a/crates/tests/cgp-macro-tests/Cargo.toml b/crates/tests/cgp-macro-tests/Cargo.toml index b3fe5823e..4512f4d2e 100644 --- a/crates/tests/cgp-macro-tests/Cargo.toml +++ b/crates/tests/cgp-macro-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro-tests" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" publish = false edition = { workspace = true } license = { workspace = true } diff --git a/crates/tests/cgp-no-std-tests/Cargo.toml b/crates/tests/cgp-no-std-tests/Cargo.toml index 74f564ddd..998661ec2 100644 --- a/crates/tests/cgp-no-std-tests/Cargo.toml +++ b/crates/tests/cgp-no-std-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-no-std-tests" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" edition = { workspace = true } rust-version = { workspace = true } license = { workspace = true } diff --git a/crates/tests/cgp-tests/Cargo.toml b/crates/tests/cgp-tests/Cargo.toml index b4c3fb204..a9b34c4d1 100644 --- a/crates/tests/cgp-tests/Cargo.toml +++ b/crates/tests/cgp-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-tests" -version = "0.8.0-alpha" +version = "0.8.0-prerelease" publish = false edition = { workspace = true } license = { workspace = true } From 7fa041891aaeade76302d5421097a3861e47e617 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Mon, 16 Nov 2026 21:47:14 +0100 Subject: [PATCH 2/3] Ship the license file in every published crate Each published crate links the workspace LICENSE, so cargo packages a copy of the Apache-2.0 text with it; the packages carried only the license field before. Co-Authored-By: Claude Opus 5.5 --- crates/core/cgp-base-types/LICENSE | 1 + crates/core/cgp-component/LICENSE | 1 + crates/core/cgp-error/LICENSE | 1 + crates/core/cgp-field/LICENSE | 1 + crates/core/cgp-type/LICENSE | 1 + crates/extra/cgp-dispatch/LICENSE | 1 + crates/extra/cgp-error-extra/LICENSE | 1 + crates/extra/cgp-field-extra/LICENSE | 1 + crates/extra/cgp-handler/LICENSE | 1 + crates/extra/cgp-monad/LICENSE | 1 + crates/extra/cgp-run/LICENSE | 1 + crates/extra/cgp-runtime/LICENSE | 1 + crates/macros/cgp-async-macro/LICENSE | 1 + crates/macros/cgp-macro-core/LICENSE | 1 + crates/macros/cgp-macro-extra-core/LICENSE | 1 + crates/macros/cgp-macro-extra-lib/LICENSE | 1 + crates/macros/cgp-macro-extra/LICENSE | 1 + crates/macros/cgp-macro-lib/LICENSE | 1 + crates/macros/cgp-macro-test-util-lib/LICENSE | 1 + crates/macros/cgp-macro-test-util/LICENSE | 1 + crates/macros/cgp-macro/LICENSE | 1 + crates/main/cgp-base-extra/LICENSE | 1 + crates/main/cgp-base/LICENSE | 1 + crates/main/cgp-core/LICENSE | 1 + crates/main/cgp-extra/LICENSE | 1 + crates/main/cgp/LICENSE | 1 + crates/standalone/error/cgp-error-anyhow/LICENSE | 1 + crates/standalone/error/cgp-error-eyre/LICENSE | 1 + crates/standalone/error/cgp-error-std/LICENSE | 1 + 29 files changed, 29 insertions(+) create mode 120000 crates/core/cgp-base-types/LICENSE create mode 120000 crates/core/cgp-component/LICENSE create mode 120000 crates/core/cgp-error/LICENSE create mode 120000 crates/core/cgp-field/LICENSE create mode 120000 crates/core/cgp-type/LICENSE create mode 120000 crates/extra/cgp-dispatch/LICENSE create mode 120000 crates/extra/cgp-error-extra/LICENSE create mode 120000 crates/extra/cgp-field-extra/LICENSE create mode 120000 crates/extra/cgp-handler/LICENSE create mode 120000 crates/extra/cgp-monad/LICENSE create mode 120000 crates/extra/cgp-run/LICENSE create mode 120000 crates/extra/cgp-runtime/LICENSE create mode 120000 crates/macros/cgp-async-macro/LICENSE create mode 120000 crates/macros/cgp-macro-core/LICENSE create mode 120000 crates/macros/cgp-macro-extra-core/LICENSE create mode 120000 crates/macros/cgp-macro-extra-lib/LICENSE create mode 120000 crates/macros/cgp-macro-extra/LICENSE create mode 120000 crates/macros/cgp-macro-lib/LICENSE create mode 120000 crates/macros/cgp-macro-test-util-lib/LICENSE create mode 120000 crates/macros/cgp-macro-test-util/LICENSE create mode 120000 crates/macros/cgp-macro/LICENSE create mode 120000 crates/main/cgp-base-extra/LICENSE create mode 120000 crates/main/cgp-base/LICENSE create mode 120000 crates/main/cgp-core/LICENSE create mode 120000 crates/main/cgp-extra/LICENSE create mode 120000 crates/main/cgp/LICENSE create mode 120000 crates/standalone/error/cgp-error-anyhow/LICENSE create mode 120000 crates/standalone/error/cgp-error-eyre/LICENSE create mode 120000 crates/standalone/error/cgp-error-std/LICENSE diff --git a/crates/core/cgp-base-types/LICENSE b/crates/core/cgp-base-types/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/core/cgp-base-types/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/core/cgp-component/LICENSE b/crates/core/cgp-component/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/core/cgp-component/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/core/cgp-error/LICENSE b/crates/core/cgp-error/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/core/cgp-error/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/core/cgp-field/LICENSE b/crates/core/cgp-field/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/core/cgp-field/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/core/cgp-type/LICENSE b/crates/core/cgp-type/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/core/cgp-type/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/extra/cgp-dispatch/LICENSE b/crates/extra/cgp-dispatch/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/extra/cgp-dispatch/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/extra/cgp-error-extra/LICENSE b/crates/extra/cgp-error-extra/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/extra/cgp-error-extra/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/extra/cgp-field-extra/LICENSE b/crates/extra/cgp-field-extra/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/extra/cgp-field-extra/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/extra/cgp-handler/LICENSE b/crates/extra/cgp-handler/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/extra/cgp-handler/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/extra/cgp-monad/LICENSE b/crates/extra/cgp-monad/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/extra/cgp-monad/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/extra/cgp-run/LICENSE b/crates/extra/cgp-run/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/extra/cgp-run/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/extra/cgp-runtime/LICENSE b/crates/extra/cgp-runtime/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/extra/cgp-runtime/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/macros/cgp-async-macro/LICENSE b/crates/macros/cgp-async-macro/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/macros/cgp-async-macro/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/macros/cgp-macro-core/LICENSE b/crates/macros/cgp-macro-core/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/macros/cgp-macro-core/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/macros/cgp-macro-extra-core/LICENSE b/crates/macros/cgp-macro-extra-core/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/macros/cgp-macro-extra-core/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/macros/cgp-macro-extra-lib/LICENSE b/crates/macros/cgp-macro-extra-lib/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/macros/cgp-macro-extra-lib/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/macros/cgp-macro-extra/LICENSE b/crates/macros/cgp-macro-extra/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/macros/cgp-macro-extra/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/macros/cgp-macro-lib/LICENSE b/crates/macros/cgp-macro-lib/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/macros/cgp-macro-lib/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/macros/cgp-macro-test-util-lib/LICENSE b/crates/macros/cgp-macro-test-util-lib/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/macros/cgp-macro-test-util-lib/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/macros/cgp-macro-test-util/LICENSE b/crates/macros/cgp-macro-test-util/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/macros/cgp-macro-test-util/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/macros/cgp-macro/LICENSE b/crates/macros/cgp-macro/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/macros/cgp-macro/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/main/cgp-base-extra/LICENSE b/crates/main/cgp-base-extra/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/main/cgp-base-extra/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/main/cgp-base/LICENSE b/crates/main/cgp-base/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/main/cgp-base/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/main/cgp-core/LICENSE b/crates/main/cgp-core/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/main/cgp-core/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/main/cgp-extra/LICENSE b/crates/main/cgp-extra/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/main/cgp-extra/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/main/cgp/LICENSE b/crates/main/cgp/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/crates/main/cgp/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/crates/standalone/error/cgp-error-anyhow/LICENSE b/crates/standalone/error/cgp-error-anyhow/LICENSE new file mode 120000 index 000000000..147761543 --- /dev/null +++ b/crates/standalone/error/cgp-error-anyhow/LICENSE @@ -0,0 +1 @@ +../../../../LICENSE \ No newline at end of file diff --git a/crates/standalone/error/cgp-error-eyre/LICENSE b/crates/standalone/error/cgp-error-eyre/LICENSE new file mode 120000 index 000000000..147761543 --- /dev/null +++ b/crates/standalone/error/cgp-error-eyre/LICENSE @@ -0,0 +1 @@ +../../../../LICENSE \ No newline at end of file diff --git a/crates/standalone/error/cgp-error-std/LICENSE b/crates/standalone/error/cgp-error-std/LICENSE new file mode 120000 index 000000000..147761543 --- /dev/null +++ b/crates/standalone/error/cgp-error-std/LICENSE @@ -0,0 +1 @@ +../../../../LICENSE \ No newline at end of file From acb5f80f56c54a200fed5c82aa17db3358cd3141 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Mon, 16 Nov 2026 21:54:02 +0100 Subject: [PATCH 3/3] Give every published crate a README and link the cgp README's API Each crate that lacked a README gains one describing what it provides, where the cgp crate re-exports it, and where to learn more, so its crates.io page explains it. The cgp crate's README links each construct it names to its docs.rs page, and #[implicit] to its reference page, since it has no API item of its own. cgp-macro-test-util's README links the test suite's rules and its companion crate by URL, since relative links do not resolve on crates.io. Co-Authored-By: Claude Opus 5.5 --- crates/core/cgp-base-types/README.md | 13 +++++ crates/core/cgp-component/README.md | 12 +++++ crates/core/cgp-error/README.md | 12 +++++ crates/core/cgp-field/README.md | 13 +++++ crates/core/cgp-type/README.md | 11 ++++ crates/extra/cgp-dispatch/README.md | 12 +++++ crates/extra/cgp-error-extra/README.md | 13 +++++ crates/extra/cgp-field-extra/README.md | 12 +++++ crates/extra/cgp-handler/README.md | 12 +++++ crates/extra/cgp-monad/README.md | 12 +++++ crates/extra/cgp-run/README.md | 11 ++++ crates/extra/cgp-runtime/README.md | 11 ++++ crates/macros/cgp-async-macro/README.md | 11 ++++ crates/macros/cgp-macro-core/README.md | 11 ++++ crates/macros/cgp-macro-extra-core/README.md | 11 ++++ crates/macros/cgp-macro-extra-lib/README.md | 10 ++++ crates/macros/cgp-macro-extra/README.md | 12 +++++ crates/macros/cgp-macro-lib/README.md | 10 ++++ .../macros/cgp-macro-test-util-lib/README.md | 11 ++++ crates/macros/cgp-macro-test-util/README.md | 4 +- crates/macros/cgp-macro/README.md | 12 +++++ crates/main/cgp-base-extra/README.md | 12 +++++ crates/main/cgp-base/README.md | 11 ++++ crates/main/cgp-core/README.md | 11 ++++ crates/main/cgp-extra/README.md | 13 +++++ crates/main/cgp/README.md | 54 +++++++++++-------- 26 files changed, 314 insertions(+), 23 deletions(-) create mode 100644 crates/core/cgp-base-types/README.md create mode 100644 crates/core/cgp-component/README.md create mode 100644 crates/core/cgp-error/README.md create mode 100644 crates/core/cgp-field/README.md create mode 100644 crates/core/cgp-type/README.md create mode 100644 crates/extra/cgp-dispatch/README.md create mode 100644 crates/extra/cgp-error-extra/README.md create mode 100644 crates/extra/cgp-field-extra/README.md create mode 100644 crates/extra/cgp-handler/README.md create mode 100644 crates/extra/cgp-monad/README.md create mode 100644 crates/extra/cgp-run/README.md create mode 100644 crates/extra/cgp-runtime/README.md create mode 100644 crates/macros/cgp-async-macro/README.md create mode 100644 crates/macros/cgp-macro-core/README.md create mode 100644 crates/macros/cgp-macro-extra-core/README.md create mode 100644 crates/macros/cgp-macro-extra-lib/README.md create mode 100644 crates/macros/cgp-macro-extra/README.md create mode 100644 crates/macros/cgp-macro-lib/README.md create mode 100644 crates/macros/cgp-macro-test-util-lib/README.md create mode 100644 crates/macros/cgp-macro/README.md create mode 100644 crates/main/cgp-base-extra/README.md create mode 100644 crates/main/cgp-base/README.md create mode 100644 crates/main/cgp-core/README.md create mode 100644 crates/main/cgp-extra/README.md diff --git a/crates/core/cgp-base-types/README.md b/crates/core/cgp-base-types/README.md new file mode 100644 index 000000000..e3231a17b --- /dev/null +++ b/crates/core/cgp-base-types/README.md @@ -0,0 +1,13 @@ +# cgp-base-types + +`cgp-base-types` provides the type-level primitives of Context-Generic Programming (CGP): the +symbols that name fields, the lists and sums that describe a type's fields and variants, and the +paths that namespaces route along. + +The `cgp` crate re-exports these types under `cgp::core::base`, and the macros that build them, such +as `Symbol!` and `Product!`, under `cgp::prelude`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/core/cgp-component/README.md b/crates/core/cgp-component/README.md new file mode 100644 index 000000000..48184bfe0 --- /dev/null +++ b/crates/core/cgp-component/README.md @@ -0,0 +1,12 @@ +# cgp-component + +`cgp-component` provides the component machinery of Context-Generic Programming (CGP): the +delegation traits that let a context choose a provider for each component, the lookup that finds +that provider, and the providers CGP ships with. + +The `cgp` crate re-exports it as `cgp::core::component`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/core/cgp-error/README.md b/crates/core/cgp-error/README.md new file mode 100644 index 000000000..515e50682 --- /dev/null +++ b/crates/core/cgp-error/README.md @@ -0,0 +1,12 @@ +# cgp-error + +`cgp-error` provides the error components of Context-Generic Programming (CGP): an error type that +each context chooses, and the components that raise errors into it and wrap them with detail. + +The `cgp` crate re-exports it as `cgp::core::error`, and its traits `HasErrorType`, `CanRaiseError`, +and `CanWrapError` under `cgp::prelude`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/core/cgp-field/README.md b/crates/core/cgp-field/README.md new file mode 100644 index 000000000..cce455386 --- /dev/null +++ b/crates/core/cgp-field/README.md @@ -0,0 +1,13 @@ +# cgp-field + +`cgp-field` provides the field access of Context-Generic Programming (CGP): the traits that read and +build a type's fields by name, the tags that name them, and the structural casts between records and +between enums. + +The `cgp` crate re-exports it as `cgp::core::field`, and the derives that implement its traits under +`cgp::prelude`. Most projects therefore depend on [`cgp`](https://crates.io/crates/cgp) alone, +without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/core/cgp-type/README.md b/crates/core/cgp-type/README.md new file mode 100644 index 000000000..e5c6eee09 --- /dev/null +++ b/crates/core/cgp-type/README.md @@ -0,0 +1,11 @@ +# cgp-type + +`cgp-type` provides the abstract types of Context-Generic Programming (CGP), which let each context +choose a type that generic code names only through a trait. + +The `cgp` crate re-exports it as `cgp::core::types`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/extra/cgp-dispatch/README.md b/crates/extra/cgp-dispatch/README.md new file mode 100644 index 000000000..8b915ad72 --- /dev/null +++ b/crates/extra/cgp-dispatch/README.md @@ -0,0 +1,12 @@ +# cgp-dispatch + +`cgp-dispatch` provides the dispatch combinators of Context-Generic Programming (CGP), which split a +value between handlers. They match an enum's variants or extract a record's fields and pass each one +to its own handler, or build a record from what the handlers return. + +The `cgp` crate re-exports it as `cgp::extra::dispatch`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/extra/cgp-error-extra/README.md b/crates/extra/cgp-error-extra/README.md new file mode 100644 index 000000000..7dc8d03a2 --- /dev/null +++ b/crates/extra/cgp-error-extra/README.md @@ -0,0 +1,13 @@ +# cgp-error-extra + +`cgp-error-extra` provides the generic error providers of Context-Generic Programming (CGP), which +raise an error by conversion, return it unchanged, discard a detail, or format it into a message. +The `DebugError` and `DisplayError` providers need an allocator, so they sit behind the `alloc` +feature. + +The `cgp` crate re-exports it as `cgp::extra::error`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/extra/cgp-field-extra/README.md b/crates/extra/cgp-field-extra/README.md new file mode 100644 index 000000000..0bb4645df --- /dev/null +++ b/crates/extra/cgp-field-extra/README.md @@ -0,0 +1,12 @@ +# cgp-field-extra + +`cgp-field-extra` provides the optional-field layer of Context-Generic Programming (CGP), which +builds a value from fields set in any order. The builder finishes once every field is set, or fills +the missing ones from their defaults. + +The `cgp` crate re-exports it as `cgp::extra::field`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/extra/cgp-handler/README.md b/crates/extra/cgp-handler/README.md new file mode 100644 index 000000000..adc3ab1b9 --- /dev/null +++ b/crates/extra/cgp-handler/README.md @@ -0,0 +1,12 @@ +# cgp-handler + +`cgp-handler` provides the handler family of Context-Generic Programming (CGP): the components that +model a computation, whether synchronous or async and fallible or not, and the combinators that +chain, nest, and promote them. + +The `cgp` crate re-exports it as `cgp::extra::handler`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/extra/cgp-monad/README.md b/crates/extra/cgp-monad/README.md new file mode 100644 index 000000000..1e6d1033f --- /dev/null +++ b/crates/extra/cgp-monad/README.md @@ -0,0 +1,12 @@ +# cgp-monad + +`cgp-monad` provides the monadic handlers of Context-Generic Programming (CGP), which compose +handlers through a monad that decides whether each step runs, such as one that stops a pipeline at +its first error. + +The `cgp` crate re-exports it as `cgp::extra::monad`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/extra/cgp-run/README.md b/crates/extra/cgp-run/README.md new file mode 100644 index 000000000..da870f424 --- /dev/null +++ b/crates/extra/cgp-run/README.md @@ -0,0 +1,11 @@ +# cgp-run + +`cgp-run` provides the task runners of Context-Generic Programming (CGP), the components that run a +task named by a type-level code. + +The `cgp` crate re-exports it as `cgp::extra::run`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/extra/cgp-runtime/README.md b/crates/extra/cgp-runtime/README.md new file mode 100644 index 000000000..950982c33 --- /dev/null +++ b/crates/extra/cgp-runtime/README.md @@ -0,0 +1,11 @@ +# cgp-runtime + +`cgp-runtime` provides the runtime abstraction of Context-Generic Programming (CGP), which lets each +context choose its async runtime while generic code reaches it through a trait. + +The `cgp` crate re-exports it as `cgp::extra::runtime`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/macros/cgp-async-macro/README.md b/crates/macros/cgp-async-macro/README.md new file mode 100644 index 000000000..8b2db6969 --- /dev/null +++ b/crates/macros/cgp-async-macro/README.md @@ -0,0 +1,11 @@ +# cgp-async-macro + +`cgp-async-macro` provides the `#[async_trait]` macro of Context-Generic Programming (CGP), which +rewrites each `async fn` in a trait to return `impl Future`, without boxing the future. + +The `cgp` crate re-exports the macro under `cgp::prelude`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/macros/cgp-macro-core/README.md b/crates/macros/cgp-macro-core/README.md new file mode 100644 index 000000000..c79404cf0 --- /dev/null +++ b/crates/macros/cgp-macro-core/README.md @@ -0,0 +1,11 @@ +# cgp-macro-core + +`cgp-macro-core` holds the shared core of the procedural macros of Context-Generic Programming +(CGP): the syntax trees, parsers, visitors, and code-generation helpers that the macro crates build +on. + +Projects use the macros through `cgp::prelude` and have no reason to depend on this crate. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/macros/cgp-macro-extra-core/README.md b/crates/macros/cgp-macro-extra-core/README.md new file mode 100644 index 000000000..7ddd2f357 --- /dev/null +++ b/crates/macros/cgp-macro-extra-core/README.md @@ -0,0 +1,11 @@ +# cgp-macro-extra-core + +`cgp-macro-extra-core` holds the shared core of the extra procedural macros of Context-Generic +Programming (CGP): the syntax trees, parsers, and visitors behind `#[cgp_computer]`, +`#[cgp_producer]`, and `#[cgp_auto_dispatch]`. + +Projects use the macros through `cgp::prelude` and have no reason to depend on this crate. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/macros/cgp-macro-extra-lib/README.md b/crates/macros/cgp-macro-extra-lib/README.md new file mode 100644 index 000000000..1a80bfc16 --- /dev/null +++ b/crates/macros/cgp-macro-extra-lib/README.md @@ -0,0 +1,10 @@ +# cgp-macro-extra-lib + +`cgp-macro-extra-lib` implements the extra procedural macros of Context-Generic Programming (CGP) +that `cgp-macro-extra` exports: `#[cgp_computer]`, `#[cgp_producer]`, and `#[cgp_auto_dispatch]`. + +Projects use the macros through `cgp::prelude` and have no reason to depend on this crate. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/macros/cgp-macro-extra/README.md b/crates/macros/cgp-macro-extra/README.md new file mode 100644 index 000000000..164c4b17d --- /dev/null +++ b/crates/macros/cgp-macro-extra/README.md @@ -0,0 +1,12 @@ +# cgp-macro-extra + +`cgp-macro-extra` provides the extra procedural macros of Context-Generic Programming (CGP): +`#[cgp_computer]` and `#[cgp_producer]`, which define a handler provider from a function, and +`#[cgp_auto_dispatch]`, which implements a trait for an enum by dispatching to its variants. + +The `cgp` crate re-exports these macros under `cgp::prelude`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/macros/cgp-macro-lib/README.md b/crates/macros/cgp-macro-lib/README.md new file mode 100644 index 000000000..ccff7f6e6 --- /dev/null +++ b/crates/macros/cgp-macro-lib/README.md @@ -0,0 +1,10 @@ +# cgp-macro-lib + +`cgp-macro-lib` implements the procedural macros of Context-Generic Programming (CGP), one module +per macro. The `cgp-macro` crate exports them. + +Projects use the macros through `cgp::prelude` and have no reason to depend on this crate. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/macros/cgp-macro-test-util-lib/README.md b/crates/macros/cgp-macro-test-util-lib/README.md new file mode 100644 index 000000000..6bed6e4d5 --- /dev/null +++ b/crates/macros/cgp-macro-test-util-lib/README.md @@ -0,0 +1,11 @@ +# cgp-macro-test-util-lib + +`cgp-macro-test-util-lib` implements the snapshot-testing macros of Context-Generic Programming +(CGP) that `cgp-macro-test-util` exports. CGP's own tests use them to emit the code a CGP macro +generates and pin it as an inline snapshot. + +Projects that use CGP have no reason to depend on this crate. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/macros/cgp-macro-test-util/README.md b/crates/macros/cgp-macro-test-util/README.md index 6a3763e12..250f5e873 100644 --- a/crates/macros/cgp-macro-test-util/README.md +++ b/crates/macros/cgp-macro-test-util/README.md @@ -16,14 +16,14 @@ changes only the golden assertion, never the compile-time or runtime coverage. Two documents carry what this README does not. The [implementation document](https://github.com/contextgeneric/cgp-knowledge-base/blob/main/cgp/implementation/entrypoints/snapshot_macros.md) in the knowledge base explains how the macros are built and what an invocation -expands to; the [test suite's rules](../../tests/README.md#snapshots) set the convention for +expands to; the [test suite's rules](https://github.com/contextgeneric/cgp/blob/main/crates/tests/README.md#snapshots) set the convention for *when* to snapshot: a macro's expansion is pinned only in the concept target that owns that macro's feature, and written plainly everywhere else. ## Crate layout This is the proc-macro crate, a thin shell: every macro forwards to -[`cgp-macro-test-util-lib`](../cgp-macro-test-util-lib), a normal library crate so +[`cgp-macro-test-util-lib`](https://crates.io/crates/cgp-macro-test-util-lib), a normal library crate so the logic can be unit-tested without the `proc-macro = true` restriction. ``` diff --git a/crates/macros/cgp-macro/README.md b/crates/macros/cgp-macro/README.md new file mode 100644 index 000000000..b6691f65f --- /dev/null +++ b/crates/macros/cgp-macro/README.md @@ -0,0 +1,12 @@ +# cgp-macro + +`cgp-macro` provides the procedural macros of Context-Generic Programming (CGP), from +`#[cgp_component]`, which defines a component, and `#[cgp_impl]`, which writes a provider, to +`delegate_components!` and `check_components!`, which wire and check a context. + +The `cgp` crate re-exports these macros under `cgp::prelude`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/main/cgp-base-extra/README.md b/crates/main/cgp-base-extra/README.md new file mode 100644 index 000000000..b6c4e838e --- /dev/null +++ b/crates/main/cgp-base-extra/README.md @@ -0,0 +1,12 @@ +# cgp-base-extra + +`cgp-base-extra` gathers the base layer of Context-Generic Programming (CGP) together with its +abstract types, the foundation that CGP's error components are built on. + +It is an internal layer of the `cgp` crate, which re-exports everything it holds under `cgp::core`. +Most projects therefore depend on [`cgp`](https://crates.io/crates/cgp) alone, without adding this +crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/main/cgp-base/README.md b/crates/main/cgp-base/README.md new file mode 100644 index 000000000..a4c8d6f03 --- /dev/null +++ b/crates/main/cgp-base/README.md @@ -0,0 +1,11 @@ +# cgp-base + +`cgp-base` gathers the base layer of Context-Generic Programming (CGP): the type-level primitives, +the component machinery, and the procedural macros, which CGP's higher layers build on. + +The `cgp` crate re-exports it as `cgp::core::base`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/main/cgp-core/README.md b/crates/main/cgp-core/README.md new file mode 100644 index 000000000..4a0047e3b --- /dev/null +++ b/crates/main/cgp-core/README.md @@ -0,0 +1,11 @@ +# cgp-core + +`cgp-core` gathers the core of Context-Generic Programming (CGP): the base layer and the procedural +macros, the `#[async_trait]` macro, and the error, field, and abstract-type components. + +The `cgp` crate re-exports it as `cgp::core`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/main/cgp-extra/README.md b/crates/main/cgp-extra/README.md new file mode 100644 index 000000000..b13c7b8de --- /dev/null +++ b/crates/main/cgp-extra/README.md @@ -0,0 +1,13 @@ +# cgp-extra + +`cgp-extra` gathers the extra features of Context-Generic Programming (CGP): the handlers that model +computations, the dispatch and monadic combinators that compose them, task runners and the runtime +abstraction, the optional-field builders, and the generic error providers. Its `alloc` feature turns +on the providers that need an allocator. + +The `cgp` crate re-exports it as `cgp::extra`. Most projects therefore depend on +[`cgp`](https://crates.io/crates/cgp) alone, without adding this crate to their manifest. + +To learn more, read the [`cgp` crate's documentation](https://docs.rs/cgp) and the +[CGP website](https://contextgeneric.dev/), which covers everything from a first program to the +reference for each construct. diff --git a/crates/main/cgp/README.md b/crates/main/cgp/README.md index 96dd26be3..54624532f 100644 --- a/crates/main/cgp/README.md +++ b/crates/main/cgp/README.md @@ -10,15 +10,19 @@ the same type has to use a wrapper type or a second trait. Context-Generic Progr works around that limit: one trait can have many interchangeable implementations, called *providers*, and each *context* chooses the one it uses through a small wiring table. -To get started, use this crate: it re-exports the crates that provide CGP under `cgp::core` and -`cgp::extra`, and gathers the names you write in `cgp::prelude`. +To get started, depend on this crate alone. It re-exports the crates that provide CGP under +[`cgp::core`][cgp-core] and [`cgp::extra`][cgp-extra], and gathers the names you write in +[`cgp::prelude`][cgp-prelude]. ## A quick look -A greeting shows how these pieces fit together. The example below defines a greeting component -and a provider that reads a name, then wires `Person` to that provider. Here `Person` holds the data -being greeted. The `check_components!` line checks the wiring at compile time, making the build -fail if `Person` lacks the `name` field the provider reads: +A greeting shows how these pieces fit together. [`#[cgp_component]`][cgp-component] turns the +`CanGreet` trait into a component, and [`#[cgp_impl]`][cgp-impl] writes `GreetHello`, a provider +whose [`#[implicit]`][implicit] argument reads the context's `name` field. +[`#[derive(HasField)]`][derive-hasfield] lets `Person` expose that field, and +[`delegate_components!`][delegate-components] wires `Person` to the provider. Finally, +[`check_components!`][check-components] checks the wiring at compile time, so the build fails if +`Person` lacks a field the provider reads: ```rust use cgp::prelude::*; @@ -63,9 +67,9 @@ cargo add cgp ``` CGP needs Rust 1.89 or newer on the stable toolchain. With its default features, it needs neither -`std` nor `alloc`, so it builds for `no_std` targets as well. The `DebugError` and `DisplayError` -providers format an error into a `String`, so using them requires an allocator and the `alloc` -feature: +`std` nor `alloc`, so it builds for `no_std` targets as well. The [`DebugError`][debugerror] and +[`DisplayError`][displayerror] providers format an error into a `String`, so using them requires an +allocator and the `alloc` feature: ```toml [dependencies] @@ -73,9 +77,9 @@ cgp = { version = "0.8.0", features = ["alloc"] } ``` Once you start writing CGP, install [`cargo-cgp`](https://github.com/contextgeneric/cargo-cgp) -alongside it to help diagnose wiring mistakes. These otherwise show up as errors about generated -types. `cargo cgp check` leads with the root cause for the classes it recognizes, and the tool does -not yet reshape every class. +alongside it to help diagnose wiring mistakes, which otherwise show up as errors about generated +types. `cargo cgp check` leads with the root cause for the classes of error it recognizes, though +it does not yet reshape every class. ## Learn CGP @@ -91,12 +95,20 @@ everything from your first program to the details of individual constructs: generate? - [Costs and maturity](https://contextgeneric.dev/#costs): what should I weigh before adopting it? -For details about individual API items, use the documentation on docs.rs. Each construct's -documentation also links to the website's reference page explaining how to use it, where one is -available. If you work with a coding agent, the site's -[AI-assisted development](https://contextgeneric.dev/docs/ai/) section explains the agent skill -and the knowledge base it draws on. - -## License - -Licensed under the [Apache License, Version 2.0](https://github.com/contextgeneric/cgp/blob/main/LICENSE). +For details about individual API items, use the documentation on [docs.rs](https://docs.rs/cgp). +Where the website has a reference page for a construct, that construct's documentation links to it. +If you work with a coding agent, the site's +[AI-assisted development](https://contextgeneric.dev/docs/ai/) section explains the agent skill and +the knowledge base it draws on. + +[cgp-core]: https://docs.rs/cgp/latest/cgp/core/index.html +[cgp-extra]: https://docs.rs/cgp/latest/cgp/extra/index.html +[cgp-prelude]: https://docs.rs/cgp/latest/cgp/prelude/index.html +[cgp-component]: https://docs.rs/cgp/latest/cgp/prelude/attr.cgp_component.html +[cgp-impl]: https://docs.rs/cgp/latest/cgp/prelude/attr.cgp_impl.html +[implicit]: https://contextgeneric.dev/docs/reference/attributes/implicit +[derive-hasfield]: https://docs.rs/cgp/latest/cgp/prelude/derive.HasField.html +[delegate-components]: https://docs.rs/cgp/latest/cgp/prelude/macro.delegate_components.html +[check-components]: https://docs.rs/cgp/latest/cgp/prelude/macro.check_components.html +[debugerror]: https://docs.rs/cgp/latest/cgp/extra/error/struct.DebugError.html +[displayerror]: https://docs.rs/cgp/latest/cgp/extra/error/struct.DisplayError.html