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 ""