Zi Language for VS Code
Editor support for the new Zi runtime (the tao tree): ziran.toml projects,
TypeScript/TSX sources, .zx module images, and the zi command line.
VS Code keeps its built-in TypeScript language for .ts/.tsx; this extension
adds the parts the compiler owns instead.
Commands
All commands look for the nearest ziran.toml (or tao.toml) above the active
file, then across the workspace, and ask which project to use when several
exist.
- Zi: Build runs
zi build <manifest>and reports compiler errors (path:line: message) in Problems. - Zi: Run runs
zi run <manifest>in a terminal; the native window opens from that terminal. - Zi: Web Preview runs
zi web <manifest>, serves the generatedbuild/webfolder on a local port, and opens it in the Simple Browser (falls back to the system browser when Simple Browser is unavailable).
The ▶ button in the editor title bar runs the project of the open manifest.
Zi Module editor
Opening any .zx image shows what the module actually contains: its id, kind
(app or library), image version, size, sha256, and the module prefix's imports
(with their kind: app, library or wildcard) and exports (with arity,
visibility and code size). The editor never invents text for binary content.
Import completions
Inside a project, extension-less imports such as import { twice } from "ziran/math" complete the module ids declared by the project manifest.
Settings
zi.command: path to thezicommand. Empty finds a checkout'sbuild/zi(orbuild/taoin older trees) above the manifest or beside the workspace, then~/.local/bin/zi, thenPATH.
Development
npm ci # install dependencies pinned by package-lock.json
npm test # unit suite: node --test tests/*.test.mjs
npm run package # vsce package
Version lives in package.json and is bumped with ./update_version.sh.
Release: GitHub Actions uploads a VSIX from every build; maintainers publish
with the workflow's Run workflow button and Publish GitHub Release.
Install locally: code --install-extension ziran-language-*.vsix.