Yet another Lisp. This time on LLVM.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sameer Rahmani 97b31e8cb0 Add the NsOp to represent namespaces 3 weeks ago
cmake Add new doxygen setup 3 months ago
devtools Add the NsOp to represent namespaces 3 weeks ago
docs Add the NsOp to represent namespaces 3 weeks ago
libserene Add the NsOp to represent namespaces 3 weeks ago
resources Remove unwanted backup files 3 months ago
scripts Fix the remaning license headers from the MIT era 2 months ago
serene-repl Disable serenec and serene-repl tests temporarily for refactoring 3 months ago
serene-tblgen Refactor the error handling system to have only one llvm error with many variants 2 months ago
serenec Disable serenec and serene-repl tests temporarily for refactoring 3 months ago
.clang-format Hide the clang-tidy behind a build option 7 months ago
.clang-tidy Add the more resouces about JIT to 5 months ago
.dockerignore Setup the dockerfiles necessary to build serene in a container 3 months ago
.gitignore Add the builder tasks to build and release docker images 3 months ago
.ignore_sanitize Add the IR generation facilities to Namespace and Expression 11 months ago
CMakeLists.txt Add devtools utility set 1 month ago
LICENSE Change the license to GPL2 7 months ago Fix the license header 3 months ago
builder Fix the builder paths for top level binaries 2 months ago Clean up the reader's test cases 2 months ago

Serene lang

Setup development environment

Setup the githook and install dependencies using the following commands:

./builder setup


You would need the following dependencies to start get started with Serene development

  • LLVM (LLVM Instructions coming up.)
  • cmake
  • ninja
  • doxygen (If you want to build the docs as well)
  • Valgrind
  • CCache (If you want faster builds specially with the LLVM)

LLVM Installation

Important Note: We're trying to keep Serene up to date with the LLVM release cycle till we get to our first release. So we use the development version of the LLVM. Currently we are using aff028f7d8322c625422febd3d8b9794746cdc5b commit as our reference.

MLIR is a part of the LLVM project and in order to build it we need to build the LLVM itself as well. Here is a quick guide to build the latest version of the LLVM and MLIR.

  ## YES we're using the development version of MLIR
  git clone

  mkdir llvm-project/build
  cd llvm-project/build

  cmake -G Ninja ../llvm \
        -DCMAKE_INSTALL_PREFIX=/your/target/path \
        -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_ENABLE_PROJECTS='clang;lldb;lld;mlir;clang-tools-extra;compiler-rt' \
        -DCMAKE_C_COMPILER=clang \       # If you have clang installed already
        -DCMAKE_CXX_COMPILER=clang++ \   # If you have clang installed already

  cmake --build .

  cmake --build . --target check-mlir

  cmake -DCMAKE_INSTALL_PREFIX=/your/target/location -P cmake_install.cmake

You need to have clang and lld installed to compile the LLVM with the above command. Also if you are not using ccache just remove the option related to it from the above command.


If you're using Emacs as your development environment just install clangd and lsp.

Heads up for devs

While you're working on Serene be mindful of:

  • In DEBUG mode we dynamically link against libsan due to the fact that we build the libserene as a shared lib by default. This means we need to LD_PRELOAD the libclang_rt before we run any executable. If you're using the builder script you're all set otherwise you can run an executable like:

      LD_PRELOAD=$(clang /path/to/executable

How to build

In order to build for development (Debug mode) just use ./builder build to setup the build and build the project once and then you can just use ./builder compile to build the changed files only.

Check out the builder script for more subcommands and details.



Copyright (c) 2019-2022 Sameer Rahmani <>

Serene is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <>.

Get Help

If you need help or you just want to hangout, you can find us at: