Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedisct1/wasmonkey
The WASMonkey magically turns exported WASM functions into imported functions.
https://github.com/jedisct1/wasmonkey
rust wasm
Last synced: about 2 months ago
JSON representation
The WASMonkey magically turns exported WASM functions into imported functions.
- Host: GitHub
- URL: https://github.com/jedisct1/wasmonkey
- Owner: jedisct1
- Created: 2018-05-16T14:14:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-20T05:00:51.000Z (over 1 year ago)
- Last Synced: 2024-10-05T04:32:37.849Z (2 months ago)
- Topics: rust, wasm
- Language: Rust
- Homepage:
- Size: 78.1 KB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-wasm-tools - repo
README
# WASMonkey
The WASMonkey patches a WASM object file to replace a set of exported
functions with imported functions from another library.## Usage
```text
USAGE:
wasmonkey [FLAGS] [OPTIONS] --input --outputFLAGS:
-n, --original-names Use the original name as a key in the builtins map
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-B, --builtins-additional ... Additional builtins function names to replace
-b, --builtins Path to the builtins library
-m, --builtins-map Path to the builtins map file
-i, --input Path to the input file
-o, --output Path to the output file
````builtins_file` is an object containing alternative implementations to
functions called in the wasm code.Symbols starting with a `builtin_` prefix will be used for substitution.
For example, a `memmove()` function defined as an external in the WASM
object will be replaced by calls to an imported `builtin_memmove()`
function, if `builtin_memmove()` is present in the builtins file.A JSON-encoded map of the performed substitutions can be optionally written
into `builtins_map_file`.