You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have a roundabout way of initializing a WasmModel, where you have to pass the array of OutputVarId to initWasmModelAndBuffers. This adds to complexity in plugin-worker, where it has some special code to inject the outputVarIds into the generated worker.
If we instead change plugin-wasm to include the outputVarIds inside the generated wasm-model.js file (created by Emscripten), we can simplify the process of initializing a WasmModel.
Emscripten has a --pre-js argument that allows for injecting arbitrary code into the generated module, which we can use for this purpose.
This will be a simple change to plugin-wasm only for now; the generated module will continue to be compatible with the existing initialization process, but doing this change first will allow for further simplification in an upcoming PR.
The text was updated successfully, but these errors were encountered:
Currently we have a roundabout way of initializing a
WasmModel
, where you have to pass the array ofOutputVarId
toinitWasmModelAndBuffers
. This adds to complexity in plugin-worker, where it has some special code to inject theoutputVarIds
into the generated worker.If we instead change plugin-wasm to include the
outputVarIds
inside the generatedwasm-model.js
file (created by Emscripten), we can simplify the process of initializing aWasmModel
.Emscripten has a
--pre-js
argument that allows for injecting arbitrary code into the generated module, which we can use for this purpose.This will be a simple change to plugin-wasm only for now; the generated module will continue to be compatible with the existing initialization process, but doing this change first will allow for further simplification in an upcoming PR.
The text was updated successfully, but these errors were encountered: