Rust nightly 版本已经默认启用 WebAssembly 后端

2017-11-27 09:43:56 +08:00
 janxin
Yesterday the Pull Request 46115: "rustbuild: Enable WebAssembly backend by default" was merged into Rust master. With the Nightly build from that night, the wasm32-unknown-unknown target is natively available.

https://www.hellorust.com/news/native-wasm-target.html
3820 次点击
所在节点    Rust
4 条回复
xwhxbg
2017-11-27 10:56:16 +08:00
没看懂,是说默认编译出来是 webassembly 么?就是说默认可以跑到浏览器上?
janxin
2017-11-27 13:53:24 +08:00
@xwhxbg 可以直接编译出来 WebAssembly,当然就可以跑在浏览器上了
lrxiao
2017-11-28 04:10:36 +08:00
好像直接可以写
var rust = require('..')

var xx = wasm`
rust code here
`
xwhxbg
2017-11-28 09:30:04 +08:00
@janxin 看来明年可以期待一下 h5 的游戏了,rust 写 lib,js 开发脚本

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/409795

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX