-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add initial integration with wasm-bindgen #23493
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
Merged
sbc100
merged 106 commits into
emscripten-core:main
from
walkingeyerobot:wbg-walkingeyerobot
Jun 10, 2026
Merged
Changes from 102 commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
e9bf8a0
first pass at a hack
walkingeyerobot 135405f
oops
walkingeyerobot e5b67a7
wasm bindgen setting
walkingeyerobot 6732eec
link in actual js output by wasm-bindgen
walkingeyerobot 1708fdf
don't try to predict the wasm filename
walkingeyerobot 5f3feae
address code review comments
walkingeyerobot 8ff4580
switch to single file js for bindgen
walkingeyerobot 44d0f55
Merge remote-tracking branch 'upstream/main' into wbg-walkingeyerobot
walkingeyerobot 836fbe6
minor cleanup
walkingeyerobot 2debab9
first test
walkingeyerobot ea4eab0
only avoid stripping if wasm bindgen is enabled
walkingeyerobot d7faa6b
remove irrelevant comment; going to solve this a different way
walkingeyerobot cb281cb
Make HEAP_DATA_VIEW available for wasm-bindgen regardless of endianness
google-yfyang 2843e36
Automatically infer what symbols to export for wasm-bindgen
googlewalt 26cd774
Remove hack not to export system libraries
googlewalt cfc9b11
Merge pull request #1 from googlewalt/linkargs
walkingeyerobot c2dfc91
wasm bindgen now uses the 'env' property instead of its own 'wbg'
walkingeyerobot 4196290
with newer rustc, there appears to be a bunch of anon symbols that we…
walkingeyerobot 8c08d8e
pass --keep-debug to wasm-bindgen always.
walkingeyerobot 50e8795
Merge branch 'branch-405' into wbg-walkingeyerobot
walkingeyerobot 09992ae
Merge branch 'branch-406' into wbg-walkingeyerobot
walkingeyerobot 126f551
Merge branch 'branch-407' into wbg-walkingeyerobot
walkingeyerobot c779002
Merge branch 'branch-408' into wbg-walkingeyerobot
walkingeyerobot 8e5fd0a
Merge branch 'branch-409' into wbg-walkingeyerobot
walkingeyerobot feaf9be
Merge remote-tracking branch 'upstream/main' into wbg-walkingeyerobot
walkingeyerobot 50b600f
Merge remote-tracking branch 'upstream/main' into wbg-walkingeyerobot
walkingeyerobot 50c4fe1
Get typescript with wasm-bindgen to work
google-yfyang 24be666
Merge remote-tracking branch 'upstream/main' into wbg-walkingeyerobot
walkingeyerobot fe3db01
don't do big endian stuff with bindgen stuff unless explicitly asked to
walkingeyerobot 6d1c5ff
make typescript work with emscripten (part2)
google-yfyang 9c92122
Merge pull request #2 from walkingeyerobot/yfyang
walkingeyerobot 3be75f2
Merge remote-tracking branch 'upstream/main' into wbg-walkingeyerobot
walkingeyerobot 4e8aab6
Merge branch 'wbg-walkingeyerobot' of github.com:walkingeyerobot/emsc…
walkingeyerobot 20839d5
Merge tag '4.0.15' into wbg-walkingeyerobot
walkingeyerobot 95c89b5
Merge tag '4.0.16' into wbg-walkingeyerobot
walkingeyerobot 65fca2a
Merge tag '4.0.17' into wbg-walkingeyerobot
walkingeyerobot e40e789
Merge tag '4.0.18' into wbg-walkingeyerobot
walkingeyerobot 45c8c8f
Merge tag '4.0.19' into wbg-walkingeyerobot
walkingeyerobot 11855f5
Merge tag '4.0.20' into wbg-walkingeyerobot
walkingeyerobot 24d681b
Merge tag '4.0.21' into wbg-walkingeyerobot
walkingeyerobot 2ef1305
Merge tag '4.0.22' into wbg-walkingeyerobot
walkingeyerobot dfd65cf
Merge tag '4.0.23' into wbg-walkingeyerobot
walkingeyerobot fe99e55
Merge tag '5.0.0' into wbg-walkingeyerobot
walkingeyerobot 1c74e70
Merge remote-tracking branch 'upstream/main' into wbg-walkingeyerobot
walkingeyerobot 79a4af7
Merge remote-tracking branch 'upstream/main' into wbg-walkingeyerobot
walkingeyerobot 9627ee3
add missing import glob
walkingeyerobot cba2609
Merge tag '5.0.2' into wbg-walkingeyerobot
walkingeyerobot d56b37f
Merge tag '5.0.3' into wbg-walkingeyerobot
walkingeyerobot 64f0dad
Merge tag '5.0.4' into wbg-walkingeyerobot
walkingeyerobot e146085
Merge remote-tracking branch 'upstream/main' into wbg-walkingeyerobot
walkingeyerobot 44d3059
remove unneeded --target flag
walkingeyerobot 1b72851
update docs
walkingeyerobot afebddc
fix python warnings
walkingeyerobot 80d0b67
python lint fix
walkingeyerobot 3cd3b31
more python lint fixes
walkingeyerobot 68eb9b2
use wasm-bindgen for testing properly
walkingeyerobot 2b1c672
Merge tag '5.0.6' into wbg-walkingeyerobot
walkingeyerobot d229aaf
Merge remote-tracking branch 'upstream/main' into wbg-walkingeyerobot
walkingeyerobot e55a8a1
fix the test once and for all
walkingeyerobot bc3a3f0
...once and for all
walkingeyerobot bf9d095
ONCE AND FOR ALL
walkingeyerobot 6029dd7
ok maybe I'm a little lost
walkingeyerobot c082ea1
my hopes have never been higher, and yet...
walkingeyerobot 78b0a55
this one for sure
walkingeyerobot 1925b05
I should probably go to bed
walkingeyerobot b009b61
don't require rust
walkingeyerobot 2b591ee
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 4b27565
this appears to work now
walkingeyerobot a739374
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 5cc0091
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 094743a
prevent export renaming for wasm-bindgen test
walkingeyerobot ebd53fe
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 076abcb
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot dc705f4
fix an error where strings were being appended instead of LinkFlag ob…
walkingeyerobot 06cf81a
python lint fixes
walkingeyerobot f19ae01
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot b804a48
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 298d746
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 7898c9d
fix bad merge on my part
walkingeyerobot 389f901
how did this not fail earlier
walkingeyerobot aa7bcc2
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 3f38afd
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 2ae5656
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 067c6c8
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 4661535
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 13b5ce7
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot aa92019
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot d96723a
remove the WASM_BINDGEN config var
walkingeyerobot e9488b9
revert unrelated change
walkingeyerobot 311eba5
code review fixes
walkingeyerobot a8aac50
revert the need for HEAP_DATA_VIEW
walkingeyerobot c279e12
code review fixes
walkingeyerobot 6c64bc7
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot d93502c
ruff fix
walkingeyerobot 324f531
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 6058f5b
address code review comments
walkingeyerobot 2e49e2e
ruff fix
walkingeyerobot 9fe6273
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot 68f8ec6
address code review comments
walkingeyerobot 1496c65
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot c5098e8
preserve ordering for error message
walkingeyerobot 6450e25
Merge branch 'main' into wbg-walkingeyerobot
walkingeyerobot e5868de
move LinkFlag back to emcc.py
walkingeyerobot bc90fdf
add changelog entry
walkingeyerobot 9a55f3a
80 cols
walkingeyerobot cbfa9ac
add PR to changelog
walkingeyerobot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [build] | ||
| target = "wasm32-unknown-emscripten" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [build] | ||
| target = "wasm32-unknown-emscripten" | ||
| rustflags = [ | ||
| "-Cllvm-args=-enable-emscripten-cxx-exceptions=0", | ||
| "-Cpanic=abort", | ||
| "-Crelocation-model=static", | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [package] | ||
| name = "bindgen_integration" | ||
| edition = "2021" | ||
|
|
||
| [lib] | ||
| crate-type = ["staticlib"] | ||
|
|
||
| [dependencies] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| use wasm_bindgen::prelude::*; | ||
|
|
||
| #[wasm_bindgen] | ||
| pub fn rs_add(a: i32, b: i32) -> i32 { | ||
| return a + b; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.