Expand description
Mason-style LSP and developer-tool installer.
hjkl-anvil is the tool-installation sibling of hjkl-bonsai. Where
bonsai manages tree-sitter grammars, anvil manages language servers,
formatters, linters, and debug adapters — using the same XDG path
conventions and compile-time embedded catalog pattern.
§Features
§sync (dev-only)
Enables the sync-anvil xtask binary that regenerates anvil.toml from
the upstream mason-org/mason-registry JSON artifact. Not needed by
downstream consumers — it pulls in reqwest, zip, and serde_json.
Maintainers run:
cargo run -p hjkl-anvil --features sync --bin sync-anvil -- --pin <tag>§Quick start
use hjkl_anvil::{Registry, ToolCategory};
let registry = Registry::embedded().expect("embedded catalog must load");
println!("catalog has {} tools", registry.len());
if let Some(spec) = registry.get("rust-analyzer") {
println!("rust-analyzer v{}", spec.version);
}
for name in registry.by_category(ToolCategory::Lsp) {
println!(" lsp: {name}");
}Re-exports§
pub use installer::Install;pub use installer::InstallError;pub use installer::InstallStatus;pub use installer::install_blocking;pub use job::InstallHandle;pub use job::InstallPool;pub use manifest::CargoMethod;pub use manifest::GithubMethod;pub use manifest::GoMethod;pub use manifest::InstallMethod;pub use manifest::Manifest;pub use manifest::ManifestError;pub use manifest::ManifestMeta;pub use manifest::NpmMethod;pub use manifest::PipMethod;pub use manifest::ScriptMethod;pub use manifest::ToolCategory;pub use manifest::ToolSpec;pub use registry::Registry;pub use registry::RegistryError;pub use store::ChecksumSidecar;pub use store::RevSidecar;pub use store::StoreError;
Modules§
- installer
- Install pipeline for Github, Cargo, Npm, Pip, and GoInstall tool methods.
- job
- Async install pool with per-key deduplication.
- manifest
- Parsed shape of
anvil.toml. Mirrors hjkl-bonsai’sManifest/LangSpecpattern. - registry
- In-memory registry built from a parsed
Manifest. - store
- XDG path resolution and store layout helpers.