This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env lua | |
| --[[ | |
| ### The purpose of this script is to strip the Component-model and WASI requirements from a WASM module compiled | |
| ### with the experimental C# backend found here: https://github.com/dotnet/runtimelab/tree/feature/NativeAOT-LLVM/samples/NativeLibrary. | |
| It can output the WAT/WASM at any given stage of modification for debug purposes, but the primary use is | |
| simply `clip.lua input.wasm output.wasm`. `-v` to get status printed, `-h` for help, etc. | |
| It depends on the Penlight library as well as having `wasm-tools` in your path. `wasm-tools` could *likely* be | |
| replaced by something else, but that's the one I know :P |