Crate Structure
FreeNo executable scriptsNot checkedPlace code or crates: workspace members, versions, package paths and ignore rules.
by xberg-io★ 9,642 GitHub starsAbout this skill
Crate Structure
Version source of truth: root Cargo.toml [workspace.package] version.
Workspace members (crates/)
xberg— core library: extraction engine, MIME detection, plugin system, OCR, chunking, embeddings, API/MCP serverxberg-cli— CLI binary. Defines noclifeature of its own; itscore-clifeature is what forwards to the corexberg/clixberg-ffi— C FFI layer; opaque handles, cbindgen headers. Consumed by Go (cgo), C# (P/Invoke), Zig (C ABI), Swift (swift-bridge shim, which injects the dependency itself) and Java (Panama FFM)xberg-jni— JNI bindings backingpackages/kotlin-android. The Java package does not go through this:alef.toml [crates.java]setsffi_style = "panama", i.e. Panama FFM overxberg-ffixberg-node— NAPI-RS Node.js/TypeScript bindingsxberg-py— PyO3 Python bindingsxberg-php— ext-php-rs PHP bindingsxberg-wasm— wasm-bindgen WASM bindings;wasm-targetfeature setxberg-native-pdf— pure-Rust PDF engine, vendored into this workspace. Path dependency with nopackage =alias, so the extern crate name isxberg_native_pdf. ExportsLOG_TARGET_ROOT = module_path!(); derive log-target filters from that constant, never a string literalxberg-pdfium-render— pdfium FFI backend behind thepdf-pdfiumfeature. Aliased:pdfium-render = { package = "xberg-pdfium-render", … }, so call sites still writepdfium_render::xberg-paddle-ocr— PaddleOCR; ORT and tract engines. On WASM only the PaddleOCR config types are available (they compile in every build), butpaddle-ocris inwindows-targetxberg-tesseract— Tesseract OCR bindingsxberg-candle-ocr— candle VLM OCR backends (TrOCR, PaddleOCR-VL, GLM-OCR, DeepSeek-OCR)xberg-gliner— GLiNER NER inferencexberg-libheif— libheif bindings for HEIC/HEIFxberg-libwpd— libwpd bindings for WordPerfect (.wpd)
Two members live outside crates/: packages/dart/rust and packages/swift/rust.
excluded — not members, and invisible to cargo check --workspace:
e2e/rust, packages/elixir/native/xberg_nif, packages/ruby/ext/xberg_rb.
default-members = ["crates/xberg", "crates/xberg-cli"].
Distribution packages (packages/)
python (PyPI/maturin), ruby (RubyGems/Magnus), php (Composer), go (cgo over xberg-ffi),
java (Maven, Panama FFM over xberg-ffi), csharp (NuGet, P/Invoke), elixir (Hex/Rustler),
dart (pub.dev, flutter_rust_bridge), kotlin-android (AAR; JNI over xberg-jni),
swift (SwiftPM, swift-bridge), zig (C ABI over xberg-ffi).
Tools (tools/)
benchmark-harness (the only workspace member here), generate_test_fixtures, ocr-measure,
perf.
There is no tools/e2e-generator — e2e generation is alef e2e generate, configured in
alef.toml [crates.e2e]. See the alef-generated-bindings skill.
Adding a workspace member
Adding to [workspace] members and to the Dockerfiles is not enough. Two ignore files use
"ignore everything, then allowlist", so a new crate is invisible to Docker and its vendor/
is never committed:
.dockerignore—*at the top, then a per-crate allowlist; add!crates/<name>/. Missing it fails every image build withfailed to compute cache key: "/crates/<name>": not found..gitignore— barevendor/with per-crate un-ignores; add!crates/<name>/src/vendor/if the crate vendors source. Missing it meansgit add -Acommits nothing undervendor/and a fresh clone will not build.- Every
docker/Dockerfile.*must eitherCOPY crates/<name>/orsed-exclude the member from the workspace list. - Run
mise run verify:docker-crates. It checks (1) and (3) in both directions — it also catches aCOPYline naming a crate that no longer exists. It does not look at.gitignore; verify that by hand.
Deleting a crate is the same problem in reverse: a stale allowlist entry is what hides a real omission.
Install Crate Structure in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the Crate Structure skill do?
Place code or crates: workspace members, versions, package paths and ignore rules.
How do I install the Crate Structure skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the Crate Structure skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
by Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
by Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
by Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
by Anthropic