From 2a63840eb534c3dcd1f50477d935ecc92294f00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Fri, 7 Jul 2023 15:08:26 +0200 Subject: [PATCH] Add Meson cross-file for WebAssembly with Emscripten --- scripts/wasm.ini | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/wasm.ini diff --git a/scripts/wasm.ini b/scripts/wasm.ini new file mode 100644 index 00000000..d8721e26 --- /dev/null +++ b/scripts/wasm.ini @@ -0,0 +1,21 @@ +# Cross-compile file for creating a WebAssembly version of the preprocessor +# Requires emscripten to be installed +# Creates a .wasm and .js wrapper under <builddir>/src/ +# Can be run locally with node.js using: +# node --no-experimental-fetch dynare-preprocessor.js + +[binaries] +cpp = 'em++' + +[host_machine] +system = 'emscripten' +cpu_family = 'wasm64' +cpu = 'wasm64' +endian = 'little' + +[properties] +# It’s necessary to use a different copy of Boost than the one under +# /usr/include, because otherwise GCC headers confuse Clang +#boost_root = '/path/to/boost' +# For accessing the local filesystem +cpp_link_args = [ '-s', 'NODERAWFS=1' ] -- GitLab