现在我不那么困惑了,因为我幸运地变得比以前麻木了。——梭罗的《瓦尔登湖》

这里我的Rust版本太低了,所以更新了下

终端如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
(base) 2023:~ achao$ cd ~/IdeaProjects/
(base) 2023:IdeaProjects achao$ sh <(curl https://create.tauri.app/sh)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16121 100 16121 0 0 17014 0 --:--:-- --:--:-- --:--:-- 17005
info: downloading create-tauri-app
✔ Project name · simple-tauri
✔ Identifier · com.simple-tauri.app
✔ simple-tauri directory is not empty, do you want to overwrite? · no
✘ Directory is not empty, Operation Cancelled
(base) 2023:IdeaProjects achao$ sh <(curl https://create.tauri.app/sh)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16121 100 16121 0 0 19638 0 --:--:-- --:--:-- --:--:-- 19635
info: downloading create-tauri-app
✔ Project name · simple-tauri
✔ Identifier · com.simple-tauri.app
✔ Choose which language to use for your frontend · TypeScript / JavaScript - (pnpm, yarn, npm, deno, bun)
✔ Choose your package manager · npm
✔ Choose your UI template · React - (https://react.dev/)
✔ Choose your UI flavor · TypeScript

Template created! To get started run:
cd simple-tauri
npm install
npm run tauri android init
npm run tauri ios init

For Desktop development, run:
npm run tauri dev

For Android development, run:
npm run tauri android dev

For iOS development, run:
npm run tauri ios dev

(base) 2023:IdeaProjects achao$ cd simple-tauri
(base) 2023:simple-tauri achao$ npm install

added 70 packages, and audited 71 packages in 56s

9 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities
(base) 2023:simple-tauri achao$ npm run tauri dev
> simple-tauri@0.1.0 tauri
> tauri dev

Running BeforeDevCommand (`npm run dev`)

> simple-tauri@0.1.0 dev
> vite


VITE v6.2.0 ready in 74 ms

➜ Local: http://localhost:1420/
Running DevCommand (`cargo run --no-default-features --color always --`)
Info Watching /Users/achao/IdeaProjects/simple-tauri/src-tauri for changes...
error: rustc 1.80.0 is not supported by the following packages:
litemap@0.7.5 requires rustc 1.81
zerofrom@0.1.6 requires rustc 1.81
Either upgrade rustc or select compatible dependency versions with
`cargo update <name>@<current-ver> --precise <compatible-ver>`
where `<compatible-ver>` is the latest version supporting rustc 1.80.0

(base) 2023:simple-tauri achao$ rustc --version
rustc 1.80.0 (051478957 2024-07-21)
(bassimple-tauri023:hsswai achao$ rustup update
info: syncing channel updates for 'stable-aarch64-apple-darwin'
info: latest update on 2025-02-20, rust version 1.85.0 (4d91de4e4 2025-02-17)
info: downloading component 'cargo'
6.5 MiB / 6.5 MiB (100 %) 1.7 MiB/s in 2s
info: downloading component 'clippy'
2.4 MiB / 2.4 MiB (100 %) 1.0 MiB/s in 3s
info: downloading component 'rust-docs'
18.4 MiB / 18.4 MiB (100 %) 1.0 MiB/s in 13s
info: downloading component 'rust-std'
24.3 MiB / 24.3 MiB (100 %) 1.3 MiB/s in 22s
info: downloading component 'rustc'
52.5 MiB / 52.5 MiB (100 %) 6.1 MiB/s in 8s
info: downloading component 'rustfmt'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
18.4 MiB / 18.4 MiB (100 %) 4.2 MiB/s in 3s
info: installing component 'rust-std'
24.3 MiB / 24.3 MiB (100 %) 22.2 MiB/s in 1s
info: installing component 'rustc'
52.5 MiB / 52.5 MiB (100 %) 23.4 MiB/s in 2s
info: installing component 'rustfmt'
info: checking for self-update

stable-aarch64-apple-darwin updated - rustc 1.85.0 (4d91de4e4 2025-02-17) (from rustc 1.80.0 (051478957 2024-07-21))

info: cleaning up downloads & tmp directorsimple-tauri(base) 2023:hsswai achao$ rustc --version
rustc 1.85.0 (4d91de4e4 simple-tauri-02-17)
(base) 2023:hsswai achao$ npm run tauri dev