Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wa-lang
wa
提交
cd146ef2
wa
项目概览
wa-lang
/
wa
大约 1 年 前同步成功
通知
68
Star
655
Fork
45
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
wa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cd146ef2
编写于
10月 12, 2022
作者:
3
3dgen
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/wa-lang/wa
上级
64aa4f12
0784b959
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
2 deletion
+17
-2
api/api_nowasm_test.go
api/api_nowasm_test.go
+4
-2
changelog.md
changelog.md
+7
-0
internal/app/apputil/wabt_wat2wasm.go
internal/app/apputil/wabt_wat2wasm.go
+6
-0
未找到文件。
api/api_nowasm_test.go
浏览文件 @
cd146ef2
...
...
@@ -11,8 +11,10 @@ import (
func
ExampleRunCode
()
{
const
code
=
`
var gBase: i32 = 1000
fn main() {
println(add(40, 2))
println(add(40, 2)
+ gBase
)
}
fn add(a: i32, b: i32) => i32 {
...
...
@@ -28,5 +30,5 @@ func ExampleRunCode() {
fmt
.
Print
(
string
(
output
))
// Output:
// 42
//
10
42
}
changelog.md
浏览文件 @
cd146ef2
# 版本日志
-
v0.2.2 (2022-10-11)
-
Windows 增加 exe 图标
-
Windows 平台增加 Notepad++ 语法高亮支持
-
Playground 改进异步加载wasm资源, 支持多个例子
-
Wat 后端改善全局变量支持
-
增加
`#wa:xxx`
模式注释, 支持通过凹语言实现底层的 runtime 函数
-
实验特性: 简化无参数和返回值函数定义
-
v0.2.1 (2022-09-16)
-
支持纯浏览器编译执行:
[
https://wa-lang.org/playground
](
https://wa-lang.org/playground
)
-
命令行增加打印 logo 子命令
...
...
internal/app/apputil/wabt_wat2wasm.go
浏览文件 @
cd146ef2
...
...
@@ -11,6 +11,7 @@ import (
"path/filepath"
"runtime"
"strings"
"sync"
"github.com/tetratelabs/wazero"
"github.com/tetratelabs/wazero/api"
...
...
@@ -97,7 +98,12 @@ func InstallWat2wasm(path string) error {
return
nil
}
var
muRunWat2Wasm
sync
.
Mutex
func
RunWat2Wasm
(
args
...
string
)
(
stdoutStderr
[]
byte
,
err
error
)
{
muRunWat2Wasm
.
Lock
()
defer
muRunWat2Wasm
.
Unlock
()
if
wat2wasmPath
==
""
{
logger
.
Tracef
(
&
config
.
EnableTrace_app
,
"wat2wasm not found"
)
return
nil
,
errors
.
New
(
"wat2wasm not found"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录