Skip to content

Remove wasm-pack from dev tooling, replacing it with custom tooling#4228

Open
Keavon wants to merge 5 commits into
masterfrom
remove-wasm-pack
Open

Remove wasm-pack from dev tooling, replacing it with custom tooling#4228
Keavon wants to merge 5 commits into
masterfrom
remove-wasm-pack

Conversation

@Keavon

@Keavon Keavon commented Jun 12, 2026

Copy link
Copy Markdown
Member

Closes #2919

YohYamasaki and others added 2 commits June 11, 2026 19:50
…ributes with graphic List<T> types (#4111)

* Add conversion from Fill to Table<Graphic>

* Refactor Vector vello renderer for Gradient / Color

# Conflicts:
#	node-graph/libraries/rendering/src/renderer.rs

* Refactor Vector SVG renderer for Gradient / Color

* Fix conflicts

* Add basic clipping-based fill for SVG rendering

* Use Cow to avoid cloning graphic list for fill

* Cleanup for Cow usage

* format code

* Use `<pattern>` instead of `<clipPath>` for clip

This simplifies the future implementation of clipping-based rendering
for strokes, as the stroke does not support the use of a clip path but
rather paint sources from a paint server.

* Move svg pattern rendering function to RenderExt

* Fix comment

* Fix empty fill list rendering as default black

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Move opaque check function to Graphic impl

* Add color converter and debug node to use graphic

* WIP: Use List<Graphic> to render Color & Gradient

* Use `Arc<List<Vector>>` for vector_data metadata

This exposes List's attributes to message handlers, enabling them to
access the necessary attribute data such as ATTR_STROKE_PAINT_GRAPHIC
as `Fill` and `Stroke` will not have paint information in the future.

* Recurse opacity checks on nested `Graphic`

Also extracts `fill_graphic_list_at` /
`stroke_paint_graphic_list_at` to share the row-attribute
lookup across the existing call sites.

* Fix fill and stroke visibility check degradation

* Fix clipping based stroke paint positioning

* Refactor vello renderer for stroke to use graphic

* Reduce `Fill` / `Stroke.color` to `List<Graphic>` allocations

* Revert "Use `Arc<List<Vector>>` for vector_data metadata"

This reverts commit 4285243

* Expose paint row attributes as dedicated metadata for vectors

Add `fill_attributes` / `stroke_paint_attributes` to `DocumentMetadata`
so the `ExpandFillStrokeOnSelectedLayers` handler can read row paint
visibility without exposing entire `List<Vector>`.

* Fix transparency check to consider fill opacity

* Fix consistency of gradient placement for SVG stroke

* Rename `stroke_paint_..` to `stroke_..`

* Remove debug nodes

* Allow to use any graphic type without casting

* Rename `fill_graphic` / `stroke_graphic` to `fill` / `stroke`

* Fix SVG pattern placement when stroke transform differs from item transform

* Fix click target fill check for empty list in graphic

* Fix blank fill/stroke attribute masking legacy style

* Fix SVG's paint order trick for vector/raster fills

* Add zero-division guard for pattern wraparound prevention

* Code review

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
@Keavon Keavon requested a review from timon-schelling June 12, 2026 08:21

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 issues found across 13 files

Confidence score: 3/5

  • In tools/cargo-run/src/wasm.rs, target_dir() and watch_shell_commands() use inconsistent target-path logic (CARGO_TARGET_DIR not normalized in one place, hardcoded ../../target in another), so builds/watch mode can look for wasm artifacts in the wrong location and fail for configured workspaces—unify both call sites on a single workspace-root-aware target-dir resolver before merging.
  • In tools/cargo-run/src/requirements.rs, the platform check treats Windows ARM64 as unsupported for Binaryen, which can cause wasm-opt auto-install to fail on a supported platform and block developer workflows—update the support matrix/detection logic for Windows ARM64 and verify with a platform-specific test path.
  • In tools/cargo-run/src/requirements.rs, Binaryen archives are downloaded and extracted without checksum verification, so a tampered artifact could be installed into the managed toolchain path—add checksum/signature validation for release assets before extraction prior to merge.
  • In tools/cargo-run/src/lib.rs, Windows Ctrl+C state is not reset between runs, which can make later dev-server executions appear successful when they were interrupted—reset the Ctrl+C flag during shutdown/startup to avoid false-success reporting.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread tools/cargo-run/src/wasm.rs Outdated
Comment thread tools/cargo-run/src/wasm.rs Outdated
Comment thread tools/cargo-run/src/requirements.rs
Comment thread tools/cargo-run/src/requirements.rs
Comment thread tools/cargo-run/src/lib.rs

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces wasm-pack with a custom Rust-based build process in tools/cargo-run that directly manages cargo build, wasm-bindgen, and wasm-opt (Binaryen) installations. It also improves process supervision and Ctrl+C handling on Windows. Feedback on these changes highlights two issues: first, hardcoding the relative path ../../target in watch_shell_commands will break builds when a custom CARGO_TARGET_DIR is configured; second, SetConsoleCtrlHandler could register duplicate handlers if install_handler is invoked multiple times, which can be resolved using std::sync::Once.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tools/cargo-run/src/wasm.rs
Comment thread tools/cargo-run/src/lib.rs
Keavon added 3 commits June 12, 2026 01:32
…duction

The devDependencies hold the build tooling (Vite, etc.), which npm omits in
environments that set NODE_ENV=production, like CI does for the Vite build.
The install timestamp check now also covers package-installer.js itself so
changes to the install process trigger a reinstall.
@Keavon

Keavon commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

!build desktop (Run ID 27447741636)

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
📦 Linux Build Complete for fd34596
Download binary
Download Flatpak

@github-actions

Copy link
Copy Markdown
📦 Mac Build Complete for fd34596
Download binary

@github-actions

Copy link
Copy Markdown
📦 Windows Build Complete for fd34596
Download binary

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.

Replace wasm-pack, which is being deprecated

2 participants