new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Deno · all subjects

cli/compile

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

deno compile bundles program and runtime into single binary

deno compile bundles your program and the Deno runtime into one binary with no node_modules and no install step for users. The syntax is: deno compile greet.ts

deno compile --output names the binary

Use deno compile --output to specify the name of the compiled binary: deno compile --output greet greet.ts

deno compile --allow-* bakes permissions into binary

If your tool needs permissions, bake them in with the usual --allow-* flags when compiling so the binary runs without prompting users.

deno compile --engine quickjs uses experimental QuickJS engine

If binary size matters more than raw execution speed, you can build against the experimental QuickJS engine instead of V8 with deno compile --engine quickjs.

deno compile --include embeds files or directories in binary

Pass deno compile --include to bundle files or directories into the binary, so a single-file executable stays single-file even when your tool needs data such as templates, word lists, or default configs: deno compile --include names.csv --output greet greet.ts

import.meta.dirname reads embedded files relative to module directory

At runtime after compiling with --include, read the embedded files relative to your module's directory with import.meta.dirname: const names = Deno.readTextFileSync(import.meta.dirname + "/names.csv");. This same code works during development with deno run and inside the compiled binary, regardless of where the user runs it from.

deno compile --target cross-compiles for other platforms

Build for a platform other than your own with deno compile --target, so you can ship binaries for Windows, macOS, and Linux from one machine: deno compile --target x86_64-pc-windows-msvc --output greet.exe greet.ts and deno compile --target aarch64-apple-darwin --output greet greet.ts

deno compile supports x86_64 and ARM builds of Linux, macOS, Windows

The full list of deno compile --target values covers x86_64 and ARM builds of Linux, macOS, and Windows.

Node to Deno equivalents for TypeScript, docs, and builds

Node and Deno command equivalents: tsc is deno check, typedoc is deno doc, and nexe/pkg is deno compile. TypeScript runs directly in Deno with no build step; deno check performs type-checking without emitting, and the compiler is built into the deno binary.

Give your agent this brain