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
If you'd like to use the wasm function instead of the host function, it would be useful if chisel could paste the code for $addmod256 from the second file into the first file, producing a wasm module like this:
Some thoughts about merging a function into a module:
Obviously, the type section, function section, and code section must all include everything needed.
Validation has some checks related to globals, tables, calls, and call_indirects.
Conventions may be used by the code. For example, LLVM can generate code which uses a shadow stack, so it may be difficult to merge with other wasm which does not follow the shadow-stack conventions.
Edit: I can prototype this in PyWebAssembly if it must be automated.
Suppose you have a wasm file like this:
Above, the
$addmod256
function is an imported host function. But suppose you also have a wasm implementation of that function:If you'd like to use the wasm function instead of the host function, it would be useful if chisel could paste the code for
$addmod256
from the second file into the first file, producing a wasm module like this:The text was updated successfully, but these errors were encountered: