Comments (6)
-s EXPORTED_FUNCTIONS=["_free"]
seems to have done the trick, thanks!
I still will get an ReferenceError: dynCall is not defined
if I try to compile it without the -sDYNCALLS=1
flag
from datachannel-wasm.
Oh, this only seems to be a problem with newer versions of emscripten. Trying out an old version of emscripten like 2.0.3, there's no need for -sDYNCALLS=1, and there's no complications in calling free()
from datachannel-wasm.
According to their changelog at https://emscripten.org/docs/introducing_emscripten/release_notes.html#changelog:
2.0.4: 09/16/2020
- First release with Bazel support.
- Stop including
malloc
andfree
by default. If you need access to them from
JS, you must export them manually using
-s EXPORTED_FUNCTIONS=['_malloc', ..]
. - Stop running Binaryen optimizations in
-O1
. This makes-O1
builds a little
larger but they compile a lot faster, which makes more sense in a "compromise"
build (in between-O0
and higher optimization levels suitable for release
builds). (#12178) - Add
ERROR_ON_WASM_CHANGES_AFTER_LINK
option that errors if we need to do
any work inwasm-emscripten-finalize
orwasm-opt
after linking. This
can verify the link is maximally fast and also does no DWARF rewriting.
(#12173)
from datachannel-wasm.
huh, actually looks like linking works up to emscripten 2.0.9
from datachannel-wasm.
There should be no need for DYNCALLS=1
as it enables a legacy API with functions like dynCall_vi
, it is not necessary for the dynCall
function:
2.0.13: 01/19/2021
------------------
- Add back support for calling the legacy dynCall_sig() API to invoke function
pointers to wasm functions from JavaScript. Pass -s DYNCALLS=1
to include that functionality in the build. This fixes a regression that
started in Aug 31st 2020 (Emscripten 2.0.2)
There is a confusion between EXPORTED_FUNCTIONS
and EXPORTED_RUNTIME_METHODS
: EXPORTED_FUNCTIONS
makes functions accessible from the compiled C/C++ code (otherwise they might be removed to make the build smaller), and EXPORTED_RUNTIME_METHODS
exposes runtime functions to JavaScript code.
Here _free
ends up optimized out so you need to add it to EXPORTED_FUNCTIONS
: -s EXPORTED_FUNCTIONS=["_free"]
from datachannel-wasm.
The dynCall issue should be fixed by #39
from datachannel-wasm.
Related Issues (20)
- suggestion about removing libdatachannel as a submodule HOT 2
- Usage of IceServer as a struct in Configuration HOT 1
- Concerns about Async operations HOT 4
- About using stringToUTF8 instead of allocUTF8FromString in webrtc.js and websocket.js HOT 2
- AS option? HOT 19
- onBufferedAmountLow is annoying HOT 11
- Missing rtc* functions during linking HOT 5
- how to use? can i use this in some embed v8 env to support wrtc? HOT 3
- Copy and Paste troubles HOT 5
- Failed to execute 'createDataChannel' on 'RTCPeerConnection': RTCDataChannel cannot have both max retransmits and max lifetime HOT 10
- ServiceWorker datachannel-wasm <=> window native datachannel HOT 3
- usecase HOT 3
- Nodejs support HOT 3
- datachannel-wasm with C based code HOT 4
- send Bytes over DataChannel HOT 3
- Align reliability API with the new API in libdatachannel
- Using Multithreading HOT 2
- support media transport HOT 1
- Match libdatachannel's reliability.hpp HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datachannel-wasm.