Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2: Include VegaFusionRuntime in vegafusion-wasm #527

Merged
merged 7 commits into from
Nov 5, 2024

Conversation

jonmmease
Copy link
Collaborator

@jonmmease jonmmease commented Nov 2, 2024

This PR adds an embedded VegaFusionRuntime to the vegafusion-wasm package. This required a bit or feature flagging, but in the end I got the editor example updated to include a checkbox for whether to use the embedded VegaFusionRuntime, or to communicate with a VegaFusionServer instance over grpc-web.

Support for loading files from http and https URLs is provided by the object-store-wasm crate. Parquet is not currently supported due to issues compiling zstd.

Updated editor demo:

Screenshot 2024-11-02 at 2 44 35 PM

Size

When compiled with opt-level z and 1 codegen unit the size isn't as bad as I feared:

npm package size: 4.3 MB
npm unpacked size: 16.6 MB

This is ~3x larger than the build that only supports connecting to VegaFusionServer over gRPC-Web, so we could potentially publish multiple packages in the future if there is demand, but going to keep it simple for now with a single package.

As one comparison point, the duckdb-wasm package is duckdb-wasm from https://www.jsdelivr.com/package/npm/@duckdb/duckdb-wasm is 28.8MB compressed and 147MB extracted.

@jonmmease jonmmease merged commit c249028 into v2 Nov 5, 2024
19 checks passed
jonmmease added a commit that referenced this pull request Nov 16, 2024
* Support compiling full runtime to wasm

* fix

* fmt

* fix imports

* update profile

* profile updates

* update release-dev
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