process_lib
Overview
This page serves as an introduction to the process standard library, which makes writing Rust apps on Kinode OS easy. The full documentation can be found here, and the crate lives here.
Note that the process lib is under heavy ongoing development.
Therefore, the best way to use it is by selecting a tag or commit hash from the GitHub repo and using that as the version in your Cargo.toml
file.
See here for a list of published versions.
In your Cargo.toml
file, use a version tag like this:
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", tag = "v0.8.1" }
To use a specific commit hash, use this:
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "5305453" }
Make sure to use a recent version of the process_lib
while the system is in beta and very active development.
The major version of the process_lib
will always match the major version of Kinode OS.
Since the current major version of both is 0, breaking changes can occur at any time.
Once the major version reaches 1, breaking changes will only occur between major versions.
As is, developers may have to update their version of process_lib
as they update Kinode OS.
Since Kinode apps use the WebAssembly Component Model, they are built on top of a WIT (Wasm Interface Type) package.
wit-bindgen
is used to generate Rust code from a WIT file.
The generated code then contains the core types and functions that are available to all Kinode apps.
However, the types themselves are unwieldy to use directly, and runtime modules present APIs that can be drastically simplified by using helper functions and types in the process standard library.
Almost all code examples in this book make use of the process_lib
.
For specific examples of its usage, check out the docs or just follow the tutorials later in this book.