SPEAR Next is the Rust/async implementation of SPEAR’s core services:
- SMS: the metadata/control-plane server.
- SPEARlet: the node-side agent/runtime.
Chinese README: README.zh.md
src/apps/sms: SMS binary entrypointsrc/apps/spearlet: SPEARlet binary entrypointweb-admin/: Web Admin frontend sourceassets/admin/: built Web Admin static assets embedded/served by SMSsamples/wasm-c/: C-based WASM samples (WASI)docs/: design notes and usage guides
- Rust toolchain (latest stable recommended)
This repo uses protoc-bin-vendored, so you typically don’t need to install protoc manually.
make build
# release
make build-release
# build with Rust features (e.g. sled / rocksdb)
make FEATURES=sled build
# enable local microphone capture implementation (optional)
make FEATURES=mic-device build
# macOS shortcut (equivalent to FEATURES+=mic-device)
make mac-build./target/debug/sms
# enable Web Admin
./target/debug/sms --enable-web-admin --web-admin-addr 127.0.0.1:8081Useful endpoints:
- HTTP gateway:
http://127.0.0.1:8080 - Swagger UI:
http://127.0.0.1:8080/swagger-ui/ - OpenAPI spec:
http://127.0.0.1:8080/api/openapi.json - gRPC:
127.0.0.1:50051 - Web Admin (when enabled):
http://127.0.0.1:8081/admin
SPEARlet connects to SMS once you provide --sms-grpc-addr (then it auto-registers by default).
./target/debug/spearlet --sms-grpc-addr 127.0.0.1:50051- SMS:
~/.sms/config.toml(or--config <path>) - SPEARlet:
~/.spear/config.toml(or--config <path>)
Repo-shipped examples:
- SMS:
config/sms/config.toml - SPEARlet:
config/spearlet/config.toml
- CLI
--configfile - Home config (
~/.sms/config.tomlor~/.spear/config.toml) - Environment variables (
SMS_*,SPEARLET_*) - Built-in defaults
Do not put secrets into config files. Use llm.credentials[].api_key_env to reference environment variables.
SPEARlet can import models from a local Ollama on startup and materialize them as LLM backends.
- Docs:
docs/ollama-discovery-en.md
- Route by model: if some backends are configured with
model = "...", requests can be routed by setting onlymodel(no explicitbackendrequired). - Observe the selected backend:
cchat_recvJSON includes a top-level_spear.backend/_spear.model.- Router emits a
router selected backenddebug log after selection.
Web Admin provides Nodes/Tasks/Files/Backends pages.
- Backends supports an aggregated view across nodes.
- Clicking a backend row opens a detail dialog with Raw JSON.
Docs:
docs/web-admin-overview-en.mddocs/web-admin-ui-guide-en.md
make samplesDocs:
docs/samples-build-guide-en.md
make help
make dev
make ciUI tests (Playwright):
make test-uidocs/INDEX.md
Apache-2.0. See LICENSE.
