Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Why Deno?

The Lykn toolchain uses Deno exclusively. The reasons align with Lykn’s own design principles:

ESM-native — all code is ES modules. No require, no CommonJS, no .mjs vs .js. This matches Lykn’s ESM-only compilation (Ch 16).

Single binary — deno is one executable. No npm install for the toolchain. Install Deno, clone lykn, build with cargo — done.

Permissions — network, file, and environment access must be explicitly granted. deno run --allow-read app.js is the minimum. Security by default, not by opt-in.

Built-in tools — test runner, formatter, linter, task runner, and permission model. Lykn wraps the project workflow; Deno supplies the runtime machinery underneath.

Node.js compatibility — Deno runs most Node.js code via node: specifiers (import "node:fs") and npm packages via npm: specifiers. The ecosystem is accessible.

Standard library — jsr:@std/* provides vetted, maintained utilities: HTTP servers, path manipulation, assertions, encoding.

The Daily Workflow

The Lykn developer’s commands:

lykn run packages/my-app/mod.lykn      # compile + run
lykn test                              # compile tests to target/lykn/test/ and run them
lykn build                             # build workspace packages to target/lykn/build/
lykn lint packages/my-app test         # lint Lykn source
deno run --allow-net target/lykn/build/my-app/mod.js  # run built JS directly when teaching Deno