Expand description
Shared package-identity resolution.
A single package: block in the IDL (weaveffi_ir::ir::Package) is the
source of truth for the name, version, and metadata stamped into every
ecosystem manifest (package.json, pyproject.toml, *.gemspec,
*.csproj, pubspec.yaml, Package.swift, build.gradle, go.mod).
This module centralizes the resolution rules (precedence and defaults)
so all eleven generators agree on the package identity instead of each one
hardcoding weaveffi / 0.1.0. Generators read resolve in their
manifest code and map the ResolvedPackage fields onto whatever their
ecosystem’s manifest format requires.
Structs§
- Resolved
Package - Package identity resolved for one generator/manifest.
Constants§
- DEFAULT_
NAME - Fallback package name when the IDL omits
package.nameand no per-target override or input basename is available. - DEFAULT_
VERSION - Fallback package version when the IDL omits
package.version.
Functions§
- name_
from_ basename - Strip directory and extension from an IDL basename to use as a fallback
package name.
"path/kvstore.yml"→"kvstore",None/empty →DEFAULT_NAME. - pascal_
ident - UpperCamelCase identifier-safe form of an arbitrary package name. Word
boundaries are any run of non-alphanumerics (and existing camel humps are
preserved).
"my-kv.store"→"MyKvStore","kvstore"→"Kvstore". - resolve
- Resolve package identity for a generator.
- sanitize_
ident - Lower-case identifier-safe form of an arbitrary package name.