Skip to content

Commit 2cf13e2

Browse files
committed
0.0.0
1 parent 087df77 commit 2cf13e2

63 files changed

Lines changed: 8430 additions & 470 deletions

Some content is hidden

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

.editorconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
charset = utf-8
33

44

5-
[*.pest]
5+
[*.{vue,tsx,jsx}]
6+
indent_style = space
7+
indent_size = 2
8+
9+
[*.{sass,scss,css}]
610
indent_style = space
711
indent_size = 4
812

9-
[*.toml]
13+
[*.{json,toml}]
1014
indent_style = space
1115
indent_size = 4

.github/workflows/hugo.yml

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, dev]
6+
pull_request:
7+
branches: [master, dev]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
rust-check:
15+
name: Rust Check
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Install Rust toolchain
22+
uses: dtolnay/rust-toolchain@nightly
23+
with:
24+
components: rustfmt, clippy
25+
26+
- name: Cache cargo registry
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cargo/registry
31+
~/.cargo/git
32+
target
33+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-cargo-
36+
37+
- name: Check formatting
38+
run: cargo fmt --all -- --check
39+
40+
- name: Run clippy
41+
run: cargo clippy --all-targets --all-features -- -D warnings
42+
43+
- name: Check compilation
44+
run: cargo check --all-targets --all-features
45+
46+
rust-test:
47+
name: Rust Test
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
os: [ubuntu-latest, windows-latest, macos-latest]
52+
runs-on: ${{ matrix.os }}
53+
steps:
54+
- name: Checkout repository
55+
uses: actions/checkout@v4
56+
57+
- name: Install Rust toolchain
58+
uses: dtolnay/rust-toolchain@nightly
59+
60+
- name: Cache cargo registry
61+
uses: actions/cache@v4
62+
with:
63+
path: |
64+
~/.cargo/registry
65+
~/.cargo/git
66+
target
67+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
68+
restore-keys: |
69+
${{ runner.os }}-cargo-
70+
71+
- name: Run tests (default features)
72+
run: cargo test --workspace
73+
74+
js-check:
75+
name: JavaScript/TypeScript Check
76+
runs-on: ubuntu-latest
77+
steps:
78+
- name: Checkout repository
79+
uses: actions/checkout@v4
80+
81+
- name: Setup Node.js
82+
uses: actions/setup-node@v4
83+
with:
84+
node-version: "20"
85+
86+
- name: Install pnpm
87+
uses: pnpm/action-setup@v4
88+
with:
89+
version: 9
90+
91+
- name: Get pnpm store directory
92+
shell: bash
93+
run: |
94+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
95+
id: pnpm-cache
96+
97+
- name: Setup pnpm cache
98+
uses: actions/cache@v4
99+
with:
100+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
101+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
102+
restore-keys: |
103+
${{ runner.os }}-pnpm-store-
104+
105+
- name: Install dependencies
106+
run: pnpm install --frozen-lockfile
107+
108+
- name: Run Biome CI (format + lint)
109+
run: npx biome ci .
110+
111+
- name: Run TypeScript type check
112+
run: pnpm run typecheck:frontend
113+
114+
- name: Build frontend packages
115+
run: pnpm run build:frontend
116+
117+
hugo-consistency-test:
118+
name: Hugo Consistency Test
119+
runs-on: ubuntu-latest
120+
steps:
121+
- name: Checkout repository
122+
uses: actions/checkout@v4
123+
with:
124+
submodules: true
125+
126+
- name: Install Rust toolchain
127+
uses: dtolnay/rust-toolchain@nightly
128+
129+
- name: Cache cargo registry
130+
uses: actions/cache@v4
131+
with:
132+
path: |
133+
~/.cargo/registry
134+
~/.cargo/git
135+
target
136+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
137+
restore-keys: |
138+
${{ runner.os }}-cargo-
139+
140+
- name: Build rusty-ssg hugo
141+
run: cargo build --package hugo
142+
143+
- name: Setup Node.js
144+
uses: actions/setup-node@v4
145+
with:
146+
node-version: "20"
147+
148+
- name: Install pnpm
149+
uses: pnpm/action-setup@v4
150+
with:
151+
version: 9
152+
153+
- name: Get pnpm store directory
154+
shell: bash
155+
run: |
156+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
157+
id: pnpm-cache
158+
159+
- name: Setup pnpm cache
160+
uses: actions/cache@v4
161+
with:
162+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
163+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
164+
restore-keys: |
165+
${{ runner.os }}-pnpm-store-
166+
167+
- name: Install dependencies
168+
run: pnpm install --frozen-lockfile
169+
170+
- name: Run Hugo consistency test for hugo-ananke
171+
run: |
172+
cd examples/hugo-ananke
173+
pnpm test
174+
175+
- name: Run Hugo consistency test for hugo-blowfish
176+
run: |
177+
cd examples/hugo-blowfish
178+
pnpm test
179+
180+
- name: Run Hugo consistency test for hugo-mvp
181+
run: |
182+
cd examples/hugo-mvp
183+
pnpm test

.github/workflows/rust.yml

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

.gitignore

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,27 @@ time-travel.*
55

66
# IDE
77
.vscode/
8-
.vs/
98
.idea/
9+
.trae/
10+
.vs/
1011
*.iml
1112

13+
# Node
14+
node_modules/
15+
build/
16+
.wrangler/
17+
dist/
18+
static/**/*
19+
index.css
20+
pnpm-lock.yaml
21+
1222
# Rust
1323
target/
1424
Cargo.lock
25+
*.log
26+
*.txt
27+
.cargo/config.toml
28+
29+
# SQLite
30+
*.db
31+
*.db-wal

Cargo.toml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
11
[workspace]
2-
members = ["compilers/*"]
3-
default-members = [
4-
"compilers/hexo",
2+
resolver = "3"
3+
members = [
4+
"compilers/typescript-types",
5+
"compilers/typescript-ir",
6+
"compilers/typescript",
57
]
6-
exclude = [
7-
"compilers/.DS_Store",
8+
default-members = [
9+
"compilers/typescript-types",
10+
"compilers/typescript-ir",
11+
"compilers/typescript",
812
]
913

10-
[profile.release]
11-
lto = true
12-
panic = "abort"
14+
[workspace.package]
15+
name = "rusty-typescript"
16+
version = "0.0.0"
17+
edition = "2024"
18+
authors = ["Rusty TypeScript Team"]
19+
description = "Rusty TypeScript compiler and toolchain"
20+
license = "MIT"
21+
repository = "https://github.com/nyar-vm/rusty-typescript"
22+
homepage = "https://github.com/nyar-vm/rusty-typescript"
23+
24+
[workspace.dependencies]
25+
# 共享依赖
26+
serde = { version = "1.0", features = ["derive"] }
27+
serde_json = "1.0"
28+
thiserror = "1.0"
29+
log = "0.4"
30+
env_logger = "0.10"
31+
32+
# 项目内部依赖
33+
typescript-types = { path = "compilers/typescript-types", version = "0.0.0" }
34+
typescript-ir = { path = "compilers/typescript-ir", version = "0.0.0" }
35+
36+
# oak 依赖
37+
oak-typescript = { path = "../oaks/examples/oak-typescript", version = "0.0.10" }
38+
oak-core = { path = "../oaks/projects/oak-core", version = "0.0.10" }

0 commit comments

Comments
 (0)