From 45ca77178ddf748b798f2ff9b9a2f02a4ddb4f46 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 --- wasm.ini | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 wasm.ini diff --git a/wasm.ini b/wasm.ini new file mode 100644 index 00000000..fedef874 --- /dev/null +++ b/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 +# 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