Skip to content

Commit

Permalink
fix(config): 🐛 修改cargo的镜像源和文件后缀
Browse files Browse the repository at this point in the history
排除一些文件的格式化
  • Loading branch information
nongyehong committed Dec 10, 2024
1 parent 67d13af commit d882e2e
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 47 deletions.
6 changes: 0 additions & 6 deletions .cargo/config

This file was deleted.

11 changes: 11 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## 配置cargo的国内源 (依赖很多所以还是需要慢慢等待,不至于卡死下载不了)
[source.crates-io]
replace-with = 'rsproxy-sparse'
[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"
[source.rsproxy-sparse]
registry = "sparse+https://rsproxy.cn/index/"
[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"
[net]
git-fetch-with-cli = true
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
.vscode/**
src-tauri/capabilities/**
src-tauri/gen/**
src-tauri/target/**
src-tauri/Cargo.toml
CHANGELOG.md
auto-imports.d.ts
.gitee/**
Expand Down
4 changes: 2 additions & 2 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"plugins": {
"@release-it/bumper": {
"in": ["src-tauri/tauri.*.json", "src-tauri/Cargo.toml"],
"out": ["src-tauri/tauri.*.json", "src-tauri/Cargo.toml"]
"in": ["src-tauri/tauri.*.json"],
"out": ["src-tauri/tauri.*.json"]
},
"@release-it/conventional-changelog": {
"preset": {
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

53 changes: 22 additions & 31 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,62 +1,53 @@
version = "2.5.7"

[package]
name = "hula"
version = "2.5.3"
version = "2.5.7"
description = "hula"
authors = [ "nongyehong" ]
authors = ["nongyehong"]
license = ""
repository = ""
edition = "2021"

[profile.release]
panic = "abort"
codegen-units = 1
lto = true
opt-level = "s"
strip = true
panic = "abort" # 去掉昂贵的恐慌清理逻辑
codegen-units = 1 # 一个接一个地编译包,这样编译器就可以更好地优化
lto = true # 启用链接到优化
opt-level = "s" # 优化二进制文件大小,并且不会太大消耗性能,"z"极致优化大小但是会消耗性能
strip = true # 删除调试符号

[build-dependencies.tauri-build]
version = "2.0.2"
features = [ ]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "2.0.2", features = [] }

[dependencies]
tauri = { version = "2.0.6", features = [ "macos-private-api", "tray-icon", "image-png"] }
tauri-plugin-os = "2.0.1"
tauri-plugin-shell = "2.0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tauri-plugin-websocket = "2.0.1"
tauri-plugin-http = {version="2.0.1",features= ["unsafe-headers"] }
tauri-plugin-process = "2.0.1"
tauri-plugin-fs = "2.0.1"
tauri-plugin-dialog = "2.0.1"
tauri-plugin-upload = "2.0.1"
tauri-plugin-global-shortcut = "2.0.1"
tauri-plugin-clipboard-manager = "2.0.1"
tauri-plugin-updater = "2"
tauri-plugin-sql = { version = "2", features = ["sqlite"] }
tauri-plugin-single-instance = "2"

[dependencies.tauri]
version = "2.0.6"
features = [ "macos-private-api", "tray-icon", "image-png" ]

[dependencies.serde]
version = "1"
features = [ "derive" ]

[dependencies.tauri-plugin-http]
version = "2.0.1"
features = [ "unsafe-headers" ]

[dependencies.tauri-plugin-sql]
version = "2"
features = [ "sqlite" ]

[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-autostart = "2.0.1"
lazy_static = "1.4"
screenshots = "0.5.4"
base64 = "0.22.1"
rodio = "0.17.3"


[features]
default = [ "custom-protocol" ]
custom-protocol = [ "tauri/custom-protocol" ]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is a URL
default = ["custom-protocol"]
# this feature is used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = ["tauri/custom-protocol"]
34 changes: 27 additions & 7 deletions src-tauri/gen/schemas/windows-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
}
},
"permissions": {
"description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ```",
"description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ] ```",
"type": "array",
"items": {
"$ref": "#/definitions/PermissionEntry"
Expand Down Expand Up @@ -140,7 +140,7 @@
"identifier": {
"anyOf": [
{
"description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n",
"description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n#### Included permissions within this default permission set:\n",
"type": "string",
"const": "fs:default"
},
Expand Down Expand Up @@ -984,6 +984,11 @@
"type": "string",
"const": "fs:allow-seek"
},
{
"description": "Enables the size command without any pre-configured scope.",
"type": "string",
"const": "fs:allow-size"
},
{
"description": "Enables the stat command without any pre-configured scope.",
"type": "string",
Expand Down Expand Up @@ -1109,6 +1114,11 @@
"type": "string",
"const": "fs:deny-seek"
},
{
"description": "Denies the size command without any pre-configured scope.",
"type": "string",
"const": "fs:deny-size"
},
{
"description": "Denies the stat command without any pre-configured scope.",
"type": "string",
Expand Down Expand Up @@ -1581,7 +1591,7 @@
"description": "FS scope entry.",
"anyOf": [
{
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs. FS scope path pattern.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
},
{
Expand All @@ -1591,7 +1601,7 @@
],
"properties": {
"path": {
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
}
}
Expand All @@ -1605,7 +1615,7 @@
"description": "FS scope entry.",
"anyOf": [
{
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs. FS scope path pattern.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
},
{
Expand All @@ -1615,7 +1625,7 @@
],
"properties": {
"path": {
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
}
}
Expand Down Expand Up @@ -3630,7 +3640,7 @@
"const": "dialog:deny-save"
},
{
"description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n",
"description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n#### Included permissions within this default permission set:\n",
"type": "string",
"const": "fs:default"
},
Expand Down Expand Up @@ -4474,6 +4484,11 @@
"type": "string",
"const": "fs:allow-seek"
},
{
"description": "Enables the size command without any pre-configured scope.",
"type": "string",
"const": "fs:allow-size"
},
{
"description": "Enables the stat command without any pre-configured scope.",
"type": "string",
Expand Down Expand Up @@ -4599,6 +4614,11 @@
"type": "string",
"const": "fs:deny-seek"
},
{
"description": "Denies the size command without any pre-configured scope.",
"type": "string",
"const": "fs:deny-size"
},
{
"description": "Denies the stat command without any pre-configured scope.",
"type": "string",
Expand Down

0 comments on commit d882e2e

Please sign in to comment.