Skip to content

Commit 73eb5e8

Browse files
committed
Merge branch 'main' into before-packaging-command
2 parents f05087c + 1f47b46 commit 73eb5e8

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ data.*
44
.vscode
55
/dist
66
/wasmedge
7+
/WasmEdge*
78
.DS_Store

README.md

+47
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,53 @@ cd moxin
5454
cargo run
5555
```
5656

57+
## Windows (Windows 10 or higher)
58+
1. Download and install the LLVM v17.0.6 release for Windows: [Here is a direct link to LLVM-17.0.6-win64.exe](https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/LLVM-17.0.6-win64.exe), 333MB in size.
59+
> [!IMPORTANT]
60+
> During the setup procedure, make sure to select `Add LLVM to the system PATH for all users` or `for the current user`.
61+
2. Restart your PC, or log out and log back in, which allows the LLVM path to be properly
62+
* Alternatively you can add the LLVM path `C:\Program Files\LLVM\bin` to your system PATH.
63+
3. Download the [WasmEdge-0.14.0-windows.zip](https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-windows.zip) file from [the WasmEdge v0.14.0 release page](https://github.com/WasmEdge/WasmEdge/releases/tag/0.14.0),
64+
and then extract it into a directory of your choice.
65+
We recommend using your home directory (e.g., `C:\Users\<USERNAME>\`), represented by `$home` in powershell and `%homedrive%%homepath%` in batch-cmd.
66+
67+
Afterwards, you should see a directory called `WasmEdge-0.14.0-Windows` there.
68+
69+
To do this quickly in powershell:
70+
```powershell
71+
$ProgressPreference = 'SilentlyContinue' ## makes downloads much faster
72+
Invoke-WebRequest -Uri "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-windows.zip" -OutFile "WasmEdge-0.14.0-windows.zip"
73+
Expand-Archive -Force -LiteralPath "WasmEdge-0.14.0-windows.zip" -DestinationPath $home
74+
$ProgressPreference = 'Continue' ## restore default progress bars
75+
```
76+
77+
4. Download the WasmEdge WASI-NN plugin here: [WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64.zip](https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64.zip) (15.5MB) and extract it to the same directory as above, e.g., `C:\Users\<USERNAME>\WasmEdge-0.14.0-Windows`.
78+
> [!IMPORTANT]
79+
> You will be asked whether you want to replace the files that already exist; select `Replace the files in the destination` when doing so.
80+
81+
To do this quickly in powershell:
82+
```powershell
83+
$ProgressPreference = 'SilentlyContinue' ## makes downloads much faster
84+
Invoke-WebRequest -Uri "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64.zip" -OutFile "WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64.zip"
85+
Expand-Archive -Force -LiteralPath "WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64.zip" -DestinationPath "$home\WasmEdge-0.14.0-Windows"
86+
$ProgressPreference = 'Continue' ## restore default progress bars
87+
```
88+
89+
5. Set the `WASMEDGE_DIR` and `WASMEDGE_PLUGIN_PATH` environment variables to point to the `WasmEdge-0.14.0-Windows` directory that you extracted above, and then build Moxin.
90+
In powershell, you can do this like so:
91+
```powershell
92+
$env:WASMEDGE_DIR="$home\WasmEdge-0.14.0-Windows\"
93+
$env:WASMEDGE_PLUGIN_PATH="$home\WasmEdge-0.14.0-Windows\"
94+
cargo run
95+
```
96+
97+
In Windows `cmd`, you can do this like so:
98+
```batch
99+
set WASMEDGE_DIR=%homedrive%%homepath%\WasmEdge-0.14.0-Windows
100+
set WASMEDGE_PLUGIN_PATH=%homedrive%%homepath%\WasmEdge-0.14.0-Windows
101+
cargo run
102+
```
103+
57104
58105
## Packaging Moxin for Distribution
59106

src/chat/chat_line.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ live_design! {
110110
ChatLineBody = <View> {
111111
width: Fill,
112112
height: Fit,
113-
spacing: 12,
113+
spacing: 20,
114114
flow: Down,
115115

116116
sender_name_layout = <View> {

src/chat/chat_panel.rs

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ live_design! {
122122
main_section = {
123123
body_section = {
124124
bubble = {
125+
padding: {left: 0, bottom: 0, top: 0}
125126
markdown_message_container = {
126127
markdown_message = {
127128
draw_normal: {

0 commit comments

Comments
 (0)