Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ docs

# Ghost directory
public?

# Tauri / Rust build artifacts
src-tauri/target/
src-tauri/gen/
54 changes: 54 additions & 0 deletions Tauri.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Tauri Desktop Foundation

This branch contains the first-pass desktop preparation for running the current Vite/React game inside a Tauri shell.

## Current State

- The web game/runtime remains the primary implementation.
- Editor file operations now go through `src/platform/fileApi.ts`.
- That adapter still supports the current Vite `/api/*` middleware flow.
- A matching `src-tauri` backend scaffold was added with commands for:
- listing project files;
- ensuring files exist;
- saving files;
- reading files;
- deleting files;
- opening files/folders in the system shell.

## Important Caveat

The current Rust command layer resolves paths relative to the process working directory. That is good enough for early local development and architectural validation, but it is not yet the final packaged-project model.

For a production editor build we should decide where project data lives:

- open/edit a user-selected project folder;
- work from a dedicated workspace path;
- or separate the desktop editor from the packaged player.

## Expected Local Prerequisites

1. Install Rust/Cargo.
2. Install the Tauri CLI:

```bash
npm install -D @tauri-apps/cli
```

3. Then run:

```bash
npm run tauri:dev
```

For a desktop package:

```bash
npm run tauri:build
```

## Next Recommended Steps

1. Add the official Tauri npm dependency and lockfile update.
2. Smoke-test `tauri dev`.
3. Replace the temporary working-directory project-root assumption with an explicit project/workspace model.
4. Decide whether the integrated editor is supported in packaged builds or only in desktop-dev/editor builds.
218 changes: 218 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"tauri:dev": "tauri dev",
"tauri:build": "tauri build",
"lint": "eslint .",
"test": "vitest run",
"typecheck": "tsc -p tsconfig.app.json --noEmit && tsc -p tsconfig.node.json --noEmit",
Expand All @@ -24,6 +26,7 @@
},
"devDependencies": {
"@eslint/js": "^9.39.1",
"@tauri-apps/cli": "^2.10.1",
"@types/node": "^24.10.1",
"@types/react": "^19.2.5",
"@types/react-dom": "^19.2.3",
Expand Down
1 change: 1 addition & 0 deletions progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ Original prompt: Давай временно переключимся с пар
- Implemented state-driven EditorBottomMenu with modifier modes; added Alt/Shift Save As path and Ctrl action set; pending browser smoke verification.

- Verified in browser: bottom menu now switches between base / Alt / Ctrl / Shift layouts, and Alt mode updates D from Disable to Enable after toggling selected object disabled state.\n
- New task: add two editor selection slots. Planned behavior: Shift+1/2 saves current object or multi-selection when cursor is over canvas or hierarchy; 1/2 restores saved selection; empty slot shows toast.\n
Loading
Loading