From 4c1ec24be84973e495391e62889c88971c83996b Mon Sep 17 00:00:00 2001 From: zhangshun <453905631@qq.com> Date: Mon, 1 Jun 2026 17:25:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=9C=AC=E5=9C=B0=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E9=A1=B5=E9=9D=A2=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 335 +++++++++++++++++++++++++++++++++++++++++ public/smart_test.html | 11 ++ scripts/serve.ps1 | 4 +- 3 files changed, 348 insertions(+), 2 deletions(-) create mode 100644 public/index.html create mode 100644 public/smart_test.html diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..a47bc3f --- /dev/null +++ b/public/index.html @@ -0,0 +1,335 @@ + + + + + + smart_wasm Local Debug + + + +
+
+

smart_wasm 本地调试页

+

这个页面直接加载 public/wasm/smart_math.js,可以在本地验证 WASM 初始化、命令调用和返回 JSON。

+
+ +
+
+
+

请求

+
WASM 未初始化
+
+
+ + + +
+ + + + +
+ +
+
1. 先点 初始化 WASM,会调用 _init_func()
+
2. 再点 发送请求,会调用 _func()
+
3. 默认地址使用 http://localhost:8080/
+
+
+
+ +
+
+

响应

+
等待操作
+
+
No output yet.
+
+
+
+ + + + + diff --git a/public/smart_test.html b/public/smart_test.html new file mode 100644 index 0000000..76e41b0 --- /dev/null +++ b/public/smart_test.html @@ -0,0 +1,11 @@ + + + + + + Redirecting + + +

Redirecting to index.html ...

+ + diff --git a/scripts/serve.ps1 b/scripts/serve.ps1 index 03cb809..41d849b 100644 --- a/scripts/serve.ps1 +++ b/scripts/serve.ps1 @@ -45,9 +45,9 @@ $publicDir = Resolve-Path "public" Write-Host "[ ] Starting dev server..." -ForegroundColor Cyan Write-Host "" Write-Host "Server info:" -ForegroundColor White -Write-Host " - URL: http://localhost:8080" -ForegroundColor Cyan +Write-Host " - URL: http://localhost:8080/index.html" -ForegroundColor Cyan Write-Host " - Root: $publicDir" -ForegroundColor Gray -Write-Host " - Home: /smart_test.html" -ForegroundColor Gray +Write-Host " - Home: /index.html" -ForegroundColor Gray Write-Host " - Stop: Ctrl+C" -ForegroundColor Yellow Write-Host ""