Contributing
To start contributing to Floneum, we provide a list of Good first issues.
If you are interesting in contributing to Floneum, consider reaching out on discord. We are always happy to help new contributors get started!
Project Architecture
Plugins:
WASM:
Wasm is an assembly language originally built for the web. It has a few characteristics that make it appealing for Floneum plugins:
- Many languages can compile to it
- When you run WASM, it is sandboxed from you environment by default. You have to explicitly allow WASM plugins to access certain resources
Wasmtime is a library Floneum uses to run WASM plugins
WASI:
WASI is a set of interfaces for WASM programs. It is a set of resources you can allow your WASM plugin to access. Specifically, it allows controlled, file system, network, and time access. You can think of WASI as something like the "standard library" for WASM programs.
The WASM component model allows the environment that runs WASM (Floneum) to declare a typed interface that Plugins (Nodes) can use. Because the interface is typed, each language can read the common environment declaration and create wrappers that work well with that language.
In Floneum, the interface is declared in the plugin.wit file.
This file is used to create the language specific types in each plugin using wit-bindgen. We also provide an extra level of wrapping with a rust macro and some special functions specific to rust in the rust adapter package
It is also used to declare the interface in wasmtime here.
Limitations:Currently, the Floneum bindings uses a lot of *-id types. These types represent resources that live in Floneum like a model instance. We also use ids to represent recursive types like the structure type used to constrain structured generation.As WIT matures, first party
resource
types will be implemented that make these id types unnecessary
UI:
The main UI for Floneum is written in Diouxs. The code for the UI of floneum can be found in the main package