Skip to content

Commit ff4c5a4

Browse files
committed
feat: add ZRTL effects plugin for algebraic effects runtime
Implements runtime support for algebraic effects: - Thread-local handler stack with effect ID cache - Handler management: push_handler, pop_handler, get_handler - Effect dispatch: perform (runtime lookup), perform_direct (static) - State management: alloc_state, free_state, get_state - Effect ID generation via FNV-1a hash Exported symbols: - $Effects$push_handler, $Effects$pop_handler, $Effects$get_handler - $Effects$has_handler, $Effects$handler_depth, $Effects$get_state - $Effects$perform, $Effects$perform_direct - $Effects$alloc_state, $Effects$free_state - $Effects$id_from_name, $Effects$debug_stack, $Effects$clear_all All 4 tests pass.
1 parent e7b255b commit ff4c5a4

3 files changed

Lines changed: 605 additions & 0 deletions

File tree

plugins/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ members = [
2929
"zrtl_audio",
3030
"zrtl_text",
3131
"zrtl_model",
32+
"zrtl_effects",
3233
]
3334

3435
[workspace.dependencies]

plugins/zrtl_effects/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "zrtl_effects"
3+
version = "0.1.0"
4+
edition = "2021"
5+
description = "ZRTL Effects plugin - Algebraic effects runtime support"
6+
license = "Apache-2.0"
7+
8+
[lib]
9+
crate-type = ["cdylib", "staticlib", "rlib"]
10+
11+
[dependencies]
12+
zrtl = { path = "../../sdk/zrtl" }
13+
libc = "0.2"

0 commit comments

Comments
 (0)