Skip to content

Workspace crate taxonomy

Workspace members live under crates/ and are grouped by role:

DirectoryCrates
crates/core/xlai-core
crates/runtime/xlai-runtime
crates/backends/xlai-backend-openai, xlai-backend-openrouter, xlai-backend-transformersjs, xlai-backend-gemini, xlai-backend-llama-cpp
crates/qts/xlai-qts-core, xlai-qts-manifest, xlai-qts-cli
crates/sys/xlai-build-native, xlai-sys-llama, xlai-sys-ggml
crates/platform/xlai-facade, xlai-native, xlai-wasm, xlai-ffi

This doc classifies crates for dependency and release decisions. Authoritative publish order for crates.io is in Publishing and .github/workflows/publish.yml.

Published to crates.io

CrateRole
xlai-coreDomain types and provider traits
xlai-runtimeRuntimeBuilder, Chat, Agent, sessions
xlai-backend-openaiOpenAI-compatible HTTP backend
xlai-backend-openrouterOpenRouter Responses API chat backend
xlai-backend-transformersjsWASM transformers.js chat backend

Internal only (publish = false)

CrateRole
xlai-build-nativeInternal build-script helpers (CMake, OpenBLAS, Vulkan, llama.cpp patches)
xlai-sys-llamaVendored llama.cpp build (CMake + bindgen); sources under vendor/native/
xlai-sys-ggmlVendored standalone ggml build for QTS (CMake + bindgen)
xlai-backend-llama-cppNative llama.cpp chat backend
xlai-backend-geminiGoogle Gemini HTTP backend (publish = false; not in the crates.io publish chain)
xlai-facadeInternal integration re-exports for xlai-native only (xlai-wasm does not depend on it)
xlai-nativeNative app entrypoint
xlai-wasmwasm-bindgen + npm package base
xlai-ffiC ABI
xlai-qts-manifestBrowser QTS manifest / capability serde
xlai-qts-coreNative Qwen3 TTS engine + QtsTtsModel
xlai-qts-clixlai-qts binary

CI setup

Native Rust jobs share .github/actions/setup-xlai-rust-native (toolchain, sccache, rust-cache, OpenBLAS / vcpkg / shaderc). Jobs that need Vulkan (release build.yml) add Linux glslc / libvulkan-dev and the Vulkan SDK step after that action.

Adding a new workspace member

  1. Add the path to [workspace].members in the root Cargo.toml.
  2. If the crate should ship to crates.io: set publish = true (default), add a description, wire version.workspace = true, add to [workspace.dependencies] with path + version, and append it to PUBLISH_CRATES_ORDER in publish.yml in dependency order.
  3. If internal: set publish = false and list it here and in Publishing under "not published".

Released under the Apache License 2.0.