Crates.io | flutils |
lib.rs | flutils |
version | 0.5.0 |
source | src |
created_at | 2022-04-14 17:13:59.598815 |
updated_at | 2022-04-14 17:13:59.598815 |
description | Things for fledger that didn't fit anywhere else |
homepage | https://fledg.re |
repository | https://github.com/ineiti/fledger |
max_upload_size | |
id | 567644 |
size | 42,915 |
Some common utils used by the Fledger system.
The most important is the Broker
structure that is used throughout
the code to link the different parts together.
I wanted to create a common code for both the libc- and wasm-implementation for
Fledger.
Unfortunately it is difficult by the fact that libc allows to use threads
(and sometimes needs them), so some structures need to have the Send
and Sync
traits.
But these traits are not available for all necessary websys-modules!
So I came up with the idea of linking all modules using a Broker
system.
In short, all input and output for a module are defined as messages.
Then each module handles incoming messages and produces outgoing messages.
Modules can be linked together by defining Translators
that take messages
from one module and translate them into messages for the other module.