Skip to content

tako0614/takoscript

Repository files navigation

TakoScript

A JavaScript to native compiler and runtime.

Installation

npm (Recommended)

npm install -g takoscript

From Source

Requirements:

  • Rust 1.85.0+
  • LLVM 21.1
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install LLVM 21 (Ubuntu/Debian)
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21
sudo apt-get install -y libpolly-21-dev
export LLVM_SYS_211_PREFIX=/usr/lib/llvm-21

# Install LLVM 21 (macOS)
brew install llvm@21
export LLVM_SYS_211_PREFIX=$(brew --prefix llvm@21)

# Build
cargo build --release

# The binary will be at target/release/tako

Usage

Run JavaScript

tako run script.js

Run package.json scripts

tako task build -- --watch

Compile to Native Binary

tako build script.js -o output

Run Tests

tako test

Commands

Command Description
tako run <file> Run JavaScript file with interpreter
tako task <script> [-- args...] Run package.json scripts (npm run compatible)
tako build <file> [-o output] Compile to native executable
tako test [--aot|--run] Run test suite
tako test262 Run ECMAScript test262 conformance tests (--syntax-only for parser/early errors)
tako test-node-compat Run Node.js compatibility tests (allowlist/skiplist)
tako bench Run performance benchmarks with optional regression check
tako version Show version info

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors