| Website | Introduction | Quick Start | Project Status and Roadmap | Community and Contributing | License | Acknowledgements | Links |
Helix is designed to address several limitations found in other modern languages like Rust and Zig:
- High-performance: Designed to match or surpass the speed of C.
- Safety: Focused on safe memory management without sacrificing developer productivity and freedom.
- Robustness: Provides tools and features that ensure code stability and reduce runtime errors.
- Modern syntax: Inspired by Rust, but simpler, and understandable for anyone.
- General-purpose: Suitable for a wide range of applications, from systems programming to game development and artificial intelligence.
- Ease of use: Balances power with usability, making it friendly for both beginners and experienced developers.
- Performance-centric: Designed to compete with C in terms of performance.
- Expressive syntax: Combines Python's simplicity with Rust's modern constructs and C++'s power.
- Type safety: Strong type system, but with the flexibility of python type annotations.
- Interoperability: Seamless integration starting with C and C++, then expanding to other languages. With a extendable FFI system that allows for easy integration with any other languages.
- Non-Erroring Borrow checker: Ensures safe memory management, similar to Rust's borrow checker but, Helix treats invalid borrows and ownership violations as warnings rather than errors, allowing the program to compile and run. but in a performance degraded mode, while still maintaining memory safety.
- Systems programming: Designed to work efficiently at the low level, close to hardware, while giving developers the freedom.
- Game development: Provides the tools necessary for fast, real-time performance in complex applications.
- AI development: Efficient enough for resource-intensive tasks like machine learning and artificial intelligence.
Helix provides detailed and informative error messages to help with debugging:
Helix allows for flexible typing with robust generic systems:
Helix supports asynchronous code with async
and await
:
While both Rust and Zig are excellent languages, they come with certain trade-offs that Helix seeks to address:
- Lack of OOP Support: Both Rust and Zig lack comprehensive OOP support, which is essential for certain domains like AI or game development.
- Strict Safety Mechanisms (Rust): While Rust's borrow checker is a powerful tool, it can sometimes be too strict, leading to complex refactoring for developers.
- Limited Features (Zig): Zig, while performant, lacks certain features like a macro processor that Helix provides.
Helix draws inspiration from Rust, Python, and C++, combining the strengths of these languages while addressing their weaknesses:
- Balanced Safety: Helix features a borrow checker, but with a less strict enforcement, offering flexibility without sacrificing safety.
- Simpler Syntax: Helix provides a modern, Python-like syntax, reducing verbosity while maintaining power.
- OOP Support: Helix fully supports object-oriented programming, making it suitable for a wide range of applications.
Warning
Helix is currently under development and does not yet have a useable compiler. The following instructions are for development and building the compiler itself.
Tip
Linux is not yet tested, Most development is done on MacOS or Windows, if any issues arise with building on Linux, please open an issue.
- Xmake: Install Xmake
- Python: Install Python
- Git: Install Git
- C++ Compiler: Ensure you have a C++ compiler (e.g., Clang, MSVC, or GCC).
Caution
Only msvc is supported and tested on Windows, gcc is not supported on Windows. and mingw is not tested.
-
Install Visual Studio Build Tools and select the following components:
- Desktop development with C++ (workload)
- MSVC v143 or higher
- Windows SDK
- C++ CMake tools for Windows
- C++ Clang Tools for Windows v17.0.x or higher
- C++ ATL for v143 build tools or higher
-
Install Python
-
Install xmake (PowerShell Only)
$ Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
Warning
Perl is required for building on Linux, if you don't have it installed, install using your package manager.
-
Install Python
-
Install Xmake (bash or zsh):
curl -fsSL https://xmake.io/shget.text | bash
- Install necessary build tools such as Clang or GCC. (should be installed by default on MacOS)
- Make a directory for the project and clone the repo
$ git clone https://github.com/kneorain/helix-lang.git
$ cd helix-lang
- Build Helix along with the LLVM backend, Clang, Tests, and the Helix Compiler Toolchain API (~30 minutes on a 8-core CPU)
$ xmake build
- Run the tests or the compiler
$ xmake run tests
$ xmake run helix -h
Here's how you can write and run a simple "Hello, World!" program in Helix:
// hello_world.hlx
print("Hello, World!");
To compile then run the source:
$ ./build/.../bin/helix hello_world.hlx
or
$ helix hello_world.hlx
$ ./hello_world
Helix is currently in the early stages of development, currently focusing on the toolchain and compiler. The project is under active development, and we are working hard to bring you a 0.0.1 release soon.
At this point the compiler is usable, but errors only extend to syntax errors, any errors related to code are not yet implemented such as type errors, undefined variables, etc.
- lexer
- preprocessor
- ast parser
- cst parser
- semantic analyzer
- code generator
- optimizer
- linker
- compiler api
- compiler cli
- compiler tests
- compiler documentation
- basic syntax
- functions
- classes
- modules
- generics (requires)
- type bounds
- enums
- structs
- async/await
- spawn/thread
- ffi c
- ffi c++
- ffi python
- ffi rust
- error handling
- macros
- attributes
- concurrency
- pointers
- references
- modules
- operator overloading
- type inference
- type aliases
- type casting
- type checking
- interfaces
- inheritance
- extends keyword
- imports
- test keyword (language level testing framework)
Helix is an open-source project, and we welcome contributions! Whether it's fixing bugs, improving documentation, or adding new features, your contributions are valuable.
Read our Contributing Guide for more details.
Helix is licensed under the Attribution 4.0 International License. See the LICENSE for more details.
We want to thank all contributors for their efforts in making Helix a reality. Your work is appreciated!
Happy coding with Helix! 🚀