GregoryConrad / rearch-rs

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

`no_std` support #47

Closed GregoryConrad closed 5 months ago

GregoryConrad commented 5 months ago

With #46, we will no longer have concread. Thus, it should now be possible to support no_std (either via BTree or via a simple hash based hashmap/hashset--do a benchmark)

GregoryConrad commented 5 months ago

I've realized a few things while working on this:

Due to the above, closing this as a won't-fix for now, although I really would like to have no_std support 😕

GregoryConrad commented 2 months ago

Integrating lock_api directly to be generic over the specific implementation of the lock is awful. The generics infect nearly every single type in the rearch crate

Thought about this a bit a few days ago. If we had module generics then this would be fine (i.e., mod rearch<T: SomeLockApiThing, U: AnotherThing> {...}). Unfortunately, they're not a thing.

Also, ideally, I'd love to ditch the type-map that ReArch currently uses and instead generate a custom-made container definition at compile time. Maybe possible via a build.rs, but that is clunky. Not sure what Rust features would even be required to be able to implement that without code gen, but it certainly isn't possible in stable/nightly right now.

Even cooler with the compile-time container approach (other than reading capsules being a "free" operation), we could support: