small writeup of wasm

This commit is contained in:
lizzie 2026-06-09 05:14:36 +00:00
parent 0e05587de3
commit a0b3057996
5 changed files with 40 additions and 10 deletions

View file

@ -1,5 +1,5 @@
diff --git a/cmake/ConfigureOpenSSL.cmake b/cmake/ConfigureOpenSSL.cmake
index 3012e05..eda6cfb 100644
index 3012e05..2ae23ff 100644
--- a/cmake/ConfigureOpenSSL.cmake
+++ b/cmake/ConfigureOpenSSL.cmake
@@ -108,7 +108,8 @@ function(configure_openssl)
@ -31,7 +31,7 @@ index 3012e05..eda6cfb 100644
+ COMMAND ${EMSCRIPTEN_CMAKE_WRAPPER} ${CMAKE_COMMAND} -E env
"CFLAGS=${CMAKE_C_FLAGS}"
"CXXFLAGS=${CMAKE_CXX_FLAGS}"
+ "LDFLAGS=${CMAKE_CXX_LINKER_FLAGS}"
+ "LDFLAGS=${CMAKE_CXX_LINK_FLAGS}"
+ "CC=${CMAKE_C_COMPILER}"
+ "CXX=${CMAKE_CXX_COMPILER}"
+ "LD=${EMSCRIPTEN_LINKER}"

View file

@ -1,5 +1,5 @@
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index e62721e..6fcea0d 100644
index e62721e..243feb4 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1970,6 +1970,26 @@ my %targets = (
@ -10,8 +10,8 @@ index e62721e..6fcea0d 100644
+ inherit_from => [ "BASE_unix" ],
+ CC => "emcc",
+ CXX => "emc++",
+ cflags => add("--target=wasm32-unknown-emscripten"),
+ cxxflags => add("--target=wasm32-unknown-emscripten"),
+ cflags => combine("--target=wasm32-unknown-emscripten", threads("-pthread")),
+ cxxflags => combine("--target=wasm32-unknown-emscripten", threads("-pthread")),
+ lib_cppflags => add("-DL_ENDIAN"),
+ bn_ops => "THIRTY_TWO_BIT",
+ },
@ -19,8 +19,8 @@ index e62721e..6fcea0d 100644
+ inherit_from => [ "BASE_unix" ],
+ CC => "emcc",
+ CXX => "emc++",
+ cflags => add("--target=wasm64-unknown-emscripten"),
+ cxxflags => add("--target=wasm64-unknown-emscripten"),
+ cflags => combine("--target=wasm64-unknown-emscripten", threads("-pthread")),
+ cxxflags => combine("--target=wasm64-unknown-emscripten", threads("-pthread")),
+ lib_cppflags => add("-DL_ENDIAN"),
+ bn_ops => "SIXTY_FOUR_BIT_LONG",
+ },