Skip to content

Commit 673b6d8

Browse files
committed
fix: 更新 @ver5/vitepress-plugin-rust-playground 依赖版本至 1.0.2
1 parent d166ccb commit 673b6d8

File tree

6 files changed

+73
-68
lines changed

6 files changed

+73
-68
lines changed

.github/prompts/ruster.prompt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ mode: 'agent'
1010
- **内容扩展**:对于内容不够详细或有提升空间的部分,进行适当的扩展和延伸,补充更深入的讲解或实际应用案例。
1111
- **重难点讲解**:针对 Rust 编程中的重点和难点内容,进行由浅入深、通俗易懂的讲解,帮助读者更好地理解相关知识。
1212
- **文件管理**:如有必要,可以新增或删除 `notes` 文件夹中的文件,以优化知识结构和内容完整性。
13-
- **Git 操作**:在适当的时机进行 `git commit`,格式为:`🤖📝AI: <描述信息>`,记录每次重要的内容修改或文件变更。
1413
- **联网搜索**:如果你具备联网能力,请在遇到不确定或需要最新资料的问题时,进行相关知识的在线搜索,并据此完善内容。
14+
- **Git 操作**:在适当的时机进行 `git commit`,格式为:`🤖📝AI: <描述信息>`,记录每次重要的内容修改或文件变更。
1515
- **输出风格**:请始终保持语言简洁明了,易于理解,适合不同层次的 Rust 学习者阅读。
1616

1717
在每次开始工作前,请根据实际能力回答以下问题:
1818

1919
- 如果你可以联网进行搜索,请回答:“我可以联网进行搜索相关知识。”
2020
- 如果你可以帮助进行勘误校正,请回答:“我可以帮助你进行勘误校正。”
2121

22-
请按照上述要求,依次对 `notes` 文件夹中的内容进行勘误、扩展和优化。在当前文件未完成所有修改的前,请不要停止,完成之后简要说明你做了哪些更正与补充,最后对该文件进行 git commit,reply in chinese。
22+
请按照上述要求,依次对 `notes` 文件夹中的内容进行勘误、扩展和优化。在当前文件未完成所有修改前,请不要停止,完成之后简要说明你做了哪些更正与补充,最后对该文件进行 git commit,reply in chinese。
Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,62 @@
11
:root {
2-
--vp-icon-runner:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' stroke='rgba(128,128,128,1)' viewBox='0 0 16 16'%3E%3Cpath d='M2.78 2L2 2.41v12l.78.42l9-6V8l-9-6zM3 13.48V3.35l7.6 5.07L3 13.48z'/%3E%3Cpath fill-rule='evenodd' d='m6 14.683l8.78-5.853V8L6 2.147V3.35l7.6 5.07L6 13.48v1.203z' clip-rule='evenodd'/%3E%3C/svg%3E")
2+
--vp-icon-runner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' stroke='rgba(128,128,128,1)' viewBox='0 0 16 16'%3E%3Cpath d='M2.78 2L2 2.41v12l.78.42l9-6V8l-9-6zM3 13.48V3.35l7.6 5.07L3 13.48z'/%3E%3Cpath fill-rule='evenodd' d='m6 14.683l8.78-5.853V8L6 2.147V3.35l7.6 5.07L6 13.48v1.203z' clip-rule='evenodd'/%3E%3C/svg%3E");
33
}
44

5-
$btnName:".run";
5+
$btnName: '.run';
66

77
.vp-doc {
8-
div[class*='language-'] {
9-
&:hover {
10-
button#{$btnName},
11-
button#{$btnName}:focus {
12-
opacity: 1;
13-
}
14-
}
8+
div[class*='language-'] {
9+
&:hover {
10+
button#{$btnName},
11+
button#{$btnName}:focus {
12+
opacity: 1;
13+
}
14+
}
1515

16-
& > button#{$btnName} {
17-
direction: ltr;
18-
position: absolute;
19-
top: 12px;
20-
right: 62px;
21-
z-index: 3;
22-
border: 1px solid var(--vp-code-copy-code-border-color);
23-
border-radius: 4px;
24-
width: 40px;
25-
height: 40px;
26-
background-color: var(--vp-code-copy-code-bg);
27-
opacity: 0;
28-
cursor: pointer;
29-
background-image: var(--vp-icon-runner);
30-
background-position: 50%;
31-
background-size: 20px;
32-
background-repeat: no-repeat;
33-
transition: border-color 0.25s, background-color 0.25s, opacity 0.25s;
16+
& > button#{$btnName} {
17+
direction: ltr;
18+
position: absolute;
19+
top: 12px;
20+
right: 62px;
21+
z-index: 3;
22+
border: 1px solid var(--vp-code-copy-code-border-color);
23+
border-radius: 4px;
24+
width: 40px;
25+
height: 40px;
26+
background-color: var(--vp-code-copy-code-bg);
27+
opacity: 0;
28+
cursor: pointer;
29+
background-image: var(--vp-icon-runner);
30+
background-position: 50%;
31+
background-size: 20px;
32+
background-repeat: no-repeat;
33+
transition: border-color 0.25s, background-color 0.25s, opacity 0.25s;
3434

35-
&:hover,
36-
&.runned {
37-
border-color: var(--vp-code-copy-code-hover-border-color);
38-
background-color: var(--vp-code-copy-code-hover-bg);
39-
}
40-
&:disabled,
41-
&[disabled] {
42-
cursor: not-allowed;
43-
}
44-
}
35+
&:hover,
36+
&.runned {
37+
border-color: var(--vp-code-copy-code-hover-border-color);
38+
background-color: var(--vp-code-copy-code-hover-bg);
39+
}
40+
&:disabled,
41+
&[disabled] {
42+
cursor: not-allowed;
43+
}
4544
}
45+
}
4646

47-
code.result {
48-
position: relative;
49-
padding: 10px;
50-
color: #24b736;
51-
white-space: pre-wrap;
52-
border-top: 1px solid #4e4e4e;
53-
background-color: transparent;
47+
code.result {
48+
position: relative;
49+
padding: 10px;
50+
color: #24b736;
51+
white-space: pre-wrap;
52+
border-top: 1px solid #4e4e4e;
53+
background-color: transparent;
5454

55-
&.result-warn {
56-
color: #dbdb12;
57-
&::before {
58-
content: "timeout: ";
59-
}
60-
}
55+
&.result-warn {
56+
color: #dbdb12;
57+
&::before {
58+
content: 'timeout: ';
59+
}
6160
}
62-
61+
}
6362
}

docs/notes/Hello World 二进制文件巨大之谜.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
2-
31
## 如何优化编译大小呢?
42

5-
* 发布模式:通过使用`cargo build --release`,你可以告诉 Rust 进行更多的优化,并去除调试信息。这通常会显著减小生成的二进制文件大小。
3+
- 发布模式:通过使用`cargo build --release`,你可以告诉 Rust 进行更多的优化,并去除调试信息。这通常会显著减小生成的二进制文件大小。
64

7-
* 去除标准库:对于某些特定应用,如嵌入式系统编程,你可能不需要整个标准库。在这种情况下,你可以考虑使用`#![no_std]`属性来禁用标准库。
5+
- 去除标准库:对于某些特定应用,如嵌入式系统编程,你可能不需要整个标准库。在这种情况下,你可以考虑使用`#![no_std]`属性来禁用标准库。
86

9-
* 使用 strip 命令:strip 是一个可以移除二进制文件中符号信息的工具,进一步减小文件大小。
7+
- 使用 strip 命令:strip 是一个可以移除二进制文件中符号信息的工具,进一步减小文件大小。
108

11-
* 其他优化工具和策略:例如,使用 upx 可以进一步压缩生成的二进制文件。还有其他的 Cargo 插件和工具,如 cargo-bloat,可以帮助你识别和减小二进制文件大小。
9+
- 其他优化工具和策略:例如,使用 upx 可以进一步压缩生成的二进制文件。还有其他的 Cargo 插件和工具,如 cargo-bloat,可以帮助你识别和减小二进制文件大小。
1210

1311
社区也有人总结了如何优化编译文件大小:[min-sized-rust](https://github.com/johnthagen/min-sized-rust)
1412

1513
其中也提供了一些优化配置:
14+
1615
```toml
1716
[package]
1817
name = "min-sized-rust"
@@ -31,4 +30,4 @@ strip = true # Automatically strip symbols from the binary.
3130
```
3231

3332
> [【Rust 漫画】揭开 Hello World 二进制文件巨大之谜
34-
](https://mp.weixin.qq.com/s/SsNzf9_8MyyP4oeHsZrauQ)
33+
> ](https://mp.weixin.qq.com/s/SsNzf9_8MyyP4oeHsZrauQ)

docs/notes/awesome rust.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,19 @@ Rust 生态系统由许多库和工具组成,可用于构建各种应用程序
2828

2929
## GUI
3030

31-
- [Slint](https://slint-ui.com/)
32-
Slint is a declarative(陈述) GUI toolkit to build native user interfaces for applications that are written in Rust, C++, or JavaScript.
31+
- [gpui](https://www.gpui.rs)
32+
A fast, productive UI framework for Rust from the creators of Zed.
3333

3434
- [Iced](https://iced.rs/)
3535
A cross-platform GUI library for Rust, inspired by Elm
3636

37+
- [Floem](https://github.com/lapce/floem)
38+
39+
- [Vizia](https://github.com/vizia/vizia)
40+
41+
- [Slint](https://slint-ui.com/)
42+
Slint is a declarative(陈述) GUI toolkit to build native user interfaces for applications that are written in Rust, C++, or JavaScript.
43+
3744
- [Xilem](https://github.com/linebender/xilem/)
3845
An experimental Rust native UI framework
3946

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@ver5/markdown-it-image": "^1.0.1",
1414
"@ver5/markdown-it-internal-link": "^1.0.0",
1515
"@ver5/vitepress-plugin-link-preview": "^1.0.0",
16-
"@ver5/vitepress-plugin-rust-playground": "^1.0.1",
16+
"@ver5/vitepress-plugin-rust-playground": "^1.0.2",
1717
"@ver5/vitepress-plugin-search": "^1.0.7",
1818
"@ver5/vitepress-plugin-sidebar": "^1.0.0",
1919
"@vueuse/core": "^10.1.2",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)