|
|
8 달 전 | |
|---|---|---|
| .. | ||
| src | 8 달 전 | |
| test-jams | 8 달 전 | |
| tests | 8 달 전 | |
| Cargo.toml | 8 달 전 | |
| README.md | 8 달 전 | |
| rustfmt.toml | 9 달 전 | |
DEVELOPER ALPHA
NockApps are pure-functional state machines with automatic persistence and modular IO.
The NockApp framework provides two modules, Crown and Sword:
To test compiling a Nock kernel using the hoonc command-line Hoon compiler, run the following commands:
cargo build
cd apps/hoonc
cargo run --release bootstrap/kernel.hoon ../hoon-deps
yes | mv out.jam bootstrap/hoonc.jam
cargo run --release bootstrap/kernel.hoon ../hoon-deps
For large builds, the rust stack might overflow. To get around this, increase the stack size by setting: RUST_MIN_STACK=838860.
The nockapp library is the primary framework for building NockApps. It provides a simple interface to a Kernel: a Nock core which can make state transitions with effects (via the poke() method) and allow inspection of its state via the peek() method.
For compiling Hoon to Nock, we're also including a pre-release of hoonc: a NockApp for the Hoon compiler. hoonc can compile Hoon to Nock as a batch-mode command-line process, without the need to spin up an interactive Urbit ship. It is intended both for developer workflows and for CI. hoonc is also our first example NockApp. More are coming!
# Run with default settings (production mode)
cargo run
# Use minimal log format
MINIMAL_LOG_FORMAT=true cargo run
Use MINIMAL_LOG_FORMAT=true for compact logging format
The minimal log format (MINIMAL_LOG_FORMAT=true) provides:
The following environment variables can be used to configure logging:
# Set log level
RUST_LOG="nockapp::kernel=trace" cargo run
# Enable minimal log format
MINIMAL_LOG_FORMAT=true cargo run
# Combine environment variables
RUST_LOG="nockapp::kernel=trace" MINIMAL_LOG_FORMAT=true cargo run