This directory contains the verified, first-party examples and official showcase applications for TechScript 2.0.
Every example here is written in pure TechScript (.txs) and continuously verified against the compiler (tsc.exe) in CI.
The flagship cross-platform showcase application authored 100% in TechScript (.txs) and compiled with AppForge.
- Source Code:
showcase-app/src/ - Features Demonstrated: Multi-tab navigation, iOS-inspired spring dock, live Android hardware bridge, reactive state management, syntax-highlighted code runner, and local persistence.
- Targets: Android APK (API 26-34+), Android AAB (Google Play), Windows desktop executable.
- Run Locally:
cd showcase-app tsc app run android
All 20 language examples are located in their respective subdirectories and can be executed directly using tsc run:
| Category | Subdirectory | Entry Point | Description |
|---|---|---|---|
| Basics | hello_world/ |
hello.txs |
Minimal TechScript program & standard output |
| Logic | calculator/ |
calculator.txs |
Arithmetic expressions, conditionals & operators |
| Games | guess_number/ |
guess.txs |
Interactive console game with user input & loops |
| Data Structures | collections/ |
collections.txs |
Lists, maps, slicing, filtering, and mutation |
| Types | enums/ |
enums.txs |
Sum types, pattern matching, and state tags |
| Generics | generics/ |
generics.txs |
Type parameterization and polymorphic functions |
| OOP | oop/ |
oop.txs |
Class models, methods, encapsulation, and records |
| Modules | modules/ |
main.txs |
Multi-file imports, exports, and encapsulation |
| I/O | file_reader/ |
reader.txs |
File system reading, parsing, and stream handling |
| Data | json_parser/ |
parser.txs |
JSON serialization, deserialization, and maps |
| Database | database/ |
db.txs |
Relational table queries, records, and schemas |
| Networking | http_server/ |
server.txs |
HTTP request routing, headers, and responses |
| Web API | web_api/ |
web_api.txs |
REST API integration and remote JSON endpoints |
| Async | async/ |
async.txs |
Non-blocking execution, promises, and tasks |
| Concurrency | threads/ |
threads.txs |
Worker threads, parallel jobs, and sync channels |
| Graphics | canvas/ |
draw.txs |
2D drawing primitives, paths, and vector graphics |
| AI Integration | ai/ |
prompt.txs |
AI model prompting, completions, and token streams |
| Testing | testing/ |
unit_test.txs |
Built-in test assertions, suites, and runners |
| Robustness | error_handling/ |
errors.txs |
Try/catch, structured errors, and exit codes |
| CLI Tools | todo_cli/ |
todo.txs |
Complete task management console application |
To verify that all 20 examples execute without errors:
python verify_all_examples.pyExpected output:
Verification Results: 20/20 passed