Skip to content

Commit f845138

Browse files
committed
update
1 parent edc6ef3 commit f845138

File tree

9 files changed

+254
-4
lines changed

9 files changed

+254
-4
lines changed

content/en/docs/guides/build.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
slug: "build"
3+
title: "Build from Source"
4+
description: ""
5+
summary: ""
6+
date: 2025-10-01T11:44:51+08:00
7+
draft: false
8+
weight: 103
9+
toc: true
10+
seo:
11+
title: "" # custom title (optional)
12+
description: "" # custom description (recommended)
13+
canonical: "" # custom canonical URL (optional)
14+
noindex: false # false (default) or true
15+
---
16+
0. Prerequisites:
17+
18+
- Zig version 0.15.1 is required
19+
- Git is required
20+
- pkg-config is required
21+
22+
1. Clone the project to your local machine:
23+
24+
```bash
25+
git clone https://github.com/MikaShell/mika-shell.git
26+
```
27+
28+
2. Enter the project directory:
29+
30+
```bash
31+
cd mika-shell
32+
```
33+
34+
3. Install dependencies:
35+
36+
Please refer to [build ci](https://github.com/MikaShell/mika-shell/blob/b916ab3af1194782b61ee7c34c14438048f0264a/.github/workflows/build.yaml#L16) to install the required libraries on your system.
37+
38+
4. Start building:
39+
40+
```bash
41+
zig build # Build in Debug mode by default
42+
# or
43+
zig build --release-fast # Build in ReleaseFast mode
44+
```
45+
46+
After running the above commands, the executable will be installed into the `./zig-out/bin` directory.
47+
48+
If you encounter the error
49+
`error: unable to discover remote git server capabilities: HttpConnectionClosing`,
50+
this may indicate that your network environment cannot fetch the dependencies. Unfortunately, the current version of Zig does not support using the system network proxy ([#15048](https://github.com/ziglang/zig/issues/15048)).
51+
52+
Until Zig provides official support, in order to use a network proxy, you can follow the workaround mentioned in the issue: download the [zigcli](https://github.com/jiacai2050/zigcli/releases) tool, extract it, locate the `zigfetch` binary, and place it in the project directory. Then run:
53+
54+
```bash
55+
chmod +x ./zigfetch
56+
./zigfetch .
57+
```
58+
59+
to fetch the dependencies, and afterwards re-run:
60+
61+
```bash
62+
zig build install
63+
```

content/en/docs/guides/debug.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
slug: "debug"
3+
title: "Debugging"
4+
description: ""
5+
summary: ""
6+
date: 2025-10-01T13:10:56+08:00
7+
draft: false
8+
weight: 106
9+
toc: true
10+
seo:
11+
title: "" # custom title (optional)
12+
description: "" # custom description (recommended)
13+
canonical: "" # custom canonical URL (optional)
14+
noindex: false # false (default) or true
15+
---
16+
Before starting the debugging steps, please make sure the project has been built successfully.
17+
18+
The following describes how to debug using VSCode.
19+
20+
1. Install the **lldb** command
21+
2. Edit `task.json`:
22+
23+
```json
24+
{
25+
"version": "2.0.0",
26+
"tasks": [
27+
{
28+
"label": "build",
29+
"type": "shell",
30+
"command": "zig build",
31+
"problemMatcher": [],
32+
"group": {
33+
"kind": "build",
34+
"isDefault": true
35+
}
36+
}
37+
]
38+
}
39+
```
40+
41+
3. Edit `launch.json`:
42+
43+
```json
44+
{
45+
"version": "0.2.0",
46+
"configurations": [
47+
{
48+
"name": "Debug Launch",
49+
"type": "lldb",
50+
"request": "launch",
51+
"program": "${workspaceFolder}/zig-out/bin/mika-shell",
52+
"args": ["daemon"],
53+
"cwd": "${workspaceFolder}",
54+
"preLaunchTask": "build",
55+
"initCommands": ["process handle -p true -s false -n false SIGUSR1"]
56+
}
57+
]
58+
}
59+
```
60+
61+
After completing the above steps, open the Debug panel in VSCode, select **Debug Launch**, and start debugging.

content/en/docs/guides/other-dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: ""
55
summary: ""
66
date: 2025-09-27T17:22:58+08:00
77
draft: false
8-
weight: 103
8+
weight: 104
99
toc: true
1010
seo:
1111
title: "" # custom title (optional)

content/en/docs/guides/use.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: ""
55
summary: ""
66
date: 2025-09-27T20:11:40+08:00
77
draft: false
8-
weight: 104
8+
weight: 105
99
toc: true
1010
seo:
1111
title: "" # custom title (optional)

content/zh-cn/docs/guides/build.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
slug: "build"
3+
title: "从源代码构建"
4+
description: ""
5+
summary: ""
6+
date: 2025-10-01T11:44:51+08:00
7+
draft: false
8+
weight: 103
9+
toc: true
10+
seo:
11+
title: "" # custom title (optional)
12+
description: "" # custom description (recommended)
13+
canonical: "" # custom canonical URL (optional)
14+
noindex: false # false (default) or true
15+
---
16+
0. 前提条件:
17+
18+
- 需要安装 Zig 0.15.1 版本
19+
- 需要安装 Git
20+
- 需要安装 pkg-config
21+
22+
1. 克隆项目到本地:
23+
24+
```bash
25+
git clone https://github.com/MikaShell/mika-shell.git
26+
```
27+
28+
2. 进入项目目录:
29+
30+
```bash
31+
cd mika-shell
32+
```
33+
34+
3. 安装依赖:
35+
36+
请参考 [构建ci](https://github.com/MikaShell/mika-shell/blob/b916ab3af1194782b61ee7c34c14438048f0264a/.github/workflows/build.yaml#L16) 在系统上安装依赖库。
37+
38+
4. 开始构建:
39+
40+
```bash
41+
zig build # 默认以 Debug 模式构建
42+
# 或者
43+
zig build --release-fast # 以 ReleaseFast 模式构建
44+
```
45+
46+
执行上述命令后,会将可执行文件安装到 `./zig-out/bin` 目录中。
47+
48+
如果构建命令出现 `rror: unable to discover remote git server capabilities: HttpConnectionClosing` 错误,这可能意味着你所在的网络环境无法获取依赖。遗憾的是目前版本的 zig 没法使用系统上的网络代理([#15048](https://github.com/ziglang/zig/issues/15048))。
49+
50+
在 zig 提供支持之前,为了使用网络代理,按照上述 issue 提供的解决方案,可以下载 [zigcli](https://github.com/jiacai2050/zigcli/releases) 工具,解压后找到 `zigfetch` 并将其放到项目目录下。执行:
51+
52+
```bash
53+
chmod +x ./zigfetch
54+
./zigfetch .
55+
```
56+
57+
命令来获取依赖,之后重新执行:
58+
59+
```bash
60+
zig build install
61+
```

content/zh-cn/docs/guides/debug.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
slug: "debug"
3+
title: "调试"
4+
description: ""
5+
summary: ""
6+
date: 2025-10-01T13:10:56+08:00
7+
draft: false
8+
weight: 106
9+
toc: true
10+
seo:
11+
title: "" # custom title (optional)
12+
description: "" # custom description (recommended)
13+
canonical: "" # custom canonical URL (optional)
14+
noindex: false # false (default) or true
15+
---
16+
在开始调试步骤之前,请先完成构建工作。
17+
18+
接下来介绍如何使用 VSCode 进行调试。
19+
20+
1. 安装 **lldb** 命令
21+
2. 编辑 `task.json`
22+
23+
```json
24+
{
25+
"version": "2.0.0",
26+
"tasks": [
27+
{
28+
"label": "build",
29+
"type": "shell",
30+
"command": "zig build",
31+
"problemMatcher": [],
32+
"group": {
33+
"kind": "build",
34+
"isDefault": true
35+
}
36+
}
37+
]
38+
}
39+
```
40+
41+
3. 编辑 `launch.json`
42+
43+
```json
44+
{
45+
"version": "0.2.0",
46+
"configurations": [
47+
{
48+
"name": "Debug Launch",
49+
"type": "lldb",
50+
"request": "launch",
51+
"program": "${workspaceFolder}/zig-out/bin/mika-shell",
52+
"args": ["daemon"],
53+
"cwd": "${workspaceFolder}",
54+
"preLaunchTask": "build",
55+
"initCommands": ["process handle -p true -s false -n false SIGUSR1"]
56+
}
57+
]
58+
}
59+
```
60+
61+
完成上述步骤后,在 VSCode 中的调试面板中,选择 **Debug Launch** 进行调试。

content/zh-cn/docs/guides/other-dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: ""
55
summary: ""
66
date: 2025-09-27T17:22:58+08:00
77
draft: false
8-
weight: 103
8+
weight: 104
99
toc: true
1010
seo:
1111
title: "" # custom title (optional)

content/zh-cn/docs/guides/use.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: ""
55
summary: ""
66
date: 2025-09-27T20:11:40+08:00
77
draft: false
8-
weight: 104
8+
weight: 105
99
toc: true
1010
seo:
1111
title: "" # custom title (optional)

hugo_stats.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@
196196
"mt-n3",
197197
"mx-2",
198198
"mx-auto",
199+
"mx-xl-auto",
199200
"my-3",
200201
"nav",
201202
"nav-item",
@@ -262,12 +263,15 @@
262263
"title",
263264
"title-submitted",
264265
"toc-mobile",
266+
"untranslated",
265267
"visually-hidden",
266268
"w-100",
267269
"wrap"
268270
],
269271
"ids": [
270272
"TableOfContents",
273+
"ai-documentation",
274+
"ai-文档",
271275
"alias",
272276
"announcement",
273277
"buttonColorMode",

0 commit comments

Comments
 (0)