Expand description
Plugin source, split the same way the repo-root plugins/ directory is
split: native/ for handlers compiled into the host binary, wasm/ for the
host-side loader of wasm32-unknown-unknown modules. No handler source sits
loose beside this file — znippy-common/tests/plugin_source_layout.rs
asserts that, and fails naming the stray file.
The two directories under znippy-common/src/plugins/ hold modules; the
two under the repo root hold crates. Same rule, two tiers — which tier a
handler is born into is decided by its dependencies (rule P-5,
.nornir/plugins-design.md §f3), not by taste.
§The module paths are published API
znippy_common::plugins::cargo_native::CargoPlugin and its five siblings are
reached from outside this workspace — holger/traits/src/lib.rs names them
in non-test code, and several holger/server/repository/* crates depend on
znippy-common by version, so they follow a published path and cannot
follow a directory rename. The pub use lines below keep those exact paths
alive; they are the whole compatibility story, and no handler code is
duplicated to provide them.
Re-exports§
pub use native::cargo_native;pub use native::conda_native;pub use native::deb_native;pub use native::gem_native;pub use native::npm_native;pub use native::rpm_native;pub use native::skeletons;
Modules§
- native
- Handlers compiled into the host binary — the in-common (tier A) half of the
plugin tree. Each module here needs nothing but
std,arrowandcrate::; the moment one needs a third-party parser, a decompressor, a network fetch, its own crate-type or its own release cadence it becomes aznippy-plugin-*crate under the repo-rootplugins/native/instead (rule P-5,.nornir/plugins-design.md§f3).