Development

Luwu is developed in the open by Luwu Community, in the luwu repository on GitHub. Before you start on a new feature, discuss it in the #features channel on Discord. Changes to the language's syntax or semantics need an RFC in the repository's rfcs folder.

Branches

For now deviaze handles integration. If you have a pull request you want in integration, contact him on Discord.

Building

With a Rust compiler, CMake and its build tools installed, cargo build --release builds everything. CMake works on every platform:

mkdir cmake && cd cmake
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build . --target Luwu.Repl.CLI --config RelWithDebInfo
cmake --build . --target Luwu.Analyze.CLI --config RelWithDebInfo

On Linux and macOS, make works too:

make config=release luwu luwu-analyze

The runtime needs C++11 and the compiler and Analysis need C++17. Visual Studio 2017, gcc 7, clang 7 or anything newer builds it.

Testing

The unit tests (Luwu.UnitTest) cover the compiler, type checker and linter in C++. The conformance tests (Luwu.Conformance) cover the VM and are mostly written in Luwu, in tests/conformance. Run them with cargo test, make test or the CMake targets. Every pull request runs them on Windows, macOS and Linux, with feature flags both at their defaults and turned on.

A change should come with a test that covers it, or be covered by an existing one.

Feature flags

Luwu adds an FFlag only when someone may need to turn a change off: a language feature still in progress, a change to how existing code runs, or a risky optimization. Bug fixes, better error messages, refactors and performance work that don't change behavior go in without one.

Pull requests

Contributions are licensed under the MIT License. Follow the Code Guidelines and keep performance in mind: a change, bug fixes included, shouldn't make the runtime slower.