Skip to content

Commit e287ac6

Browse files
author
Tanmoy
committed
TechScript v1.0.5 - High Performance Rust Engine & Enhanced Visuals (Sanitized)
1 parent ce78885 commit e287ac6

195 files changed

Lines changed: 422 additions & 14694 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

CONTRIBUTOR_GUIDE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributing to TechScript
2+
3+
Thank you for your interest in TechScript!
4+
5+
TechScript is natively written in Rust. The project is structured as a standard Cargo Workspace.
6+
7+
## Project Structure
8+
9+
* `crates/techscript-core/`: The core library. Contains Lexer, Parser, AST, Compiler, VM, Builtins, and standard library (`stdlib/`).
10+
* `crates/techscript-cli/`: The `tech` binary. Includes runner, REPL, formatter, linter, package manager (`tech install`), and testing framework (`tech test`).
11+
* `crates/techscript-lsp/`: Language Server Protocol implementation for IDEs (like VSCode).
12+
* `vscode-extension/`: The official Visual Studio Code syntax highlighting and snippet extension.
13+
14+
## Building from Source
15+
16+
Prerequisites:
17+
- [Rust toolchain](https://rustup.rs/) (stable)
18+
19+
```bash
20+
git clone https://github.com/techscript/techscript.git
21+
cd techscript
22+
23+
# Build the workspace
24+
cargo build --release
25+
26+
# Run the test suite
27+
cargo test --workspace
28+
```
29+
30+
## Creating Pull Requests
31+
32+
1. Fork the repository
33+
2. Create a new feature branch (`git checkout -b feature/cool-idea`)
34+
3. Make your changes in the respective `.rs` files.
35+
4. Add tests to `crates/techscript-core/tests/` (we use snapshot testing).
36+
5. Run `cargo fmt` and `cargo clippy`.
37+
6. Submit your PR!
38+
39+
All PRs must pass the GitHub Actions CI pipeline which runs formatting, linting, and full tests across Linux, Windows, and macOS.

LANGUAGE_SPEC.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# TechScript Language Specification (v1.0.5)
2+
3+
TechScript is a highly readable, dynamically typed but gradually typed, system-level scripting language written in pure Rust.
4+
5+
## Types
6+
7+
TechScript supports the following native data types:
8+
* `int`: 64-bit signed integer (`42`, `0xFF`, `0b1010`)
9+
* `float`: 64-bit floating point (`3.14`)
10+
* `string`: UTF-8 string, optionally f-strings (`"Hello"`, `f"Hello {name}"`)
11+
* `bool`: Boolean (`true` or `false`)
12+
* `none`: The null type (`none`)
13+
* `list`: dynamic array (`[1, 2, 3]`)
14+
* `map`: hash map (`{"key": "value"}`)
15+
* `function`: First-class callable objects
16+
* `class`, `instance`: Object-oriented constructs
17+
18+
## Core Syntax
19+
20+
### Variables
21+
```techscript
22+
make x = 10 # Mutable by default
23+
keep PI = 3.1415 # Immutable constant
24+
make y: int = 20 # Gradual typing annotation
25+
```
26+
27+
### Functions
28+
```techscript
29+
build greeting(name: string) {
30+
say f"Hello, {name}!"
31+
send true
32+
}
33+
```
34+
35+
### Async & Concurrency
36+
```techscript
37+
async build fetch_data() {
38+
# Async background logic
39+
}
40+
make data = await fetch_data()
41+
42+
# Fire and forget concurrent thread
43+
spawn fetch_data()
44+
```
45+
46+
### Control Flow
47+
```techscript
48+
when x > 10 {
49+
say "Large"
50+
} elif x == 10 {
51+
say "Exact"
52+
} else {
53+
say "Small"
54+
}
55+
56+
repeat x < 20 {
57+
x = x + 1
58+
}
59+
60+
each item in [1, 2, 3] {
61+
say item
62+
}
63+
```
64+
65+
### Pattern Matching
66+
```techscript
67+
match value {
68+
case 1 { say "One" }
69+
case 2 { say "Two" }
70+
case _ { say "Other" }
71+
}
72+
```
73+
74+
### Object Oriented
75+
```techscript
76+
model Person {
77+
build init(self, name) {
78+
self.name = name
79+
}
80+
build greet(self) {
81+
say f"Hi, I am {self.name}"
82+
}
83+
}
84+
```
85+
86+
### Error Handling
87+
```techscript
88+
attempt {
89+
make content = read_file("missing.txt")
90+
} catch error {
91+
say f"Failed: {error}"
92+
} finally {
93+
say "Cleanup"
94+
}
95+
```

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 TechScript Team
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST.in

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)