frontend.wasm is a library that takes an AST defined by IR::IR and writes embind code. The idea is to be able to use the C++ code that corresponds to the AST from the web via the generated embind.
frontend.wasm is a part of the Tolc project and is used to support creating WebAssembly bindings.
Here is a general overview:
Requirements:
- CMake
- Emscripten (only for tests)
- conan
- clang
- For the tests:
- Emscripten (Compile integration tests)
- npm & node (Used to run parts of integration tests with Jest)
Configure the project:
$ cmake -S. -Bbuild -G Ninja -DCMAKE_CXX_COMPILER="clang++" -DCMAKE_C_COMPILER="clang" -DCMAKE_BUILD_TYPE="Debug" -DENABLE_TESTING=ON -DENABLE_PACKAGING=ONBuild tolc:
$ cmake --build buildTest with ctest:
$ cd build
$ ctest --output-on-failureInstall with CPack:
$ cpack -G TGZ --config build/CPackConfig.cmake