V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
janxin
V2EX  ›  Rust

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

  •  
  •   janxin · Nov 27, 2017 · 4442 views
    This topic created in 3083 days ago, the information mentioned may be changed or developed.
    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 replies    2017-11-28 09:30:04 +08:00
    xwhxbg
        1
    xwhxbg  
       Nov 27, 2017
    没看懂,是说默认编译出来是 webassembly 么?就是说默认可以跑到浏览器上?
    janxin
        2
    janxin  
    OP
       Nov 27, 2017
    @xwhxbg 可以直接编译出来 WebAssembly,当然就可以跑在浏览器上了
    lrxiao
        3
    lrxiao  
       Nov 28, 2017
    好像直接可以写
    var rust = require('..')

    var xx = wasm`
    rust code here
    `
    xwhxbg
        4
    xwhxbg  
       Nov 28, 2017
    @janxin 看来明年可以期待一下 h5 的游戏了,rust 写 lib,js 开发脚本
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5470 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 05:53 · PVG 13:53 · LAX 22:53 · JFK 01:53
    ♥ Do have faith in what you're doing.