Skip to content
Tauri 中文网

更新依赖

更新 npm 包

¥Update npm Packages

如果你使用的是 tauri 包:

¥If you are using the tauri package:

npm install @tauri-apps/cli@latest @tauri-apps/api@latest

你还可以使用以下命令在命令行上检测 Tauri 的最新版本:

¥You can also detect what the latest version of Tauri is on the command line, using:

npm outdated @tauri-apps/cli

更新 Cargo 包

¥Update Cargo Packages

你可以使用 cargo outdated 或在 crates.io 页面上检查过时的软件包:tauri / tauri-build.

¥You can check for outdated packages with cargo outdated or on the crates.io pages: tauri / tauri-build.

转到 src-tauri/Cargo.toml 并将 tauritauri-build 更改为

¥Go to src-tauri/Cargo.toml and change tauri and tauri-build to

[build-dependencies]
tauri-build = "%version%"
[dependencies]
tauri = { version = "%version%" }

其中 %version% 是上述对应的版本号。

¥where %version% is the corresponding version number from above.

然后执行以下操作:

¥Then do the following:

Terminal window
cd src-tauri
cargo update

或者,你可以运行 cargo-edit 提供的 cargo upgrade 命令,该命令会自动补齐所有这些操作。

¥Alternatively, you can run the cargo upgrade command provided by cargo-edit which does all of this automatically.


Tauri 中文网 - 粤ICP备13048890号