en

PR #5779 Modular, multi-threaded, transitioning plugins

Published At: 2025-01-30 Tags: pr

Several improvements have been made to the plugin system:

typ
1
#import plugin("mycalc.wasm"): myadd, mymut
2
#myadd(3, 5) \
3
#mymut.with(3)(5)
8
15
typ
1
#let base = plugin("mut.wasm")
2
State before mutation: #base.get() \
3
4
#let mutated = plugin.transition(base.add, "hello")
5
State after mutation: #base.get() \
6
Returned mutated value: #mutated.get()
State before mutation: []
State after mutation: []
Returned mutated value: [hello]