Skip to content

feat(chip-viewer): add a browser target - #212

Open
Lfan-ke wants to merge 1 commit into
openecos-projects:mainfrom
Lfan-ke:feat/chip-viewer-wasm
Open

Lfan-ke wants to merge 1 commit into
openecos-projects:mainfrom
Lfan-ke:feat/chip-viewer-wasm

Conversation

@Lfan-ke

@Lfan-ke Lfan-ke commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

chip-viewer-native cannot be built for wasm32: main.rs parses CLI arguments and chip-view-db memory-maps its input. This adds chip-viewer-wasm, which keeps the portable half — the layer styling in chip-display, whose only dependency is chipgeom-format — behind an eframe app the host page mounts on a canvas.

chip-viewer-native is untouched.

Verification

cargo check -p chip-viewer-wasm --target wasm32-unknown-unknown   Finished
cargo check --workspace                                           Finished
cargo fmt --all -- --check                                        clean

The new CI step runs the first of these, so the browser path cannot silently rot.

index.html is the development shell; producing a distributable bundle needs wasm-pack and is left out of this PR.

chip-viewer-native cannot be built for wasm32: main.rs parses CLI arguments
and chip-view-db memory-maps its input. Add chip-viewer-wasm, which keeps the
portable half — the layer styling in chip-display — behind an eframe app the
host page mounts on a canvas.

CI checks the target so the browser path cannot silently rot.

Signed-off-by: Leo Cheng <chengkelfan@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant