Skip to content

Commit 7f75bd4

Browse files
author
Tanmoy
committed
Universal Platform Support v1.0.4.4 - Python fallback engine and Termux support
1 parent 570b061 commit 7f75bd4

66 files changed

Lines changed: 6641 additions & 66 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<div align="center">
2020

21-
![version](https://img.shields.io/badge/version-v1.0.4.3-7c3aed?style=for-the-badge)
21+
![version](https://img.shields.io/badge/version-v1.0.4.4-7c3aed?style=for-the-badge)
2222
![runtime](https://img.shields.io/badge/runtime-Native_Rust_VM-f97316?style=for-the-badge&logo=rust&logoColor=white)
2323
![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux%20%7C%20Android-22c55e?style=for-the-badge)
2424
![license](https://img.shields.io/badge/license-MIT-3b82f6?style=for-the-badge)
@@ -28,7 +28,7 @@
2828
<div align="center">
2929

3030
![deps](https://img.shields.io/badge/dependencies-NONE-00ff88?style=for-the-badge)
31-
![stdlib](https://img.shields.io/badge/stdlib-150%2B_functions-7c3aed?style=for-the-badge)
31+
![stdlib](https://img.shields.io/badge/stdlib-180%2B_functions-7c3aed?style=for-the-badge)
3232
![vscode](https://img.shields.io/badge/VS_Code-Extension_v1.0.3-007ACC?style=for-the-badge&logo=visualstudiocode&logoColor=white)
3333
[![Author](https://img.shields.io/badge/Made_by-Tcode--Motion-181717?style=for-the-badge&logo=github)](https://github.com/Tcode-Motion)
3434
[![Stars](https://img.shields.io/github/stars/Tcode-Motion/techscript?style=for-the-badge&color=yellow&label=⭐)](https://github.com/Tcode-Motion/techscript/stargazers)
@@ -44,7 +44,7 @@
4444
║ ║
4545
║ No semicolons. No brackets. No confusing symbols. ║
4646
║ No Python runtime. No dependencies. Just pure speed. ║
47-
Powered by a Native Rust VM. — Tcode-Motion ⚡
47+
Universal Support — Windows, Linux, Mac, & Termux! ⚡
4848
╚═════════════════════════════════════════════════════════════════════════╝
4949
```
5050

@@ -73,7 +73,8 @@ That's it. **No semicolons. No brackets. No confusing symbols.** Just simple wor
7373
TechScript is:
7474
- 🟢 **A programming language** — you can write code that runs on your computer natively
7575
- 🌐 **A web builder** — you can build full websites with it (no HTML or CSS needed!)
76-
- 🦀 **Powered by Native Rust** — blazing fast compilation, completely independent of Python
76+
- 🦀 **Powered by Native Rust** — blazing fast compilation on Windows
77+
- 🐍 **Universal Fallback** — works on Termux, Linux, and Mac via built-in Python engine
7778
- 📦 **One command**`tech run yourfile.txs` and your program runs instantly into bytecodes
7879

7980
---
@@ -114,27 +115,27 @@ TechScript is:
114115

115116
#### Option 1: One-Click Installer *(Recommended for Beginners)*
116117

117-
1. Go to the [📥 v1.0.4.3 Release Page](https://github.com/Tcode-Motion/techscript/releases/tag/v1.0.4.3)
118-
2. Download **[TechScript_v1.0.4.3_Setup.exe](https://github.com/Tcode-Motion/techscript/releases/download/v1.0.4.3/TechScript_v1.0.4.3_Setup.exe)**
118+
1. Go to the [📥 v1.0.4.4 Release Page](https://github.com/Tcode-Motion/techscript/releases/tag/v1.0.4.4)
119+
2. Download **[TechScript_v1.0.4.4_Setup.exe](https://github.com/Tcode-Motion/techscript/releases/download/v1.0.4.4/TechScript_v1.0.4.4_Setup.exe)**
119120
3. Double-click it — it will install everything automatically!
120121
4. Open **PowerShell** (`Win + X` → "Windows PowerShell") and type:
121122

122123
```
123124
tech version
124125
```
125126

126-
You should see: `TechScript v1.0.4.3` 🎉
127+
You should see: `TechScript v1.0.4.4` 🎉
127128

128129
**What the installer does automatically:**
129-
- ✅ Puts `tech.exe` (v1.0.4.3) on your computer
130+
- ✅ Puts `tech.exe` (v1.0.4.4) on your computer
130131
- ✅ Makes the `tech` command available everywhere in your terminal
131132
- ✅ Registers `.txs` files so they know they belong to TechScript
132133
- ✅ Installs the VS Code extension for syntax highlighting
133134

134135
#### Option 2: Using pip *(Cross-Platform Wrapper)*
135136

136137
```powershell
137-
pip install techscript-lang==1.0.4.3
138+
pip install techscript-lang==1.0.4.4
138139
```
139140

140141
---
@@ -143,7 +144,12 @@ pip install techscript-lang==1.0.4.3
143144

144145
> **No Python required to install or run!**
145146
146-
**One-line installer:**
147+
**Using pip (Easiest):**
148+
```bash
149+
pip install techscript-lang
150+
```
151+
152+
**One-line script installer:**
147153
```bash
148154
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bash
149155
```
@@ -160,11 +166,18 @@ sudo apt install techscript
160166

161167
> **No Python required to install or run!**
162168
169+
**Using pip (Easiest):**
170+
```bash
171+
pip install techscript-lang
172+
```
173+
174+
**Using Homebrew:**
163175
```bash
164-
# Using Homebrew:
165176
brew install tcode-motion/techscript/techscript
177+
```
166178

167-
# OR use the one-line installer:
179+
**OR use the one-line installer:**
180+
```bash
168181
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bash
169182
```
170183

build/lib/techscript_wrapper/__main__.py

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,62 @@
44
import urllib.request
55
import subprocess
66

7-
VERSION = "1.0.4.3"
7+
VERSION = "1.0.4.4"
88
REPO = "Tcode-Motion/techscript"
99

1010
def download_binary():
11+
"""Attempts to download the high-performance native VM."""
1112
system = platform.system().lower()
1213
machine = platform.machine().lower()
1314

14-
# Define asset name based on OS Architecture
15+
# We only have native binaries for Windows currently
1516
asset_name = None
1617
if system == "windows":
1718
asset_name = "techscriptv1.0.4.3.exe"
18-
elif system == "linux":
19-
asset_name = "tech-linux-x64" # Placeholder for future linux release
20-
elif system == "darwin":
21-
asset_name = "tech-macos-x64" # Placeholder for future mac release
22-
19+
2320
if not asset_name:
24-
print(f"Unsupported system: {system} {machine}")
25-
sys.exit(1)
21+
return None
2622

27-
url = f"https://github.com/{REPO}/releases/download/v{VERSION}/{asset_name}"
23+
url = f"https://github.com/{REPO}/releases/download/v1.0.4.3/{asset_name}"
2824

2925
bin_dir = os.path.join(os.path.expanduser("~"), ".techscript", "bin")
3026
os.makedirs(bin_dir, exist_ok=True)
3127

3228
exe_path = os.path.join(bin_dir, "tech.exe" if system == "windows" else "tech")
3329

3430
if not os.path.exists(exe_path):
35-
print(f"Downloading TechScript v{VERSION} for {system}...")
31+
print(f"Downloading TechScript Native Engine (Windows) for peak performance...")
3632
try:
3733
urllib.request.urlretrieve(url, exe_path)
38-
if system != "windows":
39-
os.chmod(exe_path, 0o755)
4034
print("Download complete!")
41-
except Exception as e:
42-
print(f"Failed to download native binary: {e}")
43-
sys.exit(1)
35+
except Exception:
36+
return None # Fail silently and use Python fallback
4437

4538
return exe_path
4639

47-
def main():
48-
exe_path = download_binary()
40+
def run_python_engine():
41+
"""Fallback to the built-in Python interpreter."""
4942
try:
50-
sys.exit(subprocess.call([exe_path] + sys.argv[1:]))
51-
except KeyboardInterrupt:
52-
sys.exit(130)
43+
from .techscript.cli import main as python_main
44+
python_main()
45+
except Exception as e:
46+
print(f"Error: Could not launch TechScript engine: {e}")
47+
sys.exit(1)
48+
49+
def main():
50+
system = platform.system().lower()
51+
52+
# Try native engine on Windows
53+
if system == "windows":
54+
exe_path = download_binary()
55+
if exe_path and os.path.exists(exe_path):
56+
try:
57+
sys.exit(subprocess.call([exe_path] + sys.argv[1:]))
58+
except Exception:
59+
pass # Try python fallback if native fails
60+
61+
# Fallback to Python engine for Android (Termux), Linux, Mac
62+
run_python_engine()
5363

5464
if __name__ == "__main__":
5565
main()
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"""TechScript — A simple, friendly programming language."""
2+
__version__ = "1.0.1"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Allow running TechScript as `python -m techscript`."""
2+
from techscript.cli import main
3+
4+
if __name__ == "__main__":
5+
main()

0 commit comments

Comments
 (0)