diff options
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/wasmlibs.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/snippets/wasmlibs.md b/docs/markdown/snippets/wasmlibs.md new file mode 100644 index 0000000..15434d1 --- /dev/null +++ b/docs/markdown/snippets/wasmlibs.md @@ -0,0 +1,13 @@ +## Add support for `find_library` in Emscripten + +The `find_library` method can be used to find your own JavaScript +libraries. The limitation is that they must have the file extension +`.js`. Other library lookups will look up "native" libraries from the +system like currently. A typical usage would look like this: + +```meson +glue_lib = cc.find_library('gluefuncs.js', + dirs: meson.current_source_dir()) +executable('prog', 'prog.c', + dependencies: glue_lib) +``` |