SwirlLang/Swirl

Created Mar 12, 2023 · View the SwirlLang/Swirl repository page

An LLVM-based systems programming language for learning and experimentation.

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

16

Lines of Code

1,252

From

Aug 20, 2021

To

Mar 6, 2023

About SwirlLang/Swirl

Swirl is a statically and strongly-typed systems programming language built on LLVM for native code generation. It is designed as a learning and experimentation platform rather than for production use. The language features a module system with export controls, allowing developers to organize code across multiple files while managing symbol visibility between them.

The compiler architecture implements a traditional multi-stage pipeline starting with lexical analysis and parsing to build abstract syntax trees, followed by semantic analysis that spans symbol registration, symbol resolution, and type resolution. The compiler performs semantic analysis and subsequent passes in parallel for independent module batches to improve efficiency. After semantic analysis, the compiler handles compile-time evaluation for constexpr-like constructs and monomorphizes generic types based on their usage.

The project provides documentation, a VS Code extension for language support, and maintains an active Discord community for contributors. Development follows a standard open-source workflow with a GitHub issue tracker for bug reports and feature requests, welcoming forks and pull requests from the community.

Share this video