-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add cgp and cgp-extra placeholder crates * Update crate readme * Update Cargo.toml * Update readme
- Loading branch information
1 parent
c545eb3
commit edae1a9
Showing
30 changed files
with
144 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
resolver = "2" | ||
|
||
members = [ | ||
"crates/cgp", | ||
"crates/cgp-core", | ||
"crates/cgp-extra", | ||
"crates/cgp-async", | ||
"crates/cgp-async-macro", | ||
"crates/cgp-sync", | ||
|
@@ -15,20 +18,21 @@ members = [ | |
"crates/cgp-error", | ||
"crates/cgp-error-eyre", | ||
"crates/cgp-error-std", | ||
"crates/cgp-core", | ||
"crates/cgp-run", | ||
"crates/cgp-inner", | ||
] | ||
|
||
[workspace.package] | ||
rust-version = "1.75" | ||
rust-version = "1.79" | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
repository = "https://github.com/informalsystems/cgp" | ||
repository = "https://github.com/contextgeneric/cgp" | ||
authors = ["Informal Systems <[email protected]>", "Soares Chen <[email protected]>"] | ||
|
||
[patch.crates-io] | ||
cgp = { path = "./crates/cgp" } | ||
cgp-core = { path = "./crates/cgp-core" } | ||
cgp-extra = { path = "./crates/cgp-extra" } | ||
cgp-async = { path = "./crates/cgp-async" } | ||
cgp-async-macro = { path = "./crates/cgp-async-macro" } | ||
cgp-sync = { path = "./crates/cgp-sync" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,37 @@ | ||
|
||
# Context-generic programming | ||
# `cgp` - Context-Generic Programming Libraries in Rust | ||
|
||
[![Apache 2.0 Licensed](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](https://github.com/informalsystems/cgp/blob/master/LICENSE) | ||
![Rust Stable](https://img.shields.io/badge/rustc-stable-blue.svg) | ||
![Rust 1.79+](https://img.shields.io/badge/rustc-1.79+-blue.svg) | ||
|
||
## Overview | ||
|
||
The `cgp` project contains a collection of micro Rust crates that empowers | ||
_context-generic programming_ (CGP), a new programming paradigm in Rust. | ||
To learn more about context-generic programming, check out the book | ||
[Context-Generic Programming Patterns](https://patterns.contextgeneric.dev/). | ||
|
||
## 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`](./crates/cgp/) - The main crate that includes all child crates defined in this project. | ||
- [`cgp-core`](./crates/cgp-core) - Meta crate that includes core CGP crates that | ||
- [`cgp-extra`](./crates/cgp-extra) - Meta crate that includes additional CGP crates that may be non-essential or unstable. | ||
|
||
The following library crates are provided: | ||
|
||
- [`cgp-component`](./crates/cgp-component) - Defines the core CGP component traits and macros. | ||
- [`cgp-async`](./crates/cgp-async/) - Defines the `Async` trait as an alias for async-safe types. | ||
- [`cgp-error`](./crates/cgp-error/) - Defines the `HasErrorType` component and error handling constructs. | ||
- [`cgp-field`](./crates/cgp-field/) - Defines the `HasField` trait to enable the use of data-generic programming with CGP. | ||
- [`cgp-inner`](./crates/cgp-inner/) - Defines the `HasInner` component which enables composition-based implementation in CGP. | ||
- [`cgp-run`](./crates/cgp-run) - Defines the `CanRun` component for implementing async runners. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "cgp-extra" | ||
version = "0.1.0" | ||
edition = { workspace = true } | ||
license = { workspace = true } | ||
repository = { workspace = true } | ||
authors = { workspace = true } | ||
rust-version = { workspace = true } | ||
keywords = ["context-generic programming"] | ||
description = """ | ||
Context-generic programming extra meta-crate | ||
""" | ||
|
||
[dependencies] | ||
cgp-run = { version = "0.1.0" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub use cgp_run as run; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.