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

Add WASM/JS support via wasm-bindgen #33

Closed
wants to merge 1 commit into from
Closed

Add WASM/JS support via wasm-bindgen #33

wants to merge 1 commit into from

Conversation

sdroege
Copy link
Owner

@sdroege sdroege commented Sep 26, 2020

Fixes #32

Can be built with wasm-pack:

wasm-pack build --target web -- --features wasm

Example using this can be found here: https://coaxion.net/~slomo/ebur128-wasm/

TODO

  • CI integration
  • Tests

@sdroege
Copy link
Owner Author

sdroege commented Sep 26, 2020

Currently kind-of blocked by rustwasm/wasm-pack#886

Workaround for now would be

diff --git a/Cargo.toml b/Cargo.toml
index bc79e90..e03ba85 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -60,6 +60,10 @@ version = "1.2.4"
 name = "ebur128"
 version = "1.2.4"
 
+[package.metadata.wasm-pack.profile.release]
+# See https://github.com/rustwasm/wasm-pack/issues/886
+wasm-opt = false
+
 [[bench]]
 name = "interp"
 harness = false

@wong2
Copy link

wong2 commented Jul 1, 2021

is it working now?

@sdroege
Copy link
Owner Author

sdroege commented Jul 1, 2021

is it working now?

Yes, see https://coaxion.net/~slomo/ebur128-wasm/

I need to spend some time on cleaning this up and merging it though, see the TODO list in the initial commit.

@wong2
Copy link

wong2 commented Jul 1, 2021

great!

@sdroege
Copy link
Owner Author

sdroege commented Jul 1, 2021

If you want to help with that, please go ahead :)

@sdroege sdroege mentioned this pull request Jan 31, 2022
@sdroege sdroege deleted the branch master December 11, 2022 08:22
@sdroege sdroege closed this Dec 11, 2022
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.

WIP: Add WASM/JS bindings via wasm-bindgen and example
2 participants