GregoryConrad / rearch-rs

Re-imagined approach to application design and architecture
https://crates.io/crates/rearch
MIT License
81 stars 4 forks source link

1.0.0 (for just ReArch) #24

Open GregoryConrad opened 8 months ago

GregoryConrad commented 8 months ago

This issue only covers the 1.0.0 for the rearch crate. The other crates are not close to a 1.0, mostly due to limitations in the Rust compiler.

TODO:

[capsule]

fn count_capsule() -> u32 { yield Get(count_manager).0 }


- [x] Maybe rename `Capsule` to `TraditionalCapsule` to accommodate the future addition of coroutines (to prevent breaking change or ugly API), and then have a private `Capsule` trait that `TraditionalCapsule` has a blanket impl for.
- [x] Make `Capsule` (or `TraditionalCapsule`) take `From<CapsuleHandle>` as input so that capsules can be defined with just `CapsuleReader` or `SideEffectRegistrar` parameters.
  - Not possible because the `From<CapsuleHandle>` results in an unconstrained type parameter. 
- [x] Maybe make `Container::with_read_txn`, `Container::with_write_txn`, `ContainerReadTxn`, and `ContainerWriteTxn` crate private for a 1.0.0 to allow for extensibility or changes in the future
  - Although I do understand the use-cases for making them public for others to interop with. 
  - Maybe we can make an "experimental" feature so people that want to use them probably can, at the cost of having to pin ReArch to a particular version.
  - Update: moved all of these APIs under the `experimental-txn` feature.
- [x] Test `MockCapsuleReaderBuilder`