Rust & Cargo
The lykn compiler is a Rust binary
# Install Rust via rustup (if you don't have it)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Verify
cargo --version
Tuck In
From zero to a running lykn project in five minutes. Prerequisites, installation, your first program, and the tools that keep your code clean.
The lykn compiler is a Rust binary
# Install Rust via rustup (if you don't have it)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Verify
cargo --version
Runtime for compiled JavaScript — not Node.js
# macOS / Linux
curl -fsSL https://deno.land/install.sh | sh
# or via Homebrew
brew install deno
# Verify
deno --version
lykn new initializes a git repo
git --version
Optional — for the lykn project's own build system
# macOS: included with Xcode Command Line Tools
xcode-select --install
# Linux: usually pre-installed, or
sudo apt install build-essential
The standard install path
cargo install lykn-cli
This installs the lykn binary. Verify it works:
lykn --version
lykn --help
For contributors or bleeding-edge
git clone https://github.com/lykn-lang/lykn.git
cd lykn
make build
# Binary lands in ./bin/lykn
lykn newScaffolds a workspace with one package
lykn new my-app
cd my-app
This creates:
my-app/
├── project.json # workspace root
├── packages/my-app/
│ ├── deno.json # package config
│ └── mod.lykn # entry point
└── test/
└── mod.test.js # test stub
packages/my-app/mod.lykn
lykn
;; my-app — created with lykn new
(bind greeting "Hello from my-app!")
(console:log greeting)
compiled javascript
const greeting = "Hello from my-app!";
console.log(greeting);
lykn fmtFormat lykn source files
# Check formatting (dry run)
lykn fmt packages/my-app/mod.lykn
# Format in place
lykn fmt -w packages/my-app/mod.lykn
lykn checkValidate syntax without compiling
lykn check packages/my-app/mod.lykn
lykn lintLint compiled JavaScript via Deno
lykn lint packages/
lykn testRuns tests via Deno's built-in test runner
# Run all tests
lykn test
# Run specific test files
lykn test test/mod.test.js
Tests are written in JavaScript and import the compiled output. The scaffold includes test/mod.test.js to get you started.
Everything at once
# Format → check → compile → test
lykn fmt -w packages/**/*.lykn
lykn check packages/my-app/mod.lykn
lykn compile packages/my-app/mod.lykn -o dist/mod.js
lykn test
lykn runCompile and execute in one step
lykn run packages/my-app/mod.lykn
# → Hello from my-app!
lykn compileCompile to a .js file you can inspect
# Compile to stdout
lykn compile packages/my-app/mod.lykn
# Compile to a file
lykn compile packages/my-app/mod.lykn -o dist/mod.js
# Production build (strip runtime type checks)
lykn compile packages/my-app/mod.lykn --strip-assertions -o dist/mod.js
You've got a running project. Here's where to go from here.
The Tour — walk through the language in 10 interactive examples
Reference — every form, every syntax, every compilation rule
Playground — write lykn in your browser, see the compiled JS, run it
The Book — the full story, from bindings through macros and compiler internals
Discord — come say hello