From 25852a5f3ffe89222cd3061ba66ec6c8e4b4d841 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Sat, 27 May 2023 22:06:11 +0100 Subject: [PATCH] docs: Move the getting started guide to the docs --- README.md | 72 +++--------------------------------------------------- mkdocs.yml | 7 +++--- 2 files changed, 8 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index c9f426d..8cedff1 100644 --- a/README.md +++ b/README.md @@ -1,76 +1,12 @@ # Serene lang [![status-badge](https://ci.devheroes.codes/api/badges/Serene/serene/status.svg)](https://ci.devheroes.codes/Serene/serene) -Serene is a modern typed lisp. It's not done yet, and it's heavily under development. +Serene is a modern typed lisp. It's not done yet, and it's heavily under development. Don't +expect anything stable for now. -## 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: - -```bash - ./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 -- (Modern C++ Cheatsheet)[https://github.com/muqsitnawaz/modern-cpp-cheatsheet] - -# More Info +## More Info - Website: https://serene-lang.org +- Documentation: https://serene-lang.org/getting_started/ - CI: https://ci.devheroes.codes/Serene/serene # Get Help diff --git a/mkdocs.yml b/mkdocs.yml index f6bbdf8..0fd2cc9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -9,9 +9,10 @@ edit_uri: _edit/master/docs/pages/ docs_dir: ./docs/pages site_dir: ./build/docs -# nav: -# - Home: 'index.md' -# - Resources: 'resources.md' +nav: + - Home: 'index.md' + - Getting Started: 'getting_started.md' + - Resources: 'resources.md' theme: name: material