Just another Lisp https://serene-lang.org
Go to file
Sameer Rahmani 263e3f7384
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/notify unknown status Details
Add bunch of resources to the devs.org
2023-05-14 11:11:13 +01:00
.woodpecker ci: Upgrade build to tag 10 2023-05-14 11:11:08 +01:00
cmake builder: Add support for automatic toolchain setup 2023-05-12 18:41:06 +01:00
core Fix the license header for 2023 2023-02-06 17:40:45 +00:00
devtools Fix the license header for 2023 2023-02-06 17:40:45 +00:00
docs Fix the license header for 2023 2023-02-06 17:40:45 +00:00
libserene Fix the license header for 2023 2023-02-06 17:40:45 +00:00
libserene.v0 Fix the license header for 2023 2023-02-06 17:40:45 +00:00
resources toolchain: Create a build script for stage0 compiler and runtimes 2023-03-16 23:12:49 +00:00
scripts Remove the redundant deps.sh 2023-05-12 18:41:20 +01:00
serene Clean up main cmake scripts 2023-05-12 18:38:58 +01:00
serene-repl Fix the license header for 2023 2023-02-06 17:40:45 +00:00
serene-tblgen Fix the license header for 2023 2023-02-06 17:40:45 +00:00
serenec Fix the license header for 2023 2023-02-06 17:40:45 +00:00
.clang-format Hide the clang-tidy behind a build option 2021-10-17 22:22:49 +01:00
.clang-tidy Add the more resouces about JIT to dev.org 2021-12-29 13:12:36 +00:00
.dockerignore Setup the dockerfiles necessary to build serene in a container 2022-02-08 17:43:29 +00:00
.gitignore Add .tmp to gitignore 2022-07-06 21:33:51 +01:00
.gitmodules deps: Remove all the submodules to try subtrees 2023-02-20 22:55:58 +00:00
.ignore_sanitize Fix the broken bash array to str process in the builder 2022-06-12 20:40:36 +01:00
.pre-commit-config.yaml Add the build-in-devfs command to builder 2022-07-12 00:34:30 +01:00
CMakeLists.txt Update the read me file with the new build instructions 2023-05-12 18:59:55 +01:00
LICENSE Add include-fixer to pre-commit 2022-06-12 22:34:12 +01:00
README.org ci: Build again with a (cmake/ninja)less toolchain 2023-05-12 19:55:17 +01:00
builder builder: Add support for automatic toolchain setup 2023-05-12 18:41:06 +01:00
dev.org Add bunch of resources to the devs.org 2023-05-14 11:11:13 +01:00

README.org

Serene lang

Serene is a modern typed lisp. It's not done and heavily under development.

Dependencies

Here is the list of dependencies that need to be present:

  • LLVM (You can find the exact version in the builder script)
  • CMake >= 3.19
  • Ninja
  • include-what-you-use
  • Valgrind (Optional and only for development)
  • CCache (If you want faster builds, specially with the LLVM)
  • Boehm GC v8.2.2 make sure to build in statically with -fPIC flag.
  • zstd (Only if you want to use prebuilt dependencies on Linux)
  • Musl libc v1.2.3 (It's not required but highly recommended)
  • libc++ (same version as LLVM abviously. It's not required but highly recommended)
  • compiler-rt (same version as LLVM abviously. It's not required but highly recommended)

If you are using Linux (x86_64 only), then you're in luck. The builder script will download the required toolchain automatically for you and set it up. So, you can just use builder subcommands to develop serene.

You can disable this behaviour by setting the USE_SERENE_TOOLCHAIN env variable to anything beside "true".

Serene build system uses Musl, libc++, and compiler-rt to generate a static binary. You can use glibc, libgcc, and libstdc++ instead. But you might not be able to cross compiler with Serene and also if anything happen to you, I might not be able to help (I'll try for sure).

Setup development environment

Before, you have to set up the necessary git hooks as follows:

./builder setup

Build and installing dependencies (Other platforms)

Currently, the builder script does not support any platform beside GNU/Linux. So, you need to build the dependencies yourself and make them available to the builder.

By the way, If you are interested, you can just hack the builder script and accommodate your platform and contribute your changes to the project.

To build the dependencies in your platform, you can use the https://devheroes.codes/Serene/bootstrap-toolchain repo as a reference or even modify it to support other platforms. Any contribution will be appreciated.

How to build

To build for development (Debug mode) just use ./builder build to setup the build system, 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.

How to Debug

Since we're using the Boehm GC, to use a debugger, we need to turn off some of the signal handlers that the debugger sets. To run the debugger (by default, lldb) with serenec just use the lldb-run subcommand of the builder script. In the debugger, after setting the break point on the main function (b main) then use the following commands on:

 process handle -p yes -s no -n no SIGPWR
 process handle -p yes -s no -n no SIGXCPU
 process handle -p yes -s no -n no SIGSEGV

Cheatsheets

Get Help

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

License

Copyright (c) 2019-2023 Sameer Rahmani <lxsameer@gnu.org>

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 <http://www.gnu.org/licenses/>.