因为某个需求, 需要在 Windows 上安装一下 wabt
下载源码
1 2
| git clone --recursive https://github.com/WebAssembly/wabt WebAssembly/wabt cd WebAssembly/wabt;
|
使用 CMake 编译并安装
参考官方指南,
1 2 3 4 5 6 7 8 9 10 11
| mkdir build && cd build;
cmake .. -DCMAKE_INSTALL_PREFIX="${USERPROFILE}\bin\wabt"
cmake --build . --config Release
cmake --build . --config Release --target install
|
最后 wabt
就被安到了 %USERPROFILE%/bin/wabt/
目录下,
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| drwxr-xr-x 1 richa 197609 0 9月 26 00:59 ./ drwxr-xr-x 1 richa 197609 0 9月 26 00:59 ../ -rwxr-xr-x 1 richa 197609 1193472 9月 26 00:35 spectest-interp.exe* -rwxr-xr-x 1 richa 197609 838144 9月 26 00:38 wasm2c.exe* -rwxr-xr-x 1 richa 197609 818176 9月 26 00:38 wasm2wat.exe* -rwxr-xr-x 1 richa 197609 842240 9月 26 00:38 wasm-decompile.exe* -rwxr-xr-x 1 richa 197609 851456 9月 26 00:38 wasm-interp.exe* -rwxr-xr-x 1 richa 197609 574976 9月 26 00:38 wasm-objdump.exe* -rwxr-xr-x 1 richa 197609 565248 9月 26 00:38 wasm-opcodecnt.exe* -rwxr-xr-x 1 richa 197609 530432 9月 26 00:38 wasm-strip.exe* -rwxr-xr-x 1 richa 197609 744448 9月 26 00:38 wasm-validate.exe* -rwxr-xr-x 1 richa 197609 1012736 9月 26 00:38 wast2json.exe* -rwxr-xr-x 1 richa 197609 979456 9月 26 00:38 wat2wasm.exe* -rwxr-xr-x 1 richa 197609 935424 9月 26 00:38 wat-desugar.exe*
|