|
1 |
| -# PyTauri + Vanilla TS |
| 1 | +# PyTauri + NiceGui |
2 | 2 |
|
3 |
| -```bash |
4 |
| -cd examples/nicegui-app |
5 |
| -``` |
6 |
| - |
7 |
| -and follow the tutorial section in Documentation. |
8 |
| - |
9 |
| -**NOTE**: **When using `tauri dev`, you must pass `--no-dev-server-wait`**, because the uvicorn server only starts after running the executable. |
10 |
| - |
11 |
| ---- |
| 3 | +> Make sure you have already installed `rust`, `Python`, `uv`, Tauri Prerequisites. |
| 4 | +> |
| 5 | +> You can find that in tutorial section in PyTauri Documentation. |
12 | 6 |
|
13 |
| -or you are hurry, just wanna see/run the demo: |
| 7 | +Clone this repository and `cd` into it first. |
14 | 8 |
|
15 |
| -> Make sure you have already installed `rust`, `uv`, `pnpm`, `node.js` and Tauri Prerequisites. |
16 |
| -> |
17 |
| -> > Because you have directly pulled the development repository, you need `pnpm` to manually build frontend assets. |
18 |
| -> > |
19 |
| -> > In actual use, this step has already been completed for `pytauri` on `crates.io`, which means only `rust` and `python` are required. |
20 |
| -> |
21 |
| -> You can find that in tutorial section in Documentation. |
| 9 | +## Standalone |
22 | 10 |
|
23 | 11 | ```bash
|
24 |
| -git clone https://github.com/WSH032/pytauri.git |
25 |
| -cd pytauri |
| 12 | +# activate virtual environment |
| 13 | +uv venv --python-preference only-system |
| 14 | +source .venv/bin/activate |
26 | 15 |
|
27 |
| -cd examples/nicegui-app |
| 16 | +# install the example package |
| 17 | +export PYTAURI_STANDALONE=1 |
| 18 | +# or powershell: $env:PYTAURI_STANDALONE=1 |
| 19 | +uv pip install --reinstall -e . |
28 | 20 |
|
29 |
| -# build frontend assets |
30 |
| -pnpm install |
31 |
| -pnpm -r run build |
| 21 | +cargo tauri dev --no-dev-server-wait |
| 22 | +``` |
| 23 | + |
| 24 | +## Python |
32 | 25 |
|
| 26 | +```bash |
33 | 27 | # activate virtual environment
|
34 |
| -uv venv |
| 28 | +uv venv --python-preference only-system |
35 | 29 | source .venv/bin/activate
|
36 | 30 | # or powershell: .venv\Scripts\Activate.ps1
|
37 | 31 |
|
|
0 commit comments