feature/1-self-sovereign-passports-for-user-identity #2

Merged
continuist merged 29 commits from feature/1-self-sovereign-passports-for-user-identity into main 2025-11-01 10:32:30 -04:00
3 changed files with 8 additions and 7 deletions
Showing only changes of commit ba89ea6271 - Show all commits

View file

@ -23,7 +23,7 @@ RUN echo 'git-fetch-with-cli = true' >> $CARGO_HOME/config.toml
# Copy WASM source and build # Copy WASM source and build
COPY wasm/Cargo.toml wasm/Cargo.lock ./wasm/ COPY wasm/Cargo.toml wasm/Cargo.lock ./wasm/
COPY wasm/src ./wasm/src/ COPY wasm/src ./wasm/src/
RUN cd wasm && wasm-pack build --target web --mode no-install RUN cd wasm && wasm-pack build --target web
# ---------- build ---------- # ---------- build ----------
FROM docker.io/node:20-slim AS builder FROM docker.io/node:20-slim AS builder

View file

@ -54,11 +54,12 @@ export class PassportWASMLoader {
} }
try { try {
// Dynamically import the WASM module // Dynamically import the WASM module - for sync WebAssembly
const wasm = await import('./wasm-pkg/sharenet_passport_wasm'); const wasm = await import('./wasm-pkg/sharenet_passport_wasm_bg');
const init = await import('./wasm-pkg/sharenet_passport_wasm');
// Initialize the WASM module // Initialize the WASM module
await wasm.default(); await init.default();
// Create wrapper functions with proper typing // Create wrapper functions with proper typing
const wasmModule: PassportWASM = { const wasmModule: PassportWASM = {