Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/holger

plugin/handler-skidbladnir-wasm/src/lib.rs

//! **The Skidbladnir package handler compiled to `wasm32-unknown-unknown`.**
//!
//! ```text
//! cargo xtask build-wasm-plugins
//! # → target/wasm32-unknown-unknown/release/holger_handler_skidbladnir_wasm.wasm
//! ```
//!
//! # What this crate is, and what it deliberately is not
//!
//! It holds **no bundle logic**. Every coordinate parse, store key, HTTP route,
//! listing rule and member classification comes from
//! `holger-handler-skidbladnir` — the same crate the linked backend is built
//! from — which in turn shares its repository machinery with the rust-toolchain
//! handler (`holger-handler-bundle-core`) and its classifier with znippy
//! (`znippy-plugin-skidbladnir`, `--no-default-features`).
//!
//! The ABI glue is not written here either: `export_package_handler!` emits all
//! eight exports and the host-backed `BlobStore`, so the same pointer protocol
//! serves every handler and cannot drift between two of them.
//!
//! `tests/native_wasm_agree.rs` loads the real module through the real host and
//! asserts, field by field, that it answers as the linked handler does. It fails
//! — never skips — when the module is missing or stale.
//!
//! # What does not cross to wasm32, and why
//!
//! | native only | why |
//! |---|---|
//! | `znippy_plugin_skidbladnir`'s `ArchiveTypePlugin` impl | it is built on `znippy-common` — arrow, io_uring and the gatling engine. Compiled out by `default-features = false`; only the pure classifier in `member.rs` remains, and that is the half holger needs. |
//! | the filesystem | a module has no `std::fs`. Storage arrives through the four `host_store_*` imports, backed by the *same* `DirStore` the linked backend uses — so both surfaces read the same bytes. |
//!
//! Unlike znippy's maven pair there is no *threading* seam to find: a bundle
//! coordinate scheme was never parallel, so nothing had to be compiled out for
//! wasm beyond the Arrow index writer this handler does not use either way.

holger_plugin_abi::export_package_handler!(holger_handler_skidbladnir::SkidbladnirHandler);