Zen is a high-performance JavaScript runtime built in Rust. It executes code faster than Node.js and Deno, making it an efficient choice for server-side JavaScript applications.
- Fast execution of JavaScript code
- Cross-platform support (Linux and Windows)
- Built using Rust for safety and performance
- Multiple file execution and concurrency
- Blazingly fast multithreading
- Infinite amount of JS files to run concurrently
- Git
- Curl
- Rust
- Docker (for containerization)
To build and run Zen locally, follow these steps:
-
Clone the repository:
git clone https://github.com/zen-js-run/zen.git cd Zen
-
Install the project:
cargo install --path .
You can run a JavaScript file using Zen with the following command:
zen input.js
Or run multiple files:
zen input.js input2.js input3.js
Zen can execute any amount of files you provide.
Zen can also be built and run using Docker. The provided Dockerfile allows you to create an image that contains both the Linux and Windows binaries of Zen.
-
Build the Docker image:
docker build -t zen .
-
Run the Zen application in a Docker container:
docker run --rm zen <path_to_js_file>
The Dockerfile consists of two main stages:
-
Builder Stage:
- Uses the official Rust image to build the Zen application.
- Copies the source code and required files.
- Compiles the application for both Linux and Windows targets.
-
Runtime Stage:
- Uses a minimal Debian image to run the application.
- Copies the built binaries from the builder stage.
To run a JavaScript file named script.js
, execute:
zen script.js
Or, using Docker:
docker run --rm zen script.js
Contributions are welcome! Please open an issue or submit a pull request if you have suggestions or improvements.
This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.