>Tish
HomeDocs

Examples

Example Tish applications.

Ready-to-deploy example applications live in the tish repository under examples/.

Available examples

ExampleDescriptionFeatures
hello-worldMinimal app that logs and exitsNone
modules-exampleImport/export across filesNone
data-processingArray sorting, splice, nested loops, filter/map/reduce for sales reportNone
wasmtime-modulesMulti-module WASI (main, math, greet) — each compiles to separate .wasmNone
tishx-exampleTish + JSX to plain JS (vanilla DOM, useState)js target
mdx-docsStatic docs site: file routing, MDX, pre-render to HTMLhttp, fs, regex
http-modules-exampleImport/export with serve (deployment-ready)http, process
http-helloBasic HTTP server with routinghttp
json-apiREST API with JSON responseshttp
echo-serverEchoes request details backhttp
counter-apiStateful counter servicehttp
async-awaitAsync/await with fetchAsynchttp
js-to-tish-exampleJS to Tish transpiler usageNone
form-fields, data-plot, code-editor, viewer-3degui UI examples (in tish-egui package/repo)egui (import-driven)

Run locally

cd tish/examples/http-hello
cargo run -p tish --features http -- run src/main.tish

Or compile:

tish compile src/main.tish -o server --feature http
./server

For native modules (e.g. egui, Polars), add the package to package.json dependencies and use import { Egui } from 'tish:egui' — no --feature needed; imports drive compilation.

Deploy

Use the zectre CLI from the example directory. See Deploy Overview.