josephg opened issue #11759:
Right now if you try and build for iOS:
cmake -S crates/c-api -B target/c-api --install-prefix "$(pwd)/artifacts" -DWASMTIME_TARGET=aarch64-apple-ios -DWASMTIME_FEATURES="parallel-compilation,pooling-allocator,cranelift,demangle,profiling,coredump,addr2line,winch,pulley" cmake --build target/c-api cmake --install target/c-apiThe cmake install fails:
CMake Error at target/c-api/cmake_install.cmake:45 (file): file INSTALL cannot find "/Users/seph/3rdparty/wasmtime/crates/c-api/../../target/aarch64-apple-ios/release/libwasmtime.so": No such file or directory.The problem is this line in CMakeLists.txt:
if(WASMTIME_TARGET MATCHES "darwin") set(WASMTIME_SHARED_FILES libwasmtime.dylib) set(WASMTIME_STATIC_FILES libwasmtime.a) elseif(...)This case should also match for ios, and other apple targets. Changing it to this:
if(WASMTIME_TARGET MATCHES "apple")Fixes the problem.
alexcrichton commented on issue #11759:
Thanks for the report! Would you be up for sending a PR for this?
alexcrichton added the wasmtime:c-api label to Issue #11759.
alexcrichton added the wasmtime:platform-support label to Issue #11759.
josephg commented on issue #11759:
Sure thing:
alexcrichton closed issue #11759:
Right now if you try and build for iOS:
cmake -S crates/c-api -B target/c-api --install-prefix "$(pwd)/artifacts" -DWASMTIME_TARGET=aarch64-apple-ios -DWASMTIME_FEATURES="parallel-compilation,pooling-allocator,cranelift,demangle,profiling,coredump,addr2line,winch,pulley" cmake --build target/c-api cmake --install target/c-apiThe cmake install fails:
CMake Error at target/c-api/cmake_install.cmake:45 (file): file INSTALL cannot find "/Users/seph/3rdparty/wasmtime/crates/c-api/../../target/aarch64-apple-ios/release/libwasmtime.so": No such file or directory.The problem is this line in CMakeLists.txt:
if(WASMTIME_TARGET MATCHES "darwin") set(WASMTIME_SHARED_FILES libwasmtime.dylib) set(WASMTIME_STATIC_FILES libwasmtime.a) elseif(...)This case should also match for ios, and other apple targets. Changing it to this:
if(WASMTIME_TARGET MATCHES "apple")Fixes the problem.
Last updated: Dec 06 2025 at 07:03 UTC