Repository navigation
Format crates under crates/formats/, each described in Rust instead of plugin.toml #442
Copy link
Copy link
Closed
Task
3 / 33 of 3 issues completed
Copy link
Labels
Milestone
Description
After #437, Forge loads no WebAssembly plugins. Every package format is a crate the server links in. Two things are left over from when a format could also ship as a component that an operator installs:
plugins/is a second top-level directory of workspace crates. It used to set apart the crates that build forwasm32-wasip2. Now it only adds an entry to the CI change filter (.github/scripts/ci-changes.sh), to CodeQL's filter (.github/workflows/codeql.yml), to.gitignoreand to.dockerignore, and it backs a rule inAGENTS.mdthat keeps formats out ofcrates/.plugin.tomlwas the manifest an installed component carried next to its.wasm. A built-in format still reads it at startup:- the crate embeds it as text (
forge_plugin_api::plugin_toml!, aninclude_str!); - the server parses it with
tomlandexpects the result ("plugins/nuget/plugin.toml is valid"); - the id is leaked to get a
&'static str; - its
versionmust equal the crate's, and a test in each crate checks that; - its
api(the contract version) can no longer disagree with the host, because both compile together.
- the crate embeds it as text (
Target
crates/formats/
├── README.md # was plugins/README.md
├── nuget/ # forge-format-nuget
├── raw/ # forge-format-raw (#431)
└── docker/ # was crates/format-oci (forge-oci)
Each format describes itself in Rust, next to its impl FormatPlugin: id, name, description, kinds, assets and storage. There is no plugin.toml and no plugins/.
Steps, one pull request each
- Move the format crates from plugins/<id> to crates/formats/<id> #443: move
plugins/<id>tocrates/formats/<id>, and change theAGENTS.mdrule to match. - Describe each format in Rust and remove plugin.toml #444: replace
plugin.tomlwith a descriptor in Rust. - Move the Docker / OCI crate from crates/format-oci to crates/formats/docker #445: move
crates/format-ocitocrates/formats/docker.
#443 and #444 are independent of each other but touch the same files, so land one before starting the other. #445 follows #443, which sets the new rule in AGENTS.md.
Before starting
These open changes rewrite or add files under plugins/ or in plugin.toml. Work started before they merge will conflict with each of them.
- Remove WebAssembly format plugins and Wasmtime: built-in plugins only #440 (Remove WebAssembly format plugins and wasmtime: built-in plugins only #437) removes the WebAssembly side,
plugins/helm, and the component keys ofplugin.toml. - Raw repositories as a built-in format plugin over a host file store #441 (Raw repositories as a format plugin: a file store in the plugin contract #431) adds
plugins/rawand astoragekey toplugin.toml. - Serve Helm charts from the OCI registry only, with a chart page in the web UI #435 (Helm charts: classic chart repositories and OCI charts #43) changes
plugins/helm, which Remove WebAssembly format plugins and Wasmtime: built-in plugins only #440 then deletes. - Serve every repository at /repository/{name}/, with no format in the URL (breaking) #438 (no pull request yet) removes
mountfromplugin.toml.
Out of scope
- The plugin vocabulary. This covers the crates
forge-pluginandforge-plugin-api, the traitFormatPluginanddocs/format-plugins.md. Whether to rename them is a separate decision. This series changes only where the crates live and how a format describes itself. - Docker / OCI as a
FormatPlugin. Move the Docker / OCI crate from crates/format-oci to crates/formats/docker #445 moves the crate as it is.
Reactions are currently unavailable
Activity