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

feat: basic wasm support for turbopack #5618

Merged
merged 4 commits into from
Aug 2, 2023

Conversation

ForsakenHarmony
Copy link
Contributor

@ForsakenHarmony ForsakenHarmony commented Jul 26, 2023

Description

Adds basic support for loading WebAssembly files imported from ECMAScript modules.

I've also added some docs to the async module implementation.

Fixes WEB-316

@vercel
Copy link

vercel bot commented Jul 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-kitchensink-blog 🔄 Building (Inspect) Visit Preview 💬 Add feedback Aug 2, 2023 4:11pm
examples-native-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Aug 2, 2023 4:11pm
examples-nonmonorepo 🔄 Building (Inspect) Visit Preview 💬 Add feedback Aug 2, 2023 4:11pm
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2023 4:11pm
7 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Aug 2, 2023 4:11pm
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Aug 2, 2023 4:11pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Aug 2, 2023 4:11pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Aug 2, 2023 4:11pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Aug 2, 2023 4:11pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Aug 2, 2023 4:11pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Aug 2, 2023 4:11pm

@github-actions
Copy link
Contributor

✅ This change can build next-swc

@github-actions
Copy link
Contributor

github-actions bot commented Jul 26, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

@github-actions
Copy link
Contributor

Linux Benchmark for cc84da6

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5441.45µs ± 23.63µs 5406.66µs ± 22.80µs -0.64%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5069.62µs ± 16.86µs 5070.82µs ± 18.84µs +0.02%
bench_startup/Turbopack CSR/1000 modules 993.01ms ± 1.79ms 994.16ms ± 2.43ms +0.12%

@github-actions
Copy link
Contributor

MacOS Benchmark for cc84da6

Test Base PR % Significant %
bench_hmr_to_eval/Turbopack CSR/1000 modules 23.31ms ± 1.04ms 28.00ms ± 0.13ms +20.12% +9.26%
bench_startup/Turbopack CSR/1000 modules 3882.19ms ± 136.27ms 4543.27ms ± 180.29ms +17.03% +0.67%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 29.52ms ± 0.15ms 29.60ms ± 0.73ms +0.30%
bench_hmr_to_eval/Turbopack CSR/1000 modules 23.31ms ± 1.04ms 28.00ms ± 0.13ms +20.12% +9.26%
bench_startup/Turbopack CSR/1000 modules 3882.19ms ± 136.27ms 4543.27ms ± 180.29ms +17.03% +0.67%

@github-actions
Copy link
Contributor

Linux Benchmark for 4da925b

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5931.88µs ± 48.24µs 5882.74µs ± 26.37µs -0.83%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5393.83µs ± 17.86µs 5658.79µs ± 229.45µs +4.91%
bench_startup/Turbopack CSR/1000 modules 1002.44ms ± 1.61ms 1005.74ms ± 3.69ms +0.33%

@github-actions
Copy link
Contributor

MacOS Benchmark for 4da925b

Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 27.41ms ± 0.09ms 26.96ms ± 0.11ms -1.61% -0.12%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 27.41ms ± 0.09ms 26.96ms ± 0.11ms -1.61% -0.12%
bench_hmr_to_eval/Turbopack CSR/1000 modules 26.55ms ± 0.23ms 27.40ms ± 0.36ms +3.21%
bench_startup/Turbopack CSR/1000 modules 3212.93ms ± 35.29ms 3419.64ms ± 94.53ms +6.43%

@ForsakenHarmony
Copy link
Contributor Author

ForsakenHarmony commented Jul 28, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@github-actions
Copy link
Contributor

Linux Benchmark for 1476de9

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5398.14µs ± 24.55µs 5406.75µs ± 16.85µs +0.16%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5091.87µs ± 20.73µs 5076.30µs ± 34.65µs -0.31%
bench_startup/Turbopack CSR/1000 modules 983.59ms ± 2.05ms 989.13ms ± 4.31ms +0.56%

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

Linux Benchmark for 9d81569

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 6450.64µs ± 51.91µs 6408.43µs ± 115.67µs -0.65%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5951.39µs ± 55.40µs 6153.19µs ± 304.58µs +3.39%
bench_startup/Turbopack CSR/1000 modules 993.66ms ± 3.25ms 993.01ms ± 6.56ms -0.07%

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

MacOS Benchmark for 9d81569

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 10.04s ± 2.22s 3949.35ms ± 137.28ms -60.65% -24.61%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 28.74ms ± 0.09ms 28.48ms ± 0.30ms -0.91%
bench_hmr_to_eval/Turbopack CSR/1000 modules 26.42ms ± 0.80ms 27.95ms ± 0.31ms +5.79%
bench_startup/Turbopack CSR/1000 modules 10.04s ± 2.22s 3949.35ms ± 137.28ms -60.65% -24.61%

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

Linux Benchmark for 93819b5

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5393.21µs ± 18.45µs 5413.22µs ± 22.59µs +0.37%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5056.86µs ± 21.97µs 5347.07µs ± 326.02µs +5.74%
bench_startup/Turbopack CSR/1000 modules 986.58ms ± 0.77ms 986.71ms ± 1.82ms +0.01%

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

MacOS Benchmark for 93819b5

Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 27.37ms ± 0.07ms 27.83ms ± 0.06ms +1.69% +0.69%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 27.37ms ± 0.07ms 27.83ms ± 0.06ms +1.69% +0.69%
bench_hmr_to_eval/Turbopack CSR/1000 modules 26.89ms ± 0.12ms 26.87ms ± 0.16ms -0.07%
bench_startup/Turbopack CSR/1000 modules 3443.07ms ± 66.69ms 3517.58ms ± 180.36ms +2.16%

Copy link
Contributor

@arlyon arlyon left a comment

Choose a reason for hiding this comment

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

Exciting, approved on behalf of repo

@ForsakenHarmony ForsakenHarmony merged commit edacec8 into main Aug 2, 2023
33 of 34 checks passed
@ForsakenHarmony ForsakenHarmony deleted the hrmny/web-316-wasm-loading branch August 2, 2023 16:19
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

Linux Benchmark for 5d18f0d

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5377.89µs ± 33.71µs 5402.01µs ± 21.33µs +0.45%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5056.08µs ± 16.35µs 5138.14µs ± 79.37µs +1.62%
bench_startup/Turbopack CSR/1000 modules 998.90ms ± 1.39ms 994.22ms ± 3.06ms -0.47%

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

MacOS Benchmark for 5d18f0d

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 24.63s ± 3.45s 8154.58ms ± 2697.90ms -66.89% -23.56%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 28.55ms ± 0.47ms 27.44ms ± 0.11ms -3.89%
bench_hmr_to_eval/Turbopack CSR/1000 modules 25.64ms ± 0.74ms 26.62ms ± 0.11ms +3.83%
bench_startup/Turbopack CSR/1000 modules 24.63s ± 3.45s 8154.58ms ± 2697.90ms -66.89% -23.56%

ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Jul 25, 2024
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Jul 29, 2024
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants