You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With clang building the C parts of it, this should be possible, right? ...right?
The main blocker I hit was the slice_deque library, which uses Virtual Memory Tricks to give you a cheap ring buffer that's always linear. Webassembly doesn't have virtual memory, so you can't do that; see gnzlbg/slice_deque#60 for discussion.
So I was thinking the best solution would be to wrap the SliceDeque that this library uses in a type that presents the same API but does copying under the hood when necessary on platforms that slice_deque doesn't support. If you're willing I'll gladly contribute the changes.
Thanks so much!
The text was updated successfully, but these errors were encountered:
With clang building the C parts of it, this should be possible, right? ...right?
My knowledge of wasm is limited atm,
I think (might be completely wrong) minimp3 (the original C) would need to be built into a wasm module (I haven't checked if it is possible), then remove the ffi interface from this crate, and replace it with glue code to interoperate with the wasm module from Rust..
So I was thinking the best solution would be to wrap the SliceDeque
I'm not sure if the implementation belongs in this crate (we don't event have test. I need fix this someday). How about a fork with the changes you suggest in your issue?
As an experiment, maybe it would be worth trying to write wasm-bindgen bindings for this repo: https://github.com/bashi/minimp3-wasm (I just found out about it and haven't tried it myself)
With
clang
building the C parts of it, this should be possible, right? ...right?The main blocker I hit was the
slice_deque
library, which uses Virtual Memory Tricks to give you a cheap ring buffer that's always linear. Webassembly doesn't have virtual memory, so you can't do that; see gnzlbg/slice_deque#60 for discussion.So I was thinking the best solution would be to wrap the
SliceDeque
that this library uses in a type that presents the same API but does copying under the hood when necessary on platforms thatslice_deque
doesn't support. If you're willing I'll gladly contribute the changes.Thanks so much!
The text was updated successfully, but these errors were encountered: