Getting Started
Install Hew and write your first program.
Installation
Hew requires the Rust toolchain to build the compiler. If you don't have Rust installed, visit rustup.rs first.
Building from source
Clone the repository and build the compiler:
Terminal
git clone https://github.com/hew-lang/hew.git
cd hew
cargo build --releaseThen add the compiler to your PATH:
Terminal
export PATH="$PWD/target/release:$PATH"Hello World
Create a file called hello.hew:
hello.hew
fn main() -> i32 { println_str("Hello, world!"); 0}Compiling
Compile your program with hewc. The compiler generates C code and then compiles it to a native binary:
Terminal
hewc hello.hewRunning
Run the resulting binary:
Terminal
./hello
Hello, world!That's it! You've built and run your first Hew program. The compiler pipeline goes from Hew source to C code to a native binary, giving you fast compilation and efficient executables.