使用 Emscripten 编译 WASM 版本的 OpenSSL
Apr 21, 2022
安装 Emscripten 工具链: git clone --depth 1 https://github.com/cntrump/emscripten-toolchain.git cd emscripten-toolchain ./install.sh /opt/local 添加 Emscripten 到 PATH 系统环境变量中: export PATH=/opt/local/emsdk/emscripten:$PATH 开始编译 OpenSSL: git clone --depth 1 -b OpenSSL_1_1_1n https://github.com/openssl/openssl.git cd openssl emconfigure ./Configure linux-generic64 --prefix=$(pwd)/../system sed -i'.bak' 's|^CROSS_COMPILE.*$|CROSS_COMPILE=|g' Makefile emmake make -j build_generated libssl.a libcrypto.a mkdir -p ../system/include mkdir…