|
发表于 2022-2-20 22:15:02
|
显示全部楼层
这几天撸了个 wasm binary parser (410 + 180 sloc)
试扒 https://wasdk.github.io/wasmcodeexplorer/helloworld2.wasm
output:
- typesec
- [[(['i32'], []), ([], [])]]
- import_sec
- [[('sys', 'print', ('func', 0))]]
- funcsec
- [[1]]
- memsec
- [[(200, 200)]]
- exportsec
- [[('memory', ('mem', 0)), ('main', ('func', 1))]]
- codesec
- [[([], [(65, 0), (16, 0)])]]
- datasec
- [[(0, b'Hello, world\x00', (0, [(65, 0)]))]]
- startsec
- []
- datacountsec
- []
复制代码
Bugs 比我想像的少(一定是错觉;毕竟扒的不是足够复杂的 wasm |
|