///
Welcome to the Zen Programming Language! This guide will walk you through the essential steps to get your Zen development environment up and running. Zen is a revolutionary programming language with *
93 views
~93 views from guests
Guest views are estimated from total page views. These include anonymous visitors and users who weren't logged in when they viewed the page.
Welcome to the Zen Programming Language! This guide will walk you through the essential steps to get your Zen development environment up and running. Zen is a revolutionary programming language with ZERO KEYWORDS, emphasizing pure expression, pattern matching, and allocator-driven concurrency.
Before you begin, ensure you have the following installed on your system:
cargo (Rust's package manager and build tool) to build the Zen compiler. If you don't have Rust, you can install it via rustup: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shThe Zen compiler is written in Rust and can be built using Cargo. This will compile the zen executable, which is used to run your Zen programs.
Navigate to the root directory of the Zen repository and run the following command:
cargo build: This command compiles your project.--release: This flag optimizes the build for performance, making the compiler faster. The compiled executable will be located in the target/release/ directory.Once the compiler is built, you can execute any Zen source file (.zen extension) directly.
To run a Zen program, use the cargo run command with the --bin zen flag, followed by the path to your Zen file:
Replace <file.zen> with the actual path to your Zen program. For example, if you have a file named my_program.zen in your current directory:
Create a file named hello.zen with the following content:
Then run it using:
You should see:
Hello, Zen World!
The repository includes a showcase.zen example that demonstrates many of Zen's core features. It's a great way to see the language in action.
To run the showcase example:
The Zen project maintains a robust test suite to ensure the stability and correctness of the language implementation. The tests are run using a Python script.
Before running the tests, ensure your compiler is built (as described in section 1). Then, navigate to the root directory of the Zen repository and execute the test runner script:
The script will build the zen-lsp binary (if not already built) and then run all .zen files found in the tests/ directory. You will see a summary of passed and failed tests.
You are now ready to start exploring and developing with the Zen Programming Language! For more detailed information on the language features, refer to the README.md and LANGUAGE_SPEC.zen files.