wasm-chisel icon indicating copy to clipboard operation
wasm-chisel copied to clipboard

Translator which replaces known imports with snippets

Open axic opened this issue 6 years ago • 2 comments

From: https://github.com/ewasm/ewasm-cleanup#libc-methods

Goal is to have a translator which takes a wasm module (called the "helper") and a list of imports. The current module is searched for the list of imports. If found, the import is removed and the function from the helper is copied in.

The first two to start with:

  • memcpy(i32, i32, i32) -> i32 from https://github.com/ewasm/ewasm-cleanup/blob/master/memcpy.wast
  • memset(i32, i32, i32) from https://github.com/ewasm/ewasm-cleanup/blob/master/memset.wast

axic avatar Dec 06 '18 21:12 axic

Fastly has a similar tool: https://github.com/fastly/lucet/tree/master/lucet-builtins/wasmonkey

axic avatar Sep 10 '19 20:09 axic

This tool is now independent: https://github.com/jedisct1/wasmonkey

axic avatar Jan 11 '21 04:01 axic