| Crates.io | effs |
| lib.rs | effs |
| version | 0.1.0 |
| created_at | 2025-11-03 10:29:10.529074+00 |
| updated_at | 2025-11-03 10:29:10.529074+00 |
| description | Effects based minimal std lib alternative |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1914413 |
| size | 2,645 |
Rust effect inspired standard library like primitives. (very experimental avoid using in prod)
Effects are some reasonable constraint bound on a system that's managed via a control layer
NOTE: uses nightly rust please be mindful.
#![feature(impl_trait_in_assoc_type)]
use effs::prelude::*;
fn main() -> Result<()> {
/** TODO: add macros??
effed!{
with(Stdout) {
Print("hello, world")
}
}}
**/
effed(Print(Stdout))("hello, world")
}
struct Print<Io: SimpleIoEff>(Io);
impl<Io: SimpleIoEff> Effed for Print<Io> {
type Input = impl AsRef<str>;
type Output = ();
fn run(self, input: Self::Input) -> Self::Output {
let Self(io) = self;
io.write(input.as_bytes());
}
}
Figuring out patterns of design for weird ideas I have. And testing various use cases.