janxin
V2EX  ›  Rust

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

  •  
  •   janxin · Nov 27, 2017 · 4867 views
    This topic created in 3266 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
    xwhxbg
    Nov 27, 2017
    1
    没看懂,是说默认编译出来是 webassembly 么?就是说默认可以跑到浏览器上?
    janxin
    janxin
    OP
    Nov 27, 2017
    2
    @xwhxbg 可以直接编译出来 WebAssembly,当然就可以跑在浏览器上了
    lrxiao
    lrxiao
    Nov 28, 2017
    3
    好像直接可以写
    var rust = require('..')

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