Rust Quick Start
This quick start shows the smallest Rust workflow that emits scope and mark events.
Choose an Install Path
Pick the installation path that matches whether you are using a published package or a local checkout.
Install from a Package Manager
Use the published crates when you are consuming a release:
Install the published NeMo Relay CLI separately when you need coding-agent hook and LLM gateway observability:
Install from the Repository
Use a path dependency when your application is consuming a local checkout:
nemo-relayis the core Rust runtime surface.nemo-relay-adaptiveis the companion crate for adaptive runtime primitives and Redis-backed learning components.nemo-relay-cliis a binary crate. Usecargo install nemo-relay-cli@0.3.0when you need the NeMo Relay CLI.
Push a Scope and Emit a Mark
The example below creates a scope and records a mark event from Rust.
What Success Looks Like
The script should exit cleanly and print lifecycle lines from the subscriber.
Native subscriber delivery is asynchronous, so examples flush before checking
subscriber output.
You should see one line for the scope start event, one for the initialized
mark, and one for the scope end event.
That tells you two things:
- The scope API ran successfully.
- Emitted events were observable through the subscriber system.
What to Learn Next
Use these links to continue from the quick start into the core runtime concepts.
- Use Scopes, Middleware, Subscribers, and Plugins for the runtime model.