Skip to content

pyxherb/slake

Repository files navigation

Slake

Slake logo

Introduction

Slake is a statically-typed, general-purpose and embeddable programming language for extensible applications.

It supports:

  • Function Overloading
  • Union Enumeration (ADT-like)
  • Coroutine
  • and more...

Development Progress

✅: Completed

🕓: Working In Progress

⏸: Paused/Postponed

📝: Planned

  • Compiler 🕓

    • Type Checker 🕓
    • Generic 🕓
      • Type-based Generic ✅
      • Base Class and Interface Generic Constraint ✅
      • Trait Interface Generic Constraint 🕓
      • Non-local Constraint 🕓
    • Function Invoking ✅
      • Regular Function ✅
      • Method Function 🕓
      • Closure Function 🕓
    • Function Type Representation 🕓
      • Regular Function 🕓
      • Method Function 🕓
      • Closure Function 🕓
    • Parameter-name-based Function Invoking 📝
    • Class Type 🕓
      • Instantiation ✅
      • Inheritance ✅
      • Cyclic Inheritance Checker ✅
    • Interface Type ✅
      • Implementing ✅
      • Cyclic Inheritance Checker ✅
    • Structure Type 🕓
      • Instantiation ✅
      • Copy Assignment ✅
      • Move Assignment 🕓
      • Type Recursion Checker ✅
    • Coroutine Type 🕓
      • Instantiation 🕓
      • Copy Assignment 🕓
      • Move Assignment 🕓
      • Type Recursion Checker 🕓
    • Exception Type 🕓
      • Detaching from Class Type 🕓
      • Throwing and Handling 🕓
    • Constant Enumeration (syntatic sugar) 🕓
    • Scoped Enumeration Type 🕓
    • Union Enumeration (ADT-like) Type 🕓
      • Instantiation 🕓
      • Copy Assignment 🕓
      • Move Assignment 🕓
      • Type Recursion Checker ✅
    • Union Enumeration Item Type 🕓
      • Instantiation 🕓
      • Copy Assignment 🕓
      • Move Assignment 🕓
      • Type Recursion Checker ✅
    • Tuple Type 🕓
      • Instantiation 🕓
      • Copy Assignment 🕓
      • Move Assignment 🕓
    • Value Type Boxing 🕓
      • Structure Type 🕓
      • Coroutine Type 🕓
      • Union Enumeration Type 🕓
      • Union Enumeration Item Type 🕓
      • Tuple Type 🕓
    • Parameter Pack 🕓
      • Unpacking as Parameters 🕓
    • Nullity Type Guard 🕓
      • Local Variable ✅
      • Non-local Variable 🕓
    • Conversion Type Guard 🕓
      • Local Variable 🕓
      • Non-local Variable 🕓
    • Pattern Matching 🕓
      • Exhaustion Check 🕓
    • Type-based Pattern Matching 🕓
    • Attribute 🕓
    • Lambda Expression 🕓
    • Generic Type Specialization 📝
    • Generic Function Specialization 📝
    • Macro 📝
    • Accessor (syntactic sugar, with back field accessing) 📝
  • Language Server 📝

    • Linting 📝
    • Snippets 📝
    • Formatting 📝
    • Renaming 📝
  • Runtime 🕓

    • Interpreter 🕓
    • Program Analyzer 🕓
    • Program Optimizer 🕓
    • Runtime Library 🕓
  • JIT Recompiler 🕓

    • x86-64 Backend 🕓
    • ARM64 Backend 📝
    • RISC-V Backend 📝
  • AOT Compiler 🕓

    • Native C++ Backend (SLX2CXX) 🕓
    • WASM Backend (SLX2WASM) 📝

Build

CMake

To build Slake, you will need:

  • A C++ compiler with at least C++17 support, with (at least) a freestanding standard library.
  • The PEFF library, which should have been ported properly to your target platform

To build the examples, see the README file in the ./example directory.

Configure

First, configure the project properly, you should have the PEFF library installed.

# If there is any error mentions that PEFF was not found in this step,
# install the PEFF library or locate the PEFF library manually.
cmake -S . -B build

Slake Runtime

To build the Slake Runtime (libslake), choose and build the target slake:

cmake --build build --target slake --config <Your config>

Slake Compiler (slkc)

To build Slake Compiler (slkc), a C++20 compiler and corresponding standard library are required.

cmake --build build --target slkc --config <Your config>

License

Slake is licensed under GNU Lesser Public License v3.0 with linking exception.

Releases

No releases published

Packages

 
 
 

Contributors

Languages