Skip to content

Tolc-Software/frontend.swift

Repository files navigation

Ubuntu MacOS Windows Windows-debug-deploy

NOTE: This is a work in progress. The Objective-C output is merged in Tolc and Swift is coming soon

frontend.swift

frontend.swift is a library that takes an AST defined by IR::IR and writes bindings to Objective-C and Swift.

frontend.swift is a part of the Tolc project.

Building

frontend.swift can be built on Linux, MacOS, and Windows. The tests however rely on MacOS specific headers (e.g. Foundation) and is only built there. See the CI pipelines for more platform specific information..

Here is a general overview:

Requirements:

  • CMake
  • python3
  • conan
  • clang

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