Make Power, Ground, NotConnected, Layout, and Board implicitly available
in user .zen files without explicit load() statements. Remove
now-redundant imports across all .zen files, tests, examples, and docs.
* feat(core): add typed Part and mutable alternatives
* test: cover Part netlist behavior in pcb-zen and pcb
* docs: fold Part spec into docs and update examples
* fix(core): preserve typed part over legacy part property
* feat(core): make part canonical over scalar sourcing fields
* refactor(core): simplify canonical part resolution
* refactor(core): simplify component sourcing flow and add unit tests
* builtin.part -> builtin.Part
* Use netlist snapshot tests for part api
* Decouple KiCad libraries with [[workspace.kicad_library]] config
Replace hardcoded KiCad repo coupling with a generic
`[[workspace.kicad_library]]` config model. Each entry declares
symbol/footprint/model repo relationships and an optional http_mirror
template for archive-based fetching.
- Add `[[workspace.kicad_library]]` schema with version, symbols,
footprints, models, and http_mirror fields
- Extract `kicad_library.rs` module with version selection, repo
matching, and config validation helpers
- Default to KiCad 9.0.3 libraries when no explicit config is provided
- Route symbol->footprint linkage through matched config entries
instead of hardcoded alias paths
- Make archive fetching config-driven via http_mirror template
- Remove hardcoded KICAD_ALIASES, kicad9-libraries-version, and
special-case kicad auto-deps mutation
- Exclude non-manifest KiCad repos from pcb.sum lockfile
- Update docs/spec to reflect new config model
* Embed 3D models into KiCad layout files
Add model_embed_discovery module that embeds referenced 3D model files
directly into .kicad_pcb output. Discovers model references in
footprints, fetches and compresses model data with zstd, and rewrites
model paths to use embedded references. This eliminates the need for
external 3D model files at layout time.
* Simplify KiCad resolution and materialization flow
Consolidate resolution maps, remove implicit KiCad dependency injection,
and simplify the materialization pipeline. Config-driven version
selection replaces scattered version parsing. Assets backcompat hook
provides fallback version hints from legacy [assets] declarations.
* Stage KiCad library files from eval for offline release validation
Move KiCad file staging into copy_sources using eval1's schematic so
validate_build needs no network access. Place files in .pcb/cache with
.pcb-cached markers. Deduplicate sexpr node builders, kicad repo
matchers, and release staging helpers. Flatten nested code in model
embed discovery.
* Simplify KiCad library types and clean up dead code
- Parse KicadLibraryConfig.version as semver::Version at deserialize
time, eliminating fallible kicad_entry_version and making match/version
functions infallible
- Move kicad_model_dirs and asset_dep_versions to methods on
WorkspaceInfo, computed on demand from config
- Remove kicad_model_dirs field from Schematic
- Simplify materialize_asset_deps to derive targets internally
- Format PCB output unconditionally at end of patch_pcb_file
- Remove dead code: package_roots dedup guard, redundant post-fetch
assertion, trivial vendor config tests, duplicate tests
- Delete superseded kicad-libraries-proposal-v3 spec
* Remove the offline field from NativePathResolver
* Update changelog
* Remove unnecessary result wrapping
* Dedup resolution logic for assets
* Encode schema version in filename
* Search all package_resolutions for kicad asset deps
* Address bot review comments, dedup
* Fix confusing arg name
* Delete <workspace>/.pcb/cache symlinking for v1 dep resolution
* Symlink ~/.pcb/cache to workspace/.pcb/cache
Results in more stable fp-lib-table
* Patch fp-lib-table to point to vendor/ in release
* Run DRC on staged source layout directory
* Use source layout directly in release instead of separate copy
* Update tests, fix snapshots
* Run layout before release
* Dont ignore test
* Migrate test-workspaces/with-pcb-toml to v2
* Skip symlinks in release zip creation
* Buffer zip write
* Skip availability hydration on un-auth'd pcb bom
* Share cache directory for v2
* Update changelog
* Dedup PhysicalValue
We had 2 different PhysicalValue structs in pcb-sch and pcb-zen-core
just to avoid adding starlark deps to pcb-sch. I don't think its worth
it.
* Use rust_decimal_macros
Factor out some duplicate code
* Add proper enum -> String attr support
* Add config("mpn") to generated components for compat
* Format list component properties nicely when exporting to kicad
* Format physical value, enum, list kicad properties in compiler
* Don't rely on __attr__ values
Handle typed, stringified component properties directly.
* Title case kicad properties
buildifier doesn't support f-strings, which we use in a bunch of places.
We also run fmt after `pcb upgrade`, and it's a bit annoying that it
fails due to a buildifier error.
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add [packages] to vendor/release test case
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix package resolution in pcb vendor/release
The TrackingLoadResolver middleware couldn't properly resolve packages.
To fix, eliminate the middleware entirely and enhance CoreLoadResolver
to handle all the necessary tracking. This is likely to reduce future
bugs as well.
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Use public kicad package
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
---------
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add pcb release command
Intentially spartan in terms of flags/arguments. All that's needed is
the path to the .zen file.
To test:
cargo run -- release crates/pcb/test-workspace/boards/TestBoard.zen
Implemented:
- Workspace root detection (even without pcb.toml)
- Git-based versioning (e.g. tag > commit hash > dirty commit hash)
- Zen source files copied into release dir (release-dir/src)
- Dependencies are vendored into release dir (release-dir/src/vendor)
- Unmatched bom is generated into release dir (release-dir/bom)
- KiCad layout dir is copied into release dir (release-dir/layout)
- Metadata file is generated into release dir (release-dir/metadata.json)
- Generated artifacts are stored in .pcb/ dir (for now) and not uploaded
TODO:
- Upload the release bundle to API server
- Add a --dry-run to generate release bundle but not upload (similar to
cargo)
- Use the vendor/ dir for dependency resolution for deterministic builds
- Add pcb vendor subcommand, --offline flag for build/layout
- Add more release artifacts (e.g. gerbers, odb, etc.)
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix windows compat
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add support, test-coverage for workspace-relative loads
Assume that pcb.toml is needed for workspace-relative loads
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Use workspace root .pcb dir for staging releases
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
---------
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>