Skip to content

Tolc-Software/frontend.wasm

Repository files navigation

Ubuntu MacOS Windows Windows-debug-deploy

frontend.wasm

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.

Building

Here is a general overview:

Requirements:

  • CMake
  • Emscripten (only for tests)
  • conan
  • clang
  • For the tests:

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=ON

Build tolc:

$ cmake --build build

Test with ctest:

$ cd build
$ ctest --output-on-failure

Install with CPack:

$ cpack -G TGZ --config build/CPackConfig.cmake