Status in WebAssembly MVP in browsers

https://webassembly.imtqy.com/demo/ says: "Execution semantics are fully implemented." sounds like MVP, but what exactly is missing or am I doing something wrong?

WAST:

(module
    (memory 1)

    (export "growMemory" $growMemory)
    (func $growMemory (param $0 i32) (result i32) (grow_memory (get_local $0)))

    (export "getMemorySize" $getMemorySize)
    (func $getMemorySize (result i32) (memory_size))
)

JS code:

var xhr = new XMLHttpRequest();
xhr.open('GET', 'build/test.wasm', true);
xhr.responseType = 'arraybuffer';
xhr.onload = function() {
    var module = Wasm.instantiateModule(new Uint8Array(xhr.response));
    console.log(module.exports.getMemorySize());
    console.log(module.exports.growMemory(1));
    console.log(module.exports.getMemorySize());
};
xhr.send(null);

Chrome Canary loads the WASM file, but grow_memory doesn't seem to be implemented:

65536
0
65536

And Firefox Nightly fails to load:

TypeError: wasm validation error at offset 124: bad expression code

Also the page size seems to be 0x10000 instead of 0x1000. But I can not find it in the design or specification.

+4
source share
1 answer

March 2017 update:

WebAssembly MVP reached consensus :

CG WebAssembly, , Chrome, Edge, Firefox, WebKit , (MVP) API WebAssembly , . , WebAssembly . , .

JavaScript API . WebAssembly Emscripten, MDN.

, W3C, WebAssembly, . WebAssembly GitHub.

webassembly.org , MVP:

WebAssembly :


2016 :

, . webassembly.org:

WebAssembly (MVP) JavaScript API, . CG . CG , 2017 , . , CG WebAssembly, .

, WebAssembly , , , . .

. , Feedback .


:

+ , MVP.

-, , . , , , , , MVP . , , .

, API, Wasm JavaScript, Wasm. , , .

: , , . .

, design spec.

grow_memory Chrome. .

+4

All Articles