Skip to content

tishlang/tish

Repository files navigation

Tishlang

Tish

npm version downloads node version crate version license

Tish is a TypeScript- and JavaScript-compatible language implemented in Rust. It is aimed at teams who want a familiar surface syntax, predictable semantics, and the option to ship either interpreted scripts or runtime free native binaries.

The same source can run on a tree-walking interpreter, a bytecode VM, or compiled targets (native, WASM/WASI, and others). Network, filesystem, and process APIs are feature-gated so defaults stay safe. For the full syntax and semantics, see the canonical spec in-repo; for tutorials and reference, see tishlang.com/docs.

πŸ”₯ Features

  • JS-like surface β€” let / const, fn, arrows, template literals, async/await, modules, and a large slice of familiar builtins (console, Math, JSON, arrays, strings, objects).
  • Two ways to run β€” interpret for fast iteration (tish run, REPL); compile to native or WASM for distribution and performance (tish build).
  • Memory-safe implementation β€” Rust-hosted runtime and compiler pipeline; no GC in the host language for the toolchain itself.
  • Secure by default β€” I/O and platform APIs (http, fs, process, etc.) are opt-in via features.
  • No undefined β€” null only where JS would use undefined; strict equality (=== / !==) without loose coercion.
  • Optional types β€” TypeScript-style annotations are parsed for tooling and future checking; see the language reference for status.

Full specification: docs/LANGUAGE.md. Implementation status, gaps, and JS compatibility: docs/plan-gap-analysis.md.

πŸ“š Documentation

User-facing guides and reference:

Section Description
Getting started Install Tish, build your first app
First app Run and build workflows, targets
Editor & IDE VS Code, LSP, tasks, Neovim
Language server tish-lsp capabilities
Formatting tish-fmt
Linting tish-lint
Interactive REPL Multi-line input, completion, history
Language overview Syntax, keywords, semantics
Tish vs JavaScript Differences and additions from JS
Builtins Console, Math, JSON, Array, String, Object
Features (APIs) http, fs, process, regex β€” feature-gated
Native backend Rust, Cranelift, LLVM compilation
WASM targets Web and WASI
Deploy Platform and hosting

In-repo docs

Contributor- and spec-oriented material in docs/:

File Purpose
LANGUAGE.md Canonical language reference (syntax, semantics, builtins)
ecma-alignment.md ECMA-262 / test262 mapping
plan-gap-analysis.md Implementation audit, MVP checklist
architecture-next-steps.md Crate layout, design decisions
builtins-gap-analysis.md Builtins across Rust vs bytecode VM (Cranelift/WASI)

πŸ› οΈ Toolchain

Tool Purpose
tish CLI β€” run, repl, build, dump-ast
tish-fmt Formatter
tish-lint Linter (--format sarif for code scanning)
tish-lsp Language server; uses tish_fmt / tish_lint as libraries
tish-security/ (sibling repo) Rules & CI examples β€” clone next to tish/ as ../tish-security (OpenGrep, ast-grep, Comby, Codacy scaffold, fixtures)
tree-sitter-tish/ Tree-sitter grammar (editors, ast-grep, future OpenGrep integration)
VS Code extension tish-vscode β€” grammar, snippets, LSP client, tasks

Related docs on tishlang.com: Editor & IDE, Language server, Formatting, Linting.

πŸ“¦ Installation

Install globally:

brew tap tishlang/tish https://github.com/tishlang/tish
brew install tish

Or locally with npm:

npm install @tishlang/tish

More options: Installation.

⚑ Quick start

npx @tishlang/create-tish-app my-app
cd my-app
npx @tishlang/tish run src/main.tish

▢️ Run and build

// hello.tish
fn greeting(name) = `Hello, ${name}!`
console.log(greeting("World"))
tish run hello.tish
# Hello, World!

tish build hello.tish -o hello
./hello
# Hello, World!

Native binaries are standalone (no Tish or Rust runtime required on the machine that runs them). Backends, flags, and WASM are covered in First app, Native backend, and WASM targets.

🀝 Contribution

Contributions are welcome. See CONTRIBUTING.md for building, testing, and code style. Tish is licensed under the Pay It Forward License (PIF).

πŸ’ͺ Performance

JavaScript equivalents live in tests/core/*.js. Compare Tish with Node.js or Bun:

./scripts/run_performance_manual.sh

Details: docs/perf.md.

πŸ“ License

Tish is licensed under the Pay It Forward License (PIF). See LICENSE.

About

Native compilable bare metal performance language using JS/TS-ish syntax designed for modern memory safe and secure AI workflows

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors