This is an earlier edition of the documentation. To choose a currently supported execution method, including Topaz, open Run Lispex in Your Application.
Lispex runs directly in the Playground and in the npm CLI. If another tool in your workflow produces target-language code, running that output is target-specific. Below are quick hints and common caveats.
Python
- Run:
python file.py - Virtual envs recommended for dependencies.
- Printing: use
print(...)if your snippet returns a value.
TypeScript / Node.js
- Run:
tsx file.ts(orts-node), or compiletsc && node file.js. - ESM/CJS differences can affect imports; prefer single‑file snippets.
- Printing:
console.log(...).
Go
- Run:
go run .orgo run file.go. - Module init may be required (
go mod init …) for multi‑file projects.
Rust
- Run:
cargo run(inside a crate), orrustc file.rs && ./filefor single file. - Edition/toolchain: keep
rustuptoolchain up to date.
C / C++
- Compile:
clang file.c -O2 -std=c11 -o app && ./app(adjust flags) /g++ file.cpp -O2 -std=c++17 -o app && ./app. - Mind platform‑specific line endings and
setlocaleif needed for UTF‑8.
Cross‑cutting caveats
- Encoding: assume UTF‑8; some targets need explicit locale/encoding setup.
- Newlines/paths: Windows vs POSIX differences; prefer portable path joins.
- Last value: many targets do not auto-print. Call the target's print/log.
For Lispex Vouch evidence, keep the checked Lispex rule and its receipt/replay artifacts in the repository even if surrounding host code runs elsewhere.