Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
cc-lb-plugin-conformance
cc-lb-plugin-conformance is a development dependency for cc-lb wasm plugin
authors. It loads a compiled plugin through the same inspection, admission, and
runtime path used by the host, then runs boundary smoke tests for the exported
hook.
Use it in plugin crates to catch ABI, metadata, wire version, and layout fingerprint drift before uploading the wasm artifact.
Add as a Dev-Dependency
[]
= "0.2"
Build the plugin for wasm32-unknown-unknown before running the test:
ConformanceSuite::from_wasm(bytes)
ConformanceSuite::from_wasm(bytes) inspects the artifact and infers the hook
kind when the wasm exports exactly one supported hook.
use ConformanceSuite;
let wasm = read?;
let suite = from_wasm;
Use for_filter, for_shape, or for_observe instead when a single wasm
artifact exports multiple hooks.
assert_recognisable_by_current_host()
assert_recognisable_by_current_host() runs the current host admission path:
- compile the wasm module with wasmtime
- verify required exports and import restrictions
- parse plugin and hook metadata
- verify declared wire versions are supported
- verify embedded layout fingerprints match the current host
- run the canonical runtime probe for each declared hook
This is the static gate to run in CI whenever the plugin or host crates change.
run()
run() builds a live wasmtime runtime, registers the plugin, and exercises the
hook boundary with canonical sample payloads.
It verifies allocator exports, hook exports, rkyv encode/decode round-trips, and observe variant handling. It does not verify plugin business semantics such as routing policy or URL rewriting; keep those assertions in your own tests.
Sample Test
use ConformanceSuite;
Links
- Main repository: https://github.com/isac322/cc-lb
- Plugin author guide: https://github.com/isac322/cc-lb/blob/master/docs/plugin-author-guide.md
- Wire README: https://github.com/isac322/cc-lb/blob/master/crates/cc-lb-plugin-wire/README.md
- PDK README: https://github.com/isac322/cc-lb/blob/master/crates/cc-lb-pdk-wasmtime/README.md
License
Licensed under the workspace license.