Skip to content

emscripten_create_worker with -s WASM=1 #5005

@noct

Description

@noct

Using sdk-incoming-64bit, binaryen-master-64bit as per http://webassembly.org/getting-started/developers-guide/.

Calling emscripten_create_worker("wasm_worker.js") consistently fails due to Module['wasmBinary'] not being set.

As a temporary workaround I've created the following stub:

// wasm_worker_loader.js
var xhr = new XMLHttpRequest();
xhr.open('GET', 'wasm_worker.wasm', false);
xhr.responseType = 'arraybuffer';
xhr.send(null);
var Module = {'wasmBinary': xhr.response};
importScripts('wasm_worker.js');

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions