Skip to content

feat: enable WASM compilation for walletkit#253

Open
Dzejkop wants to merge 33 commits intomainfrom
feat/drop-storage-feature
Open

feat: enable WASM compilation for walletkit#253
Dzejkop wants to merge 33 commits intomainfrom
feat/drop-storage-feature

Conversation

@Dzejkop
Copy link
Copy Markdown
Contributor

@Dzejkop Dzejkop commented Feb 26, 2026

Summary

Enables wasm32-unknown-unknown compilation for both walletkit-core and walletkit crates. This is the foundation for running World ID authentication flows in the browser.

What works on WASM

  • Full crate compilation (cargo check --target wasm32-unknown-unknown)
  • Authenticator::init (with no-op connector + registry = None)
  • generate_nullifier / generate_credential_blinding_factor (via gloo-net WebSocket OPRF transport)
  • generate_single_proof (pure local ZK proof generation)
  • All getters, credential storage (SQLite via sqlite-wasm-rs)

What's native-only (correctly gated)

  • Groth16Materials::from_cache (filesystem-based, uses std::fs)
  • generate_proof (uses SystemTime::now(), fetch_inclusion_proof_with_cache)
  • uniffi scaffolding (requires Send, not available on WASM)
  • ctor init, rustls TLS config, reqwest[brotli,rustls-tls]

Changes

Commit 1: walletkit-db WASM FFI fixes

Fixes sqlite-wasm-rs FFI compatibility + CI WASM compile check.

Commit 2: Remove storage feature flag

Unifies the storage code path — the SQLite credential store is always compiled in.

Commit 3: Introduce Groth16Materials wrapper

Decouples filesystem-dependent Groth16 material loading from the Authenticator constructor. Opaque wrapper with from_cache (native) and from_embedded (all platforms) constructors.

Commit 4: Enable WASM compilation

  • Gate uniffi:: derives/attributes with cfg_attr(not(wasm32), ...) across ~17 source files
  • Move ctor, reqwest[rustls-tls,brotli], rustls to native-only deps
  • Gate groth16_cache, generate_proof, fetch_inclusion_proof_with_cache for non-WASM
  • Gate is_connect() check in http_request.rs (requires hyper)

Upstream Dependencies

This PR uses [patch.crates-io] git refs pointing to WASM-compat branches in upstream repos. These patches will be removed once the upstream PRs are merged and released:

Verification

  • cargo check -p walletkit-core --target wasm32-unknown-unknown
  • cargo check -p walletkit --target wasm32-unknown-unknown
  • cargo check (native)
  • cargo test -p walletkit-core --lib — 76/76 passed

@Dzejkop
Copy link
Copy Markdown
Contributor Author

Dzejkop commented Feb 26, 2026

WASM CI check status

I investigated expanding the CI WASM check from walletkit-db to the full walletkit-core/walletkit crate.

Blocker: upstream transitive dependencies

walletkit-core cannot compile for wasm32-unknown-unknown yet because several upstream crates unconditionally pull reqwest with rustls-tls, which activates hypertokio(net)mio. mio does not support wasm32-unknown-unknown.

The offending dependency chain:

world-id-core → world-id-authenticator → taceo-oprf → alloy → reqwest[rustls-tls]
  → hyper → tokio[net] → mio  ← fails on wasm32

Cargo's feature unification means even though walletkit-core can request reqwest with only json, the upstream crates activate rustls-tls globally.

What's needed

The upstream crates (world-id-core, world-id-authenticator, taceo-oprf) need to make their reqwest TLS features platform-conditional:

# In upstream Cargo.toml:
reqwest = { version = "0.12", default-features = false, features = ["json"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }

Once upstream makes that change, walletkit-core will compile for WASM. All the changes in this PR (removing storage feature, Groth16Materials wrapper, groth16_cache gating) already prepare the crate for that.

Current CI scope

For now, CI can check:

  • walletkit-db — full WASM compile (already in PR Fix/walletkit db wasm ffi #251)
  • walletkit-core — blocked by upstream
  • walletkit — blocked by upstream

The CI workflow changes from #251 couldn't be pushed due to token scope limitations (workflow scope required).

@Dzejkop Dzejkop force-pushed the feat/drop-storage-feature branch from e49f23e to 693a285 Compare February 27, 2026 14:14
@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 27, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: cargo taceo-oprf-client is 98.0% likely obfuscated

Confidence: 0.98

Location: Package overview

From: ?cargo/taceo-oprf@0.7.1cargo/taceo-oprf-client@0.8.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/taceo-oprf-client@0.8.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: cargo unicode-ident under Unicode-3.0

License: Unicode-3.0 - the applicable license policy does not allow this license (4) (unicode-ident-1.0.24/Cargo.toml)

License: Unicode-3.0 - the applicable license policy does not allow this license (4) (unicode-ident-1.0.24/Cargo.toml)

License: Unicode-3.0 - the applicable license policy does not allow this license (4) (unicode-ident-1.0.24/LICENSE-UNICODE)

From: ?cargo/tracing@0.1.44cargo/reqwest@0.12.28cargo/ruint@1.17.2cargo/serde_json@1.0.149cargo/uniffi@0.31.0cargo/sqlite-wasm-rs@0.5.2cargo/thiserror@2.0.18cargo/mockito@1.7.2cargo/alloy@1.7.3cargo/alloy-primitives@1.5.7cargo/alloy-core@1.5.7cargo/chrono@0.4.44cargo/rustls@0.23.37cargo/tokio@1.50.0cargo/taceo-oprf@0.7.1cargo/uuid@1.22.0cargo/tempfile@3.27.0cargo/cc@1.2.57cargo/taceo-oprf@0.8.0cargo/world-id-core@0.6.0cargo/semaphore-rs@0.5.3cargo/zip@2.4.2cargo/sha2@0.10.9cargo/rand@0.8.5cargo/ciborium@0.2.2cargo/hkdf@0.12.4cargo/ctor@0.2.9cargo/strum@0.27.2cargo/chacha20poly1305@0.10.1cargo/serde@1.0.228cargo/zeroize@1.8.2cargo/backon@1.6.0cargo/unicode-ident@1.0.24

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/unicode-ident@1.0.24. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@Dzejkop Dzejkop changed the title refactor(walletkit-core): remove storage feature flag feat: enable WASM compilation for walletkit Feb 27, 2026
@Dzejkop Dzejkop changed the base branch from fix/walletkit-db-wasm-ffi to main February 27, 2026 14:14
@paolodamico paolodamico mentioned this pull request Mar 3, 2026
@Dzejkop Dzejkop force-pushed the feat/drop-storage-feature branch from a4bc092 to c4f5401 Compare March 13, 2026 20:02
///
/// Returns an error if the embedded material cannot be loaded or verified.
#[uniffi::constructor]
pub fn from_embedded() -> Result<Self, WalletKitError> {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/otto let's feature gate this - make sure to also feature gate the embed-zkeys feature on world-id crates

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On it — I'll gate Groth16Materials + from_embedded behind an embed-zkeys feature flag, and ensure the embed-zkeys feature on the world-id crates is only activated when that feature is enabled in walletkit/walletkit-core.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/otto the function should also be feature gated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/otto ignore - it actually is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On it — adding #[cfg(feature = "embed-zkeys")] directly on the function as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, no action needed then.

@Dzejkop
Copy link
Copy Markdown
Contributor Author

Dzejkop commented Mar 17, 2026

/otto rebase against main, resolve any conflicts and resolve CI issues

@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 17, 2026

On it — spawning a job to rebase against main, resolve conflicts, add the embed-zkeys feature gate for Groth16Materials (including the world-id crate feature), and fix any CI issues. Will report back when done.

@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 17, 2026

embed-zkeys feature gating — done ✅

Here's what was changed:

walletkit-core/Cargo.toml

  • Removed embed-zkeys / zstd-compress-zkeys from the unconditional world-id-core feature list
  • Added embed-zkeys = ["world-id-core/embed-zkeys", "world-id-core/zstd-compress-zkeys"] as an explicit feature
  • Added required-features = ["embed-zkeys"] to the two integration tests that call from_embedded
  • Added embed-zkeys to the docs.rs features list

walletkit/Cargo.toml

  • Added embed-zkeys = ["walletkit-core/embed-zkeys"] propagation feature

authenticator/mod.rs

  • Split the single #[uniffi::export] impl Groth16Materials into two separate impl blocks:
    • #[cfg(feature = "embed-zkeys")]from_embedded
    • #[cfg(not(wasm32))]from_cache
  • Gated the test module accordingly

storage/mod.rs

  • Gated groth16_cache behind all(not(wasm32), feature = "embed-zkeys")

Verified clean across all configurations:

cargo check --workspace                                         ✅
cargo check -p walletkit --target wasm32-unknown-unknown        ✅
cargo test -p walletkit-core --lib                              ✅  74 passed
cargo test -p walletkit-core --lib --features embed-zkeys       ✅  77 passed
cargo clippy --workspace --all-targets -- -D warnings           ✅

@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 17, 2026

On it — rebasing against main, resolving conflicts, and fixing any CI issues. I'll update here when done.

@agentotto agentotto bot force-pushed the feat/drop-storage-feature branch from 0ab2dee to 13b0c9d Compare March 17, 2026 14:26
@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 17, 2026

Rebase complete ✅ — one commit behind main (fix flaky test_session_cache_ttl), merged cleanly with no conflicts. All checks pass:

  • cargo check --workspace
  • cargo check -p walletkit --target wasm32-unknown-unknown
  • cargo test -p walletkit-core --lib ✅ (74 passed)
  • cargo clippy --workspace --all-targets -- -D warnings

Branch force-pushed.

@Dzejkop
Copy link
Copy Markdown
Contributor Author

Dzejkop commented Mar 17, 2026

/otto fix ci

@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 17, 2026

Checking CI failures now — will fix and update here.

@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 17, 2026

CI fixed ✅ — the only failure was "Check code formatting". Two files had import blocks in the wrong order after the cfg-gating changes:

  • walletkit-core/src/logger.rs#[cfg(not(wasm32))] use std::sync::{mpsc, Mutex} needed to come before the use std::{…} group
  • walletkit-core/src/storage/lock.rs — cfg-gated StorageError import ordering

cargo fmt fixed both. All other checks (WASM compile, tests, clippy, deny, Swift/Kotlin bindings, docs) were already passing. Force-pushed.

Ok((Arc::new(query_material), Arc::new(nullifier_material)))
impl std::fmt::Debug for Groth16Materials {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Groth16Materials").finish_non_exhaustive()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/otto what does finish_non_exhaustive do?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finish_non_exhaustive is a method on DebugStruct (from std::fmt) that closes the struct's debug output with { field: value, .. } — the trailing .. signals to the reader that there are additional fields not shown. It's used in manual Debug impls when you want to hide some fields (e.g. large/sensitive data like the zkey material) while still producing valid, informative debug output.


use super::error::{StorageError, StorageResult};
#[cfg(not(target_arch = "wasm32"))]
use super::error::StorageError;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/otto why is this feature gated?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's purely a lint/cleanliness fix — StorageError itself is WASM-compatible (just a thiserror enum of String variants, nothing platform-specific).

The gate is needed because StorageError is only used inside #[cfg(not(target_arch = "wasm32"))] mod imp, specifically in the map_io_err helper that constructs StorageError::Lock(...). The WASM mod imp never needs to construct an error — all three methods just return Ok(...) unconditionally — so the import is genuinely unused on WASM, and the workspace's -D warnings / dead_code = "deny" turns that into a hard error.

//! # Example
//!
//! ```rust,no_run
//! ```rust,ignore
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/otto why no_run -> ingore?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no_run still compiles the snippet — it just skips execution. The problem is the example calls Groth16Materials::from_embedded, which only exists when the embed-zkeys feature is enabled. Without it, the doc-test compilation fails with E0599 ("no associated item named from_embedded found").

embed-zkeys is not in the crate's default features (deliberately — it embeds large zkey blobs), and [package.metadata.docs.rs] is only read by docs.rs, not by cargo test --doc or CI. So no_run still breaks in the default environment.

ignore skips compilation entirely, keeping the example visible in rendered docs without causing CI failures. It's the standard idiom for examples that depend on an optional feature not enabled by default.

paolodamico
paolodamico previously approved these changes Mar 17, 2026
@Dzejkop
Copy link
Copy Markdown
Contributor Author

Dzejkop commented Mar 17, 2026

/otto fix ci

@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 17, 2026

On it — checking CI failures and fixing. Will update here when done.

@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 17, 2026

All 16 CI checks pass ✅ — no code changes were needed. The failures were:

  1. Flaky test race (test_null_handling) — already fixed by the init_sqlite() call from the previous session
  2. ARM64 spot runner preemption — compile cache was available on retry and all three toolchain legs (stable / 1.92.0 / nightly) came back green

@Dzejkop
Copy link
Copy Markdown
Contributor Author

Dzejkop commented Mar 18, 2026

/otto fix ci

@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 18, 2026

On it — investigating and fixing CI failures now.

Dzejkop and others added 22 commits March 23, 2026 14:27
- Introduce `embed-zkeys` Cargo feature in walletkit-core and walletkit
  that activates world-id-core/embed-zkeys and world-id-core/zstd-compress-zkeys;
  previously these were always enabled, preventing downstream consumers from
  opting out (e.g. to reduce binary size on WASM).

- Feature-gate `Groth16Materials::from_embedded` behind `embed-zkeys`.
  `Groth16Materials::from_cache` (native filesystem) is unaffected.

- Feature-gate `storage::groth16_cache` (and the exported
  `cache_embedded_groth16_material`) behind `all(not(wasm32), embed-zkeys)`.

- Fix WASM compilation error: split the single `#[uniffi::export] impl
  Groth16Materials` block into two (one per feature/target gate) so the
  uniffi proc-macro no longer generates FFI shims that reference
  `from_cache`/`StoragePaths` on wasm32 targets.

- Fix dead-code / unused-import warnings on wasm32:
  - logger.rs: gate `struct LogEvent`, `LOG_CHANNEL`, and the
    `mpsc`/`Mutex` imports behind `#[cfg(not(target_arch = "wasm32"))]`.
  - storage/lock.rs: gate `StorageError` import behind non-wasm.

- Add `required-features = ["embed-zkeys"]` to the integration test
  targets that call `from_embedded` / `load_embedded_*` so cargo skips
  them when the feature is off.

- Fix pre-existing missing-docs error in authenticator_integration.rs and
  credential_storage_integration.rs (clippy --all-targets -D warnings).

- Update crate-level doc example to use the correct API and mark it
  `ignore` since it requires the `embed-zkeys` feature.

Co-authored-by: otto@toolsforhumanity.com
Co-authored-by: otto@toolsforhumanity.com
UniFFI constructors require owned Arc arguments across the FFI boundary,
so clippy::needless_pass_by_value cannot be acted on here. Document this
with #[expect(..., reason = ...)] so the suppression is self-explanatory
and will become a compile error if the lint ever stops firing.

Co-authored-by: otto@toolsforhumanity.com
sqlite3mc registers its cipher implementations during the very first
sqlite3_open_v2 call. When the test binary runs all 8 tests as parallel
threads, two threads can race inside that one-time initialization window
and one sees 'unknown cipher chacha20' even though chacha20 is compiled
in (CODEC_TYPE_CHACHA20).

Add init_sqlite() using std::sync::OnceLock so that exactly one thread
performs the first open; all other threads block until codec
initialization is complete before running their own test-specific code.
Called as the first statement of every test in the file.

Co-authored-by: otto@toolsforhumanity.com
docs.rs builds run without network access; world-id-core/embed-zkeys
downloads circuit files (zkeys) during the build script, so including
it in [package.metadata.docs.rs] features would cause every docs.rs
build to fail with a network error.

The crate-level example is already marked `ignore` precisely because
it calls from_embedded() which requires embed-zkeys, so removing the
feature from the docs.rs config is safe and complete.

Co-authored-by: otto@toolsforhumanity.com
from_embedded is gated behind #[cfg(feature = "embed-zkeys")] and
embed-zkeys is excluded from [package.metadata.docs.rs] features
(docs.rs has no network access for the circuit download). rustdoc
resolves intra-doc links against the features active at doc-build
time, so the backtick link produced an unresolved-link error under
RUSTDOCFLAGS=-Dwarnings.

Replace with a plain code-span so the reference remains readable in
the rendered docs without creating a dead link.

Co-authored-by: otto@toolsforhumanity.com
Replace the single init_logging function that contained scattered inline
#[cfg] blocks with three self-contained functions:

- init_logging_native  (#[cfg(not(wasm32))]): mpsc channel + background
  delivery thread.  Documents *why* the channel is needed: calling a
  UniFFI foreign callback synchronously from inside UniFFI's future-poll
  machinery (rust_call_with_out_status) causes EXC_BAD_ACCESS due to
  nested FFI frame corruption.

- init_logging_wasm    (#[cfg(wasm32)]): stores the logger in
  LOGGER_INSTANCE for direct synchronous dispatch.  Safe on WASM because
  the single-threaded cooperative runtime cannot have a UniFFI poll frame
  on the stack when a tracing event fires.

- init_logging         (ungated, #[uniffi::export]): handles the
  LOGGING_INITIALIZED idempotency guard and the shared subscriber setup,
  then dispatches to the appropriate platform impl via a single
  #[cfg]-gated call site.

Each platform's code path is now fully self-contained; the public
dispatcher contains no inline cfg blocks at all.

Co-authored-by: otto@toolsforhumanity.com
…vent circuit download

Both world-id-authenticator v0.5.2 and world-id-proof v0.5.2 ship with
default = ["embed-zkeys"], which means any package that activates them
without explicit default-features = false ends up triggering world-id-proof's
build script to download ~100 MB of circuit files from raw.githubusercontent.com.

The two paths that activated world-id-proof/embed-zkeys without our knowledge:

  1. walletkit-core -> world-id-core/authenticator
       -> dep:world-id-authenticator (default-features = true)
       -> world-id-authenticator/embed-zkeys
       -> world-id-proof/embed-zkeys                       ← download

  2. walletkit-core -> world-id-core/authenticator
       -> dep:world-id-proof (default-features = true)
       -> world-id-proof/default = ["embed-zkeys"]        ← download

Neither path is controllable from our Cargo.toml without patching upstream
crates, since both are inside the published world-id-core v0.5.2.

Fix: vendor both crates with a single change each (default = []) and add
[patch.crates-io] entries pointing to the vendor copies.  The embed-zkeys
feature still activates correctly when our own  feature is
explicitly enabled (verified: world-id-proof resolves to [embed-zkeys,
zstd-compress-zkeys] when walletkit-core/embed-zkeys is active).

The vendor copies are verbatim source from crates.io v0.5.2 with only the
[features] default line changed.  They should be updated whenever either
crate is bumped.

Co-authored-by: otto@toolsforhumanity.com
Remove the [patch.crates-io] overrides for world-id-authenticator and
world-id-proof that set default=[] to prevent circuit downloads.
The upstream crates on crates.io are used directly now.

Also fix duplicate uniffi workspace dependency in walletkit-core/Cargo.toml
introduced during rebase conflict resolution.
@agentotto agentotto bot force-pushed the feat/drop-storage-feature branch from d0654df to f37aba0 Compare March 23, 2026 14:41
@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 23, 2026

Rebase & vendor cleanup complete

Rebase against main

  • All 30 PR commits successfully rebased onto latest main (e0e8c6d).
  • Conflicts resolved in 8 commits across these files:
    • walletkit-core/src/authenticator/mod.rs — kept danger_sign_challenge from main; preserved Groth16Materials refactoring from PR
    • walletkit-core/src/storage/traits.rs — kept main's VaultChangedListener (replaces the older WalletKitBackupManager)
    • walletkit-core/src/storage/credential_storage.rs — kept main's danger_delete_all_credentials + set_vault_changed_listener
    • walletkit-core/src/lib.rs — kept PR's Groth16Materials doc examples
    • walletkit-core/Cargo.toml — merged both sides (uniffi workspace dep + taceo-oprf)
    • Cargo.toml — kept world-id-core = "0.6" from main + wasm-unstable-single-threaded from PR
    • Cargo.lock — regenerated
    • walletkit-core/tests/ — resolved signal type and materials API conflicts

Vendored crate removal

  • Removed vendor/ directory (world-id-authenticator and world-id-proof — vendored copies with default = [])
  • Removed entire [patch.crates-io] block from root Cargo.toml
  • Now uses upstream crates from crates.io directly: world-id-authenticator v0.6.0, world-id-proof v0.6.0
  • −17,889 lines from removing vendored sources
  • No patches were kept — all vendored crates are available on crates.io

API fix

  • Fixed CoreAuthenticator::init call sites: upstream v0.6.0 changed to a 2-arg signature with a separate .with_proof_materials() builder method

Build verification

  • cargo check (native) passes cleanly

Workflow note

  • Reverted .github/workflows/ci.yml to pre-rebase state and dropped otto-review-gate.yml (from main) because the GitHub App token lacks workflows permission. These will be picked up on the next merge to main.

@Dzejkop Dzejkop force-pushed the feat/drop-storage-feature branch from f37aba0 to 076cba6 Compare March 23, 2026 14:49
@agentotto
Copy link
Copy Markdown
Contributor

agentotto bot commented Mar 23, 2026

Fix for WASM CI failure (2ad5cfb)

Root cause: set_vault_changed_listener was inside a #[uniffi::export] impl block. The UniFFI proc macro processes all methods before #[cfg] attributes are evaluated, so VaultChangedListener was being resolved on wasm32 even though the import and method were both #[cfg(not(target_arch = "wasm32"))]-gated.

Fix: Moved set_vault_changed_listener out of the #[uniffi::export] block into the plain (non-uniffi) impl CredentialStore block, where the #[cfg] gate works correctly.

Native cargo check and cargo clippy both pass.

…lock

The UniFFI proc macro processes all methods in the impl block before
`#[cfg]` attributes are evaluated, so `VaultChangedListener` was
being resolved even on wasm32 where the cfg-gated import is absent.

Move the method into the non-uniffi impl block where the `#[cfg]`
gate works as expected.
@agentotto agentotto bot force-pushed the feat/drop-storage-feature branch from 2ad5cfb to f9d2f70 Compare March 23, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants