Bug
ic-rusqlite 0.4.3 fails to link with Rust 1.91.0 (released 2025-10-28). Both the precompiled and compile_sqlite features are affected.
Error (with precompiled feature):
rust-lld: error: import module mismatch for symbol: time
>>> defined as env in libsqlite3.a(sqlite3.o)
>>> defined as ic0 in libic_cdk-...rlib
Error (with compile_sqlite feature): same import module mismatch.
Root cause
Rust 1.91.0's wasm-ld added strict enforcement of WASM module-qualified import consistency. SQLite calls time() from C — when compiled for wasm32-wasip1 this becomes a WASM import from module env. ic-cdk 0.18 imports time from module ic0. When both appear in the same link step, wasm-ld 1.91.0 rejects them as conflicting import module declarations for the same symbol.
Rust 1.90.0 was lenient about this mismatch and let it through. Rust 1.91.0 made it a hard error.
Versions
- ic-rusqlite: 0.4.3
- ic-cdk: 0.18.7 (via ic-rusqlite)
- target: wasm32-wasip1
- Rust 1.90.0 (2025-09-14): works
- Rust 1.91.0 (2025-10-28): broken
- Rust 1.91.0 is the current stable as of 2026-04.
Workaround (for consumers)
Pin Rust to 1.90.0 via rust-toolchain.toml:
[toolchain]
channel = "1.90.0"
targets = ["wasm32-wasip1"]
Recommended fix
ic-rusqlite needs to ensure that time is not a naked WASM import from module env in the final binary. Options:
- Provide a
time shim in Rust that SQLite's env::time import resolves to at link time, so it never appears as an unresolved WASM import.
- Rebuild
libsqlite3.a in a way that avoids the direct env::time import (e.g. link against a polyfill that resolves it before the .a is archived).
- Add CI that builds against the latest stable Rust — this would have caught the regression when 1.91.0 shipped in October 2025.
Bug
ic-rusqlite 0.4.3 fails to link with Rust 1.91.0 (released 2025-10-28). Both the
precompiledandcompile_sqlitefeatures are affected.Error (with
precompiledfeature):Error (with
compile_sqlitefeature): same import module mismatch.Root cause
Rust 1.91.0's wasm-ld added strict enforcement of WASM module-qualified import consistency. SQLite calls
time()from C — when compiled forwasm32-wasip1this becomes a WASM import from moduleenv. ic-cdk 0.18 importstimefrom moduleic0. When both appear in the same link step, wasm-ld 1.91.0 rejects them as conflicting import module declarations for the same symbol.Rust 1.90.0 was lenient about this mismatch and let it through. Rust 1.91.0 made it a hard error.
Versions
Workaround (for consumers)
Pin Rust to 1.90.0 via
rust-toolchain.toml:Recommended fix
ic-rusqlite needs to ensure that
timeis not a naked WASM import from moduleenvin the final binary. Options:timeshim in Rust that SQLite'senv::timeimport resolves to at link time, so it never appears as an unresolved WASM import.libsqlite3.ain a way that avoids the directenv::timeimport (e.g. link against a polyfill that resolves it before the.ais archived).