- What is TechScript?
- Why Choose It?
- Key Differentiators
- Syntax at a Glance
- Architecture Design
- Installation
- Quick Start
- Language Guide
- Standard Library & Modules
- CLI Commands
- Examples
- Editor & IDE Support
- Documentation Portal
- Roadmap
- Repo Structure
- Contributing
- Links & Social Media
- License
TechScript is a general-purpose, human-first programming language designed to eliminate the syntax clutter of traditional coding. Instead of curly braces, semicolons, and cryptic operator symbols, TechScript uses a clean, keyword-based English grammar.
Under the hood, TechScript is built in Rust for safety and speed. It compiles source files into highly optimized bytecode executed on a custom stack-based Virtual Machine (VM) with NaN-boxed values and a tracing garbage collector, or can generate native code via an LLVM backend.
- Zero Clutter: Replace symbols like
{,},(,),;,&&, and||with clear keywords likedo,end,when,else,and, andor. - Ecosystem Ready: Runs everywhere (Windows, Linux, macOS, Android/Termux) and comes with full LSP support, linting, formatting, and packaging.
- Top Performance: Powered by a custom stack-based VM written in Rust. Features compile-time constant folding and AST simplifications.
| Traditional Languages | TechScript's Answer | Benefit |
|---|---|---|
Syntax clutter ({}, (), ;) |
Plain-English block keywords (do/end, when) |
Fewer syntax errors and high readability |
| Bloated build dependency chains | Single toolchain executable (tsc) |
Instant setups with formatting & testing |
| Heavy memory overhead | Lightweight custom NaN-boxed stack VM | High performance and small footprint |
Here is a side-by-side comparison of TechScript 2.0 with JavaScript and Python:
| Feature | TechScript | JavaScript | Python |
|---|---|---|---|
| Variable | x = 10 |
let x = 10; |
x = 10 |
| Constant | const PI = 3.14159 |
const PI = 3.14159; |
PI = 3.14159 (convention) |
| Function | do greet(name)Β Β Β Β send "Hi " + nameend |
function greet(name) {Β Β Β Β return "Hi " + name;} |
def greet(name):Β Β Β Β return "Hi " + name |
| Condition | when x > 5Β Β Β Β say "Big"elseΒ Β Β Β say "Small"end |
if (x > 5) {Β Β Β Β console.log("Big");} else {Β Β Β Β console.log("Small");} |
if x > 5:Β Β Β Β print("Big")else:Β Β Β Β print("Small") |
| For Loop | for x in listΒ Β Β Β say xend |
for (let x of list) {Β Β Β Β console.log(x);} |
for x in list:Β Β Β Β print(x) |
| Try / Catch | tryΒ Β Β Β res = divide(10, 0)catch errorΒ Β Β Β say errorend |
try {Β Β Β Β let res = divide(10, 0);} catch (error) {Β Β Β Β console.error(error);} |
try:Β Β Β Β res = divide(10, 0)except Exception as error:Β Β Β Β print(error) |
The TechScript compiler driver (tsc) processes source files through a strict pipeline:
graph TD
A[Source Code .txs] --> B[Logos-based Lexer]
B --> C[Pratt expression Parser]
C --> D[Abstract Syntax Tree AST]
D --> E[Semantic Analysis & Scope Audit]
E --> F[AST Optimizer & Constant Folder]
F --> G[IR Crate Generation]
G --> H{Execution Target}
H -->|VM Target| I[Bytecode Compiler]
H -->|Native Target| J[LLVM Backend Crate]
I --> K[Bytecode Format .txc]
K --> L[Stack VM & Tracing GC]
J --> M[Standalone Native Executable]
The tsc driver tokenizes the program, builds an AST, checks lexical scopes and types, runs constant folding, and compiles the result into bytecode for the VM or leverages LLVM to emit native machine code.
- Go to the Releases page on GitHub.
- Download
TechScript_Setup.exe(orTechScript_Portable.zipfor a zero-install portable version). - Run the installer to configure your environment:
- Installs the native compiler (
tsc) and VM. - Automatically adds
tscto your system environmentPATH. - Configures file associations for
.txsscripts.
- Installs the native compiler (
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bashRecommended Method (Shell script):
pkg update
pkg install curl
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bashAlternative Method (pip β Not Recommended):
pkg update
pkg install python
pip install techscript
techscript install(Note: Python installations in Termux may require the --break-system-packages flag under PEP 668).
pip install techscript # or: pip install techscript-lang
techscript installThe PyPI package auto-detects your OS/architecture and downloads the correct native binary from GitHub Releases.
Homebrew (
brew install techscript), Winget, and Scoop support coming soon!
Once TechScript is installed, you can write and execute your first script in under 10 seconds:
- Create and Enter a Project Directory:
mkdir hello_world cd hello_world - Create a Script File:
Create a new file named
hello.txsand add:say "Hello, World! π" - Compile and Run:
Run the file using the
tsccompiler driver:tsc run hello.txs
TechScript's syntax builds from simple assignments to full structured programs:
- Variables: Assigned dynamically. No variable keywords required.
message = "Hello TechScript" - Conditionals: Expressed via
when/elseblocks.when status == "active" say "Running" end - Loops: Multi-form
forranges or collection iterators.for i in 0..5 say i end - Functions: Declared with
doblock and returns withsend.do square(n) send n * n end
For detailed guides, see the Language Guide and the Syntax Guide.
TechScript features a self-contained, native standard library:
| Module | Description | Guide Link |
|---|---|---|
math |
Square root, trigonometry, and basic math operations | Stdlib Reference |
collections |
Operations for pushing to lists or reading map keys | Stdlib Reference |
file |
File writing, reading, and removal utilities | Stdlib Reference |
json |
Encoding maps/lists to JSON strings and decoding them | Stdlib Reference |
http |
HTTP client GET and POST utilities | Stdlib Reference |
sqlite |
Local relational database connector | Stdlib Reference |
canvas |
2D vector viewport shapes and text drawing | Canvas Guide |
time |
Clock, scheduling, and thread sleep functions | Stdlib Reference |
thread |
Native OS thread spawner and thread join interfaces | Stdlib Reference |
ai |
Seamless Gemini prompt and text generation functions | Stdlib Reference |
testing |
Assertion macros for unit testing suite | Stdlib Reference |
Run these subcommands via the unified tsc compiler driver:
| Subcommand | Description |
|---|---|
run |
Compiles and executes a single .txs script |
build |
Builds the workspace project matching package.toml |
check |
Checks the workspace for compile-time errors |
fmt |
Standardizes codebase layouts using tsfmt |
lint |
Evaluates safety traps and warns on deprecated patterns |
migrate |
Translates legacy v1.x scripts to v2.0 keywords |
clean |
Deletes compiled target caches and logs |
new |
Scaffolds a new workspace project |
test |
Locates and executes all #[test] unit tests |
repl |
Launches the interactive shell REPL |
publish |
Submits the module package to the package registry |
install |
Installs a library dependency |
uninstall |
Removes an installed package |
update |
Updates workspace packages to their latest versions |
doctor |
Scans workspace paths and toolchain installations |
dump-ast |
Outputs the AST representation in JSON/text format |
dump-ir |
Outputs the Intermediate Representation |
dump-bytecode |
Outputs the compiled virtual machine bytecode |
emit-llvm |
Generates LLVM IR representation |
emit-asm |
Generates assembly representation |
benchmark |
Executes automated platform runtime benchmarks |
Find runnable examples in the examples/ folder:
| Directory | Script | Description | Run Command |
|---|---|---|---|
| ai | prompt.txs |
Prompting Gemini AI model natively via the standard library | tsc run examples/ai/prompt.txs |
| async | async.txs |
Concurrent event loop with async subroutines and await |
tsc run examples/async/async.txs |
| calculator | calculator.txs |
Standard math functions and basic error throwing | tsc run examples/calculator/calculator.txs |
| canvas | draw.txs |
Drawing rects, circles, text inside a viewport | tsc run examples/canvas/draw.txs |
| collections | collections.txs |
Manipulating and iterating over lists and maps | tsc run examples/collections/collections.txs |
| database | db.txs |
Dynamic SQL schema setup and querying with SQLite | tsc run examples/database/db.txs |
| enums | enums.txs |
Declaring and pattern matching enum types | tsc run examples/enums/enums.txs |
| error_handling | errors.txs |
Exception handlers using try, catch, and throw |
tsc run examples/error_handling/errors.txs |
| file_reader | reader.txs |
Writing, reading, and deleting files using the file module |
tsc run examples/file_reader/reader.txs |
| generics | generics.txs |
Dynamic functions and dynamically-typed structs/boxes | tsc run examples/generics/generics.txs |
| guess_number | guess.txs |
Simulates a guess-the-number game loop | tsc run examples/guess_number/guess.txs |
| hello_world | hello.txs |
Classic Hello World script printing text | tsc run examples/hello_world/hello.txs |
| http_server | server.txs |
Simulated HTTP Server endpoints mock | tsc run examples/http_server/server.txs |
| json_parser | parser.txs |
Parsing JSON string to map structure and vice-versa | tsc run examples/json_parser/parser.txs |
| modules | main.txs |
Standard library imports and custom module scope | tsc run examples/modules/main.txs |
| oop | oop.txs |
Structural Object-Oriented programming using mapping definitions | tsc run examples/oop/oop.txs |
| testing | unit_test.txs |
Declaring assertions using the built-in testing harness | tsc run examples/testing/unit_test.txs |
| threads | threads.txs |
Spawning and joining OS threads via thread module | tsc run examples/threads/threads.txs |
| todo_cli | todo.txs |
Comprehensive lists/maps workflow for tasks | tsc run examples/todo_cli/todo.txs |
| web_api | web_api.txs |
Standard HTTP client request and response retrieval | tsc run examples/web_api/web_api.txs |
Official support is available for Visual Studio Code:
- Open the VS Code Extensions pane (
Ctrl+Shift+X). - Search for "TechScript 2.0" (published by
tanmoy). - Click Install.
- (Optional) Select Preferences β File Icon Theme β TechScript Icon Theme to enable custom project file icons.
Install links:
Browse detailed guides in the docs/ folder:
| Document | Description |
|---|---|
| API Reference | In-depth compiler API design specifications |
| Best Practices | Guidelines for coding layout and memory conventions |
| Canvas Guide | Methods and viewport parameters for shapes drawing |
| Compiler Architecture | Pipeline description from Lexer to optimization phases |
| DSL Guide | Designing Domain-Specific layout submodules |
| Examples Guide | Standard running process for bundled projects |
| FAQ | Common troubleshooting and engine setup questions |
| Installation Guide | Complete environment configuration guidelines |
| Language Guide | Syntax specifications for statements and variables |
| Migration Guide | Moving codebase parameters from legacy v1.x configurations |
| Performance Reference | VM execution benchmarks and compile flag details |
| Release Notes | Historical logs of compiled target stable versions |
| Roadmap | Milestones and future compiler targets |
| Stdlib Reference | Comprehensive standard library module interface list |
| Syntax Guide | Cheatsheet for variables, loops, control blocks |
| Web Guide | Native website compile-generation parameters |
- Pratt parser for expressions.
- Custom event loop with
asyncandawait. - Bundled compiler tools (
fmt,lint,test). - Complete LLVM code generation backend for static binaries.
- Add debugger and tracing memory profiler in standard tools.
- Formally verify core standard libraries.
An overview of the TechScript workspace directories:
techscript/
βββ .devcontainer/ # Dev Container definitions
βββ .github/ # GitHub templates and workflows
βββ .vscode/ # Editor settings
βββ assets/ # Logos and graphics
βββ benchmarks/ # Performance benchmarks
βββ cli/ # Crate for the `tsc` compiler driver CLI
βββ compiler/ # Crate subfolders for language compiler phases
β βββ ast/ # Abstract Syntax Tree representation
β βββ bytecode/ # Bytecode generation definitions
β βββ common/ # Shared utilities and spans
β βββ errors/ # Custom diagnostic engine and error codes
β βββ ir/ # Intermediate Representation (IR) generation
β βββ lexer/ # Logos-based lexer
β βββ llvm_backend/ # LLVM native compilation module
β βββ module_resolver/ # Module imports resolver
β βββ optimizer/ # Constant folding and AST simplifications
β βββ parser/ # Pratt expression and statement parser
β βββ semantic/ # Symbol table, scopes, and semantic checks
β βββ syntax/ # Token kind and keyword definitions
βββ docs/ # Language documentation and guides
βββ editors/ # VS Code extension source and VSIX packages
βββ examples/ # Sample projects and code snippets
βββ installer/ # Script files for compiling installer executables
βββ licenses/ # Licenses of standard library dependencies
βββ runtime/ # Crate subfolders for program execution
β βββ builtins/ # Standard library module implementations
β βββ gc/ # NaN-boxed VM Garbage Collector
β βββ interpreter/ # Tree-walk AST execution engine
β βββ native_runtime/ # Runtime libraries for LLVM executables
β βββ runtime/ # VM execution context and states
β βββ vm/ # Stack-based Bytecode Virtual Machine (VM)
βββ scripts/ # Utility and platform installation scripts
βββ stdlib/ # Standard library header definitions
βββ templates/ # New project templates
βββ third_party/ # Extracted third-party sources
βββ tools/ # Ecosystem tools
βββ formatter/ # Formatter engine (`tsfmt`)
βββ linter/ # Linter analyzer (`tslint`)
βββ lsp/ # Language Server (`techscript-lsp`)
βββ package-manager/ # Package manager client (`tspm`)
βββ packager/ # Source code packager
Contributions are welcome! Please read the Contributing Guidelines to set up your local development environment and run tests:
cargo build
cargo test- Official Website: techscript.is-a.dev
- GitHub Repository: Tcode-Motion/techscript
- GitHub Discussions: Tcode-Motion/techscript/discussions
- Discord Community: Join Discord (Community Chat)
TechScript is released under the MIT License. See LICENSE for details.
