Expand description
gen-adapter-forge — typed declarative spec for gen adapters.
Every existing adapter (gen-cargo / gen-npm / gen-bundler) has the same shape:
- one or more manifest markers (
Cargo.toml,package.json, …) - zero or more lockfile markers (
Cargo.lock,pnpm-lock.yaml, …) - a registry (CratesIo / Npm / RubyGems / …)
- a constraint syntax family (
semver-caret-default/semver-exact-default/bundler-pessimistic/ …) - dependency table names (
dependencies/devDependencies/ …) - target-predicate shape (cargo cfg / npm engines+os / bundler platforms / pep-508 markers / none)
- workspace shape (
members/workspacesarray / single-package)
A typed AdapterSpec captures all of this. The forge component
generates the boilerplate scaffold (lib.rs + error.rs + raw.rs +
tests) from one spec; the adapter author only writes the format-
specific parsing logic — typically <100 LOC.
Structs§
- Adapter
Spec - Typed declarative adapter spec. One value of this struct generates
a complete adapter scaffold. Authoring-side equivalent of the
(defadapter …)Lisp form (M5+). - Scaffold
Output - Forge output — the rendered scaffold ready to drop in a new
crates/gen-<name>/directory.
Enums§
Functions§
- bundler_
spec - cargo_
spec - The cargo adapter as a typed spec — what
gen-cargowould have been authored as ifAdapterSpecexisted before it. - forge
- Forge a fresh adapter scaffold from a typed spec. Produces a directory’s worth of starter files:
- npm_
spec