Skip to Content
Examples01 · Hello World

01 · Hello World

The simplest possible 3va script. Pure computation and console output need no permissions at all.

Source: examples/01-hello-world

Run

cd examples/01-hello-world 3va run app.js
Hello from 3va! Runtime: 3va Node compat: true

The code

app.js
console.log("Hello from 3va!"); console.log(`Runtime: ${typeof Deno !== "undefined" ? "Deno" : "3va"}`); console.log(`Node compat: ${typeof process !== "undefined"}`);

How it works

  • 3va run <file> executes a script in 3va’s V8 engine. The entry file itself is always readable; nothing else is.
  • Node globals such as process and console exist, so ordinary Node-style code runs unchanged. There is no Deno global.
  • No --allow-* flag is needed because the script touches no file, network, environment variable or child process.

Things to keep in mind

  • Reading process is not reading the environment. typeof process works without flags, but process.env looks empty until you grant --allow-env (see 10 · Permissions).
  • This only stays flag-free while it stays one file. The moment the script imports another local module, that import is a file read and needs --allow-read (see 12 · Expo).