- Rust 97%
- Shell 2.9%
|
|
||
|---|---|---|
| .github/workflows | ||
| ci | ||
| libs | ||
| protos | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy.toml | ||
| deny.toml | ||
| justfile | ||
| justfile.ci | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
alysia-libs
The shared Rust libraries of the Alysia platform, extracted from the
Alysia monorepo (libs/, protos/).
No services, no plugins, no business logic of its own — this repo exists so
services, the gateway and the WASM plugins consume one versioned, semver-
checked release instead of vendored copies.
Contents
| Crate | Role |
|---|---|
alysia-proto |
Stable DTOs: ARNs, partition registry, permission snapshot types |
alysia-grpc |
Compiled gRPC surface of protos/ (tonic-prost; generated code committed under src/generated/) |
alysia-nats |
Typed JetStream bus client |
alysia-service |
Shared service runtime: HTTP/gRPC serving, strict-mTLS listener, Postgres bootstrap, metrics |
alysia-schem |
Schematic parsing (Sponge v2/v3, Litematica) and paste planning — shared with the WASM guest |
alysia-test |
Container fixtures for integration tests (Postgres/NATS via testcontainers) |
protos/ holds the internal gRPC IDL (buf lints it; Rust codegen goes
through libs/alysia-grpc/build.rs, never through buf generate).
Layout
Crates stay under libs/ and the IDL under protos/ — the same relative
layout as the monorepo. That keeps the internal path-deps (../alysia-proto)
and the build script's ../../protos reference working byte-identical: the
extraction is a pure move, zero path rewrites.
Versioning
One release train, tags libs-vX.Y.Z. The tag versions the whole workspace
together — the crates evolve in lockstep, so a single tag is the only
consistent unit. Currently 0.x: everything is pre-1.0, breaking changes
bump the minor and are caught by cargo-semver-checks in CI.
Consumers
Pin the exact tag as a git dependency — never a branch, never a bare revision:
[dependencies]
alysia-proto = { git = "https://git.zeto.fr/alysia/alysia-libs.git", tag = "libs-v0.1.0" }
alysia-service = { git = "https://git.zeto.fr/alysia/alysia-libs.git", tag = "libs-v0.1.0" }
Upgrading means bumping the tag on every alysia-* dependency together
(mixed tags = mixed lockstep versions = unsupported).
Development
cargo fmt --check
cargo clippy --workspace --all-targets --locked -- -D warnings
SQLX_OFFLINE=true cargo nextest run --lib # offline unit tests
cargo nextest run -E 'not kind(lib)' # container-backed tests (needs podman)
cargo machete
cargo deny check
cargo semver-checks --baseline-rev <base> # public API compatibility
buf lint protos
or just ci-lint / just ci-test (recipes vendored from
alysia-ci-templates at
tpl-v0.1.0 — do not patch justfile.ci or ci/ locally, re-vendor
instead; ci-freshness enforces it).