Skip to content

Development

Setup

Install Rust

This will automatically install the correct version of rust

Bash
rustup show

Install pre-commit hooks

Bash
uv run pre-commit install

Install nextest

Bash
cargo install cargo-nextest --locked

Tests

Run the tests

Text Only
cargo nextest run

Trying things out

Make sure you have make cmake and autotools installed, for the vendored Cap'n Proto compiler.

Run a node

This starts a dusk_node server, which listens on tcp port 9090, on every address (it uses the Dusk Nix impl by default). The address is built in - see Run a dusk node.

Bash
cargo run --bin dusk_node

Run example Dusk CLI

Bash
cargo run --bin dusk -- 127.0.0.1:9090

Try out Dusk's Python API

Bash
uv run maturin develop
uv run python
Python
import dusk
d = dusk.Dusk('127.0.0.1', 9090)
# get the currently running processes using the `ps` program and print them.
print(list(d.sh('ps')))

Using the framework

The basic flow of using the Dusk framework is as follows:

  • Write your own dusk programs and or dusk impl using the dusk crates found in /dusk
  • Copy over the example deliverable artifacts in /artifacts
  • Make them your own by adding your programs to them and or changing the underlying impl that dusk_node links
  • Compile and deliver

Docs

Build

Bash
cd docs && uv run mkdocs build

Serve

Bash
cd docs && uv run mkdocs serve