diff options
Diffstat (limited to 'test cases/wasm/3 jslib')
-rw-r--r-- | test cases/wasm/3 jslib/meson.build | 8 | ||||
-rw-r--r-- | test cases/wasm/3 jslib/prog.c | 10 | ||||
-rw-r--r-- | test cases/wasm/3 jslib/somefuncs.js | 6 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test cases/wasm/3 jslib/meson.build b/test cases/wasm/3 jslib/meson.build new file mode 100644 index 0000000..3cc1740 --- /dev/null +++ b/test cases/wasm/3 jslib/meson.build @@ -0,0 +1,8 @@ +project('jslib', 'c') + +cc = meson.get_compiler('c') + +sf_dep = cc.find_library('somefuncs.js', dirs: meson.current_source_dir()) + +executable('libcallc', 'prog.c', + dependencies: sf_dep)
\ No newline at end of file diff --git a/test cases/wasm/3 jslib/prog.c b/test cases/wasm/3 jslib/prog.c new file mode 100644 index 0000000..780da7c --- /dev/null +++ b/test cases/wasm/3 jslib/prog.c @@ -0,0 +1,10 @@ +#include <stdio.h> +#include <emscripten.h> + +extern void sample_function(); + +int main() { + printf("Hello World\n"); + // sampleFunction(); ???? + return 0; +} diff --git a/test cases/wasm/3 jslib/somefuncs.js b/test cases/wasm/3 jslib/somefuncs.js new file mode 100644 index 0000000..1c00336 --- /dev/null +++ b/test cases/wasm/3 jslib/somefuncs.js @@ -0,0 +1,6 @@ +mergeInto(LibraryManager.library, { + sample_function__sig: 'v', + sample_function: function() { + alert("Something happened!"); + }, +}); |