# Rust crates

Generated from rustdoc JSON for the Bookclerk workspace's libraries.
To write a native plugin, use the [Rust plugin SDK](/docs/plugins/sdk/rust/index.md).

## Plugin interface

The plugin ABI, the `plugin.toml` manifest and the plugin author CLI.

| Crate | Description |
| --- | --- |
| [`bookclerk_plugin_abi`](/docs/internals/crates/bookclerk_plugin_abi/index.md) | Authoritative Bookclerk plugin Workers RPC ABI (schema + shared types) |
| [`bookclerk_plugin_manifest`](/docs/internals/crates/bookclerk_plugin_manifest/index.md) | plugin.toml parse, validate, and canonical format (no host deps) |
| [`bookclerk_plugin_tools`](/docs/internals/crates/bookclerk_plugin_tools/index.md) | Bookclerk plugin author CLI (`bookclerk-plugin`: check / fmt / sync-embed / package / smoke / test) |

## Plugins

First-party plugins: databases, destinations, sources and integrations.

| Crate | Description |
| --- | --- |
| [`bookclerk_plugin_ai_embedder`](/docs/internals/crates/bookclerk_plugin_ai_embedder/index.md) | Text-embedding model plugin: runs cut ONNX embedding models from language row packs inside the plugin jail |
| [`bookclerk_plugin_database_d1`](/docs/internals/crates/bookclerk_plugin_database_d1/index.md) | Optional Cloudflare D1 library database plugin (Workers RPC guest) |
| [`bookclerk_plugin_database_postgres`](/docs/internals/crates/bookclerk_plugin_database_postgres/index.md) | Optional PostgreSQL library database plugin (Workers RPC guest) |
| [`bookclerk_plugin_database_sqlite`](/docs/internals/crates/bookclerk_plugin_database_sqlite/index.md) | Platform SQLite library database plugin (Workers RPC guest) |
| [`bookclerk_plugin_destination_b2`](/docs/internals/crates/bookclerk_plugin_destination_b2/index.md) | Backblaze B2 output plugin: native guest for Bookclerk |
| [`bookclerk_plugin_destination_local`](/docs/internals/crates/bookclerk_plugin_destination_local/index.md) | Local filesystem output plugin: Workers RPC guest for Bookclerk |
| [`bookclerk_plugin_destination_r2`](/docs/internals/crates/bookclerk_plugin_destination_r2/index.md) | Cloudflare R2 output plugin: Workers RPC guest for Bookclerk |
| [`bookclerk_plugin_destination_s3`](/docs/internals/crates/bookclerk_plugin_destination_s3/index.md) | S3 / MinIO output plugin: Workers RPC guest for Bookclerk |
| [`bookclerk_plugin_source_audible`](/docs/internals/crates/bookclerk_plugin_source_audible/index.md) | Audible storefront plugin guest (jailed native binary) |
| [`bookclerk_plugin_source_chirp`](/docs/internals/crates/bookclerk_plugin_source_chirp/index.md) | Chirp source plugin: native storefront guest binary |
| [`bookclerk_plugin_source_graphicaudio`](/docs/internals/crates/bookclerk_plugin_source_graphicaudio/index.md) | GraphicAudio source plugin: native storefront guest binary |
| [`bookclerk_plugin_source_libro`](/docs/internals/crates/bookclerk_plugin_source_libro/index.md) | Libro.fm source plugin: native storefront guest binary |

## Host internals

The crates the hosts are built from. Not a stable API.

| Crate | Description |
| --- | --- |
| [`bookclerk_acquire`](/docs/internals/crates/bookclerk_acquire/index.md) | End-to-end acquire pipeline: license, download, decrypt, store |
| [`bookclerk_archive`](/docs/internals/crates/bookclerk_archive/index.md) | Bounded, sans-IO extraction of uploaded ZIP and tar archives: entry path policy, size and ratio limits, and the report the media worker returns |
| [`bookclerk_audible_catalog`](/docs/internals/crates/bookclerk_audible_catalog/index.md) | Unauthenticated Audible catalog HTTP (search, genres, ratings, reviews) shared by the Audible guest and host enrichment |
| [`bookclerk_config`](/docs/internals/crates/bookclerk_config/index.md) | Bookclerk settings, paths, and naming template config |
| [`bookclerk_cover`](/docs/internals/crates/bookclerk_cover/index.md) | Cover image pipeline: sniff, decode under limits, resize and re-encode untrusted cover art as JPEG |
| [`bookclerk_db_exec`](/docs/internals/crates/bookclerk_db_exec/index.md) | Neutral SQL executor and transaction injects for database guests |
| [`bookclerk_db_guest`](/docs/internals/crates/bookclerk_db_guest/index.md) | First-party database guest session workers (SeaORM proxy, host IR envelopes) |
| [`bookclerk_db_testkit`](/docs/internals/crates/bookclerk_db_testkit/index.md) | Contract conformance test kit: capability profiles, begin refusal, fault injection and the database adapter conformance suite |
| [`bookclerk_demo_seed`](/docs/internals/crates/bookclerk_demo_seed/index.md) | Fills a fresh hosted-demo library with a second member, their books, wishlist and offline branch |
| [`bookclerk_discover`](/docs/internals/crates/bookclerk_discover/index.md) | Recommendations, embeddings, listening sync, and title request helpers |
| [`bookclerk_enrich`](/docs/internals/crates/bookclerk_enrich/index.md) | Source-agnostic Audible metadata enrichment (catalog search, metadata providers, confidence scoring) |
| [`bookclerk_intake`](/docs/internals/crates/bookclerk_intake/index.md) | Groups a drop folder's listing into items and decides when each has settled, without IO |
| [`bookclerk_integrations`](/docs/internals/crates/bookclerk_integrations/index.md) | Outbound integration framework (traits, registry, portal, claim tickets) |
| [`bookclerk_keystore`](/docs/internals/crates/bookclerk_keystore/index.md) | OS keychain access for the Bookclerk library key: Keychain Services, Credential Manager and Secret Service |
| [`bookclerk_libav`](/docs/internals/crates/bookclerk_libav/index.md) | Decoders-only FFmpeg (AC-3/E-AC-3, WMA, AMR) for the confined media worker |
| [`bookclerk_library`](/docs/internals/crates/bookclerk_library/index.md) | Library database schema, migrations, and book records |
| [`bookclerk_media`](/docs/internals/crates/bookclerk_media/index.md) | Clear-media packaging: remux, metadata fix-up, and MP3 encode (no DRM) |
| [`bookclerk_migrate`](/docs/internals/crates/bookclerk_migrate/index.md) | Import/export classic Libation Files and native Bookclerk backups |
| [`bookclerk_model_pack`](/docs/internals/crates/bookclerk_model_pack/index.md) | Layout of an embedding model on disk: the model description, the cut graph, the tokenizer and the token-row packs per language |
| [`bookclerk_mp4`](/docs/internals/crates/bookclerk_mp4/index.md) | ISO-BMFF container plumbing shared by media packaging and store plugins (no cryptography) |
| [`bookclerk_naming`](/docs/internals/crates/bookclerk_naming/index.md) | Port of Libation's NamingTemplate tag-template engine (Chardonnay parity) |
| [`bookclerk_node_client`](/docs/internals/crates/bookclerk_node_client/index.md) | Branch-node client: enrollment, the pinned owner socket, heartbeats, claimed work, token write-back, wakes and resume |
| [`bookclerk_node_proto`](/docs/internals/crates/bookclerk_node_proto/index.md) | Branch-node protocol: node API frames, handshake signatures, key checks, and sealed boxes |
| [`bookclerk_onnxruntime`](/docs/internals/crates/bookclerk_onnxruntime/index.md) | Pin and fetch of the ONNX Runtime shared library the model plugin loads |
| [`bookclerk_player_api`](/docs/internals/crates/bookclerk_player_api/index.md) | Sans-IO request parsers, response shapes and Socket.io framing of the host's /player API for audiobook player apps |
| [`bookclerk_player_engine`](/docs/internals/crates/bookclerk_player_engine/index.md) | Native playback for the desktop window: speed change, rate conversion and one-track playback over PCM from the media worker |
| [`bookclerk_plugin_catalog`](/docs/internals/crates/bookclerk_plugin_catalog/index.md) | Registry-neutral plugin discovery, manifests, and secure install |
| [`bookclerk_plugin_host`](/docs/internals/crates/bookclerk_plugin_host/index.md) | External plugin host: discovery, spawn, consent, and workerd-fronted guests |
| [`bookclerk_resolve`](/docs/internals/crates/bookclerk_resolve/index.md) | Sans-IO resolver that maps store listings to FRBR works, expressions and editions |
| [`bookclerk_sandbox`](/docs/internals/crates/bookclerk_sandbox/index.md) | Portable, unprivileged process confinement (Landlock/seccomp, Seatbelt, AppContainer) |
| [`bookclerk_scan_delta`](/docs/internals/crates/bookclerk_scan_delta/index.md) | Hash-based scan deltas for first-party storefronts with no change feed, kept in the plugin's own database |
| [`bookclerk_search`](/docs/internals/crates/bookclerk_search/index.md) | Full-text search over library works (Tantivy) |
| [`bookclerk_sentencepiece`](/docs/internals/crates/bookclerk_sentencepiece/index.md) | Safe wrapper over the SentencePiece Lite tokenizer runtime, built from the pinned sources under third_party/sentencepiece-lite |
| [`bookclerk_source`](/docs/internals/crates/bookclerk_source/index.md) | Host-side ContentSource trait and source registry; re-exports the storefront types guests share |
| [`bookclerk_storage`](/docs/internals/crates/bookclerk_storage/index.md) | Pluggable local, S3 (feature `s3`) and B2 (feature `b2`) storage backends for acquired audiobooks |
| [`bookclerk_storefront`](/docs/internals/crates/bookclerk_storefront/index.md) | Types storefront guests share with the host: DTOs, ABI conversions and listing helpers, with no database, ORM or OpenAPI dependencies |
| [`bookclerk_tags`](/docs/internals/crates/bookclerk_tags/index.md) | Sans-IO readers for metadata embedded in audiobook files (MP4, ID3, FLAC, Ogg) and the tag worker's frames |
| [`bookclerk_tls`](/docs/internals/crates/bookclerk_tls/index.md) | The one rustls crypto provider and HTTP client TLS settings for the Bookclerk hosts |
| [`bookclerk_tray`](/docs/internals/crates/bookclerk_tray/index.md) | In-process system tray for bookclerkd (opens the web UI in a browser) |
| [`bookclerk_window_policy`](/docs/internals/crates/bookclerk_window_policy/index.md) | What the desktop window's custom scheme lets a page reach: origin and path refusals, header rewrite, navigation |
| [`bookclerk_workerd`](/docs/internals/crates/bookclerk_workerd/index.md) | Jailed workerd isolate launcher for Bookclerk script plugins |
| [`bookclerkd`](/docs/internals/crates/bookclerkd/index.md) | Bookclerk daemon: scheduled scan, auto-acquire, HTTP control plane |

## Development and testing

Build tooling, test suites and examples.

| Crate | Description |
| --- | --- |
| [`bookclerk_dev`](/docs/internals/crates/bookclerk_dev/index.md) | Cargo alias dispatcher: build, stage, and run Bookclerk with external plugins |
| [`bookclerk_plugin_e2e`](/docs/internals/crates/bookclerk_plugin_e2e/index.md) | End-to-end suite against a staged first-party plugin installation |
| [`bookclerk_plugin_echo_native_rust`](/docs/internals/crates/bookclerk_plugin_echo_native_rust/index.md) | Reference Echo integration (native Rust / BookclerkPlugin) |
| [`bookclerk_plugin_echo_workerd_rust`](/docs/internals/crates/bookclerk_plugin_echo_workerd_rust/index.md) | Echo integration — workerd Rust/Wasm guest (JSON dispatch + JS WorkerEntrypoint) |
