V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
janxin
V2EX  ›  Rust

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

  •  
  •   janxin · 2017-11-27 09:43:56 +08:00 · 3797 次点击
    这是一个创建于 2314 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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
    4 条回复    2017-11-28 09:30:04 +08:00
    xwhxbg
        1
    xwhxbg  
       2017-11-27 10:56:16 +08:00
    没看懂,是说默认编译出来是 webassembly 么?就是说默认可以跑到浏览器上?
    janxin
        2
    janxin  
    OP
       2017-11-27 13:53:24 +08:00
    @xwhxbg 可以直接编译出来 WebAssembly,当然就可以跑在浏览器上了
    lrxiao
        3
    lrxiao  
       2017-11-28 04:10:36 +08:00
    好像直接可以写
    var rust = require('..')

    var xx = wasm`
    rust code here
    `
    xwhxbg
        4
    xwhxbg  
       2017-11-28 09:30:04 +08:00
    @janxin 看来明年可以期待一下 h5 的游戏了,rust 写 lib,js 开发脚本
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2656 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 15:19 · PVG 23:19 · LAX 08:19 · JFK 11:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.