Commit Graph

14 Commits

Author SHA1 Message Date
akhilles c806635216 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>
2025-08-14 15:59:40 -07:00
Akhil Velagapudi f20ac95f64 [DIO-298] [DIO-299] Add pcb bom command to generate unmatched bom (#66)
* Add structured, unmatched BOM export command

Run using `pcb bom <path/to/zen> -o json`

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Test bom command in CI

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Bump stdlib in examples from v0.2.0 to v0.2.2

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Remove default_multiplier, use struct for group key

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Use PhysicalValue to do less string parsing

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Add alternatives to group key

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Use DynamicFullWidth for the comfy table

Attempts to fit the table within terminal width.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-08-14 12:13:20 -07:00
Akhil Velagapudi a41fd301eb Parse unit records as AttributeValue::Physical (#68)
Reduce unnecessary conversions to/from strings.
Use rust_decimal for fixed precision.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-08-14 10:21:10 -07:00
Lenny Khazan b29b5865e5 pcb upgrade command (#64)
* `pcb upgrade` command

* remove pending snap

* clippy
2025-08-12 01:56:48 -04:00
Davide Asnaghi da1375abbd [FIX] multiple .pcb caches (#59)
* fix .pcb cache instantiation

* fix format
2025-08-05 11:15:11 -04:00
Lenny Khazan 92373d47ba Automatically cast int<>float (#52) 2025-07-29 23:39:47 -04:00
Lenny Khazan 891f4698b1 update version to 0.2.0-prerelease.1 (#42) 2025-07-22 13:53:31 -04:00
Lenny Khazan ad6f0ded3a Refactor load logic into pcb-zen-core (#33)
* wip

* RemoteFetcher

* refactor load logic

* update bundle

* updates

* cleanup

* fixes

* skip on windows

* remove unused
2025-07-18 15:12:53 -04:00
Lenny Khazan acff75845c Schematics Viewer v2 (#23)
* Support net symbols

* Run renderer tests in CI

* renderer -> LayoutEngine

* wip

* rename

* add examples

* support symbol "extends"

* start reworking layout engine + snapshot tests

* add examples

* wip add nets

* Add signature to ModuleValue

* tweaks

* per-component net labels

* movable

* WIP with ELK

* wip libavoid

* misc fix

* better

* betterer

* improvements

* more

* update

* junction detection

* better

* snapping and stuff

* fix re-rendering

* more better

* more

* cargo fmt

* update bg

* eslint

* cleanup, tests
2025-07-12 13:24:55 -04:00
Davide Asnaghi 44891494ef [FMT] implement formatter (#25)
* add pcb fmt

* unify pcb path in extension

* change the name of the extension

* bundle buildifier

* better path res

* fix clippy

* recursive

* fix format

* fix one more

* cargo info

* fix format on save
2025-07-10 16:24:25 -07:00
Davide Asnaghi e7a71f1fdb [MODULE] resolve workspace loads (#19)
* use load resolving with modules

* local package resolution

* fix spec

* update snapshots

* remove unnecessary code

* move to snapshot tests

* revert eval errors

* canonical cache

* make tests work on windows

* refresh snap

* do not shadow alias

* fix: Add serial_test to prevent race conditions in module loading tests

- Add serial_test dependency to pcb-zen crate
- Mark tests that use package aliases with #[serial_test::serial]
- This prevents race conditions with the global ALIAS_CACHE when tests run in parallel
- Fixes test failures on Ubuntu where path canonicalization differs from macOS
2025-07-06 23:34:42 -07:00
Lenny Khazan f75787dbf3 Standardize crate metadata (#10) 2025-07-02 23:40:29 -04:00
Lenny Khazan 143633eb14 Starlark -> Zener (#8) 2025-07-02 17:25:45 -04:00
Lenny Khazan e852477546 Initial release (#5)
* Initial release

* cargo-dist

* build and test CI

* update ubuntu workflow

* fmt

* ubuntu: install deps

* clippy: 0.1.88 fixes

* format

* install clippy

* Update README.md

* Don't run cargo-dist on PRs
2025-07-01 04:06:08 -04:00