Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
13 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,41 @@
### ๊ธฐ์ˆ  ์Šคํƒ
- **Frontend**: React 18, TypeScript, Vite, Vitest
- **Backend**: Rust, Tauri 2.0
- **JavaScript Engine**: Deno Core 0.323 (V8 ๊ธฐ๋ฐ˜)
- **Package Manager**: pnpm
- **Linting**: oxlint (JavaScript), clippy (Rust)
- **Formatting**: Prettier (JavaScript), rustfmt (Rust)
- **Documentation**: RSPress

### JavaScript ๋Ÿฐํƒ€์ž„ ์•„ํ‚คํ…์ฒ˜

#### Deno Core ํ†ตํ•ฉ
- **์—”์ง„**: `deno_core` 0.323 (V8 JavaScript ์—”์ง„)
- **์‹คํ–‰ ๋ฐฉ์‹**: `tokio::task::spawn_blocking`์œผ๋กœ ๋ณ„๋„ ์Šค๋ ˆ๋“œ์—์„œ ์‹คํ–‰
- **ํ˜ธํ™˜์„ฑ**: Tauri 2.0๊ณผ ์™„์ „ ํ˜ธํ™˜ (Send ํŠธ๋ ˆ์ดํŠธ ๋ฌธ์ œ ํ•ด๊ฒฐ)

#### ํ•ต์‹ฌ ์ปดํฌ๋„ŒํŠธ
```
apps/executeJS/src-tauri/src/
โ”œโ”€โ”€ deno_runtime.rs # Deno Core ๋Ÿฐํƒ€์ž„ ๊ตฌํ˜„
โ”œโ”€โ”€ bootstrap.js # JavaScript API ์ •์˜
โ”œโ”€โ”€ js_executor.rs # ์‹คํ–‰ ๊ฒฐ๊ณผ ๊ด€๋ฆฌ
โ””โ”€โ”€ commands.rs # Tauri ๋ช…๋ น์–ด
```

#### ์‹คํ–‰ ํ๋ฆ„
1. **์ดˆ๊ธฐํ™”**: `DenoExecutor::new()` - ์ถœ๋ ฅ ๋ฒ„ํผ ์„ค์ •
2. **์‹คํ–‰**: `execute_script()` - ๋ณ„๋„ ์Šค๋ ˆ๋“œ์—์„œ Deno Core ์‹คํ–‰
3. **API ์—ฐ๊ฒฐ**: `bootstrap.js` - console.log, alert ๋“ฑ ์ปค์Šคํ…€ API
4. **๊ฒฐ๊ณผ ์ฒ˜๋ฆฌ**: ์ถœ๋ ฅ ๋ฒ„ํผ์—์„œ ๊ฒฐ๊ณผ ์ˆ˜์ง‘ ๋ฐ ๋ฐ˜ํ™˜

#### ์ง€์› ๊ธฐ๋Šฅ
- โœ… `console.log()` - ๋‹ค์ค‘ ์ธ์ž, ๊ฐ์ฒด ์ง๋ ฌํ™”
- โœ… `alert()` - ์‚ฌ์šฉ์ž ์•Œ๋ฆผ
- โœ… ๋ณ€์ˆ˜ ํ• ๋‹น ๋ฐ ๊ณ„์‚ฐ
- โœ… ๋ฌธ๋ฒ• ์˜ค๋ฅ˜ ๊ฐ์ง€ (์‹ค์ œ JavaScript ์—”์ง„ ์ˆ˜์ค€)
- โœ… Chrome DevTools ์ˆ˜์ค€์˜ ์ถœ๋ ฅ

## ์ฝ”๋”ฉ ๊ทœ์น™

### JavaScript/TypeScript
Expand Down Expand Up @@ -134,6 +164,12 @@ chore: ๋นŒ๋“œ ์„ค์ • ๋ณ€๊ฒฝ
- Tauri DevTools ์‚ฌ์šฉ
- ๋„ค์ดํ‹ฐ๋ธŒ ๋กœ๊ทธ ํ™•์ธ

### JavaScript ๋Ÿฐํƒ€์ž„
- `cargo test deno_runtime::tests` - ๋Ÿฐํƒ€์ž„ ํ…Œ์ŠคํŠธ
- `bootstrap.js` ์ˆ˜์ • ์‹œ ์žฌ์ปดํŒŒ์ผ ํ•„์š”
- op ํ•จ์ˆ˜ ์ถ”๊ฐ€ ์‹œ `extension!` ๋งคํฌ๋กœ ์—…๋ฐ์ดํŠธ
- ์ „์—ญ ์ƒํƒœ(`OUTPUT_BUFFER`) ์ฃผ์˜

## ์ฃผ์˜์‚ฌํ•ญ

1. **์˜์กด์„ฑ**: ๋ชจ๋“  ์˜์กด์„ฑ์€ `latest` ๋ฒ„์ „ ์‚ฌ์šฉ
Expand All @@ -158,4 +194,11 @@ chore: ๋นŒ๋“œ ์„ค์ • ๋ณ€๊ฒฝ
### ๋ฆฐํŠธ ์˜ค๋ฅ˜
1. `pnpm lint:fix` ์‹คํ–‰
2. `cargo fmt` ์‹คํ–‰
3. ์ˆ˜๋™์œผ๋กœ ๊ทœ์น™์— ๋งž๊ฒŒ ์ˆ˜์ •
3. ์ˆ˜๋™์œผ๋กœ ๊ทœ์น™์— ๋งž๊ฒŒ ์ˆ˜์ •

### Deno Core ๊ด€๋ จ ๋ฌธ์ œ
1. **Send ํŠธ๋ ˆ์ดํŠธ ์˜ค๋ฅ˜**: `tokio::task::spawn_blocking` ์‚ฌ์šฉ ํ™•์ธ
2. **op ํ•จ์ˆ˜ ์˜ค๋ฅ˜**: `#[op2(fast)]` ์†์„ฑ ๋ฐ `extension!` ๋งคํฌ๋กœ ํ™•์ธ
3. **bootstrap.js ์˜ค๋ฅ˜**: `include_str!` ๋งคํฌ๋กœ๋กœ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ํฌํ•จ๋˜์—ˆ๋Š”์ง€ ํ™•์ธ
4. **์ „์—ญ ์ƒํƒœ ์ถฉ๋Œ**: ํ…Œ์ŠคํŠธ ๊ฐ„ ๊ฒฉ๋ฆฌ ๋ฝ ์‚ฌ์šฉ
5. **V8 ์—”์ง„ ์˜ค๋ฅ˜**: `deno_core` ๋ฒ„์ „ ํ˜ธํ™˜์„ฑ ํ™•์ธ
60 changes: 0 additions & 60 deletions .github/workflows/build.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.18.3
version: 10.19.0

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -65,4 +65,4 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/doc_build
publish_dir: ./docs/doc_build
6 changes: 3 additions & 3 deletions .github/workflows/frontend-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.18.3
version: 10.19.0

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.18.3
version: 10.19.0

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -66,4 +66,4 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Type check
run: pnpm type-check
run: pnpm type-check
4 changes: 2 additions & 2 deletions .github/workflows/javascript-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.18.3
version: 10.19.0

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -48,4 +48,4 @@ jobs:
run: pnpm lint

- name: Format check
run: pnpm format:check
run: pnpm format:check
7 changes: 1 addition & 6 deletions .github/workflows/rust-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
components: rustfmt
cache: true
matcher: true

- name: Check Rust formatting
run: |
echo "Checking Rust code formatting..."
cargo fmt --all -- --check

- name: Run Clippy
run: |
echo "Running Clippy lints..."
cargo clippy --all-targets --all-features -- -D warnings
36 changes: 0 additions & 36 deletions .github/workflows/rust-test.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ temp/
# Rust
**/target/
**/*.rs.bk

# Tauri generated files
**/src-tauri/gen
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-next"
]
}
}
Loading