diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 843770d..ba96162 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -23,7 +23,7 @@ RUN echo 'git-fetch-with-cli = true' >> $CARGO_HOME/config.toml # Copy WASM source and build COPY wasm/Cargo.toml wasm/Cargo.lock ./wasm/ 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 ---------- FROM docker.io/node:20-slim AS builder diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index c48bdd4..291c9bf 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,11 +1,11 @@ /** * This file is part of Sharenet. - * + * * Sharenet is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. - * + * * You may obtain a copy of the license at: * https://creativecommons.org/licenses/by-nc-sa/4.0/ - * + * * Copyright (c) 2024 Continuist */ diff --git a/frontend/src/lib/wasm.ts b/frontend/src/lib/wasm.ts index ee9ace1..caf587a 100644 --- a/frontend/src/lib/wasm.ts +++ b/frontend/src/lib/wasm.ts @@ -54,11 +54,12 @@ export class PassportWASMLoader { } try { - // Dynamically import the WASM module - const wasm = await import('./wasm-pkg/sharenet_passport_wasm'); + // Dynamically import the WASM module - for sync WebAssembly + const wasm = await import('./wasm-pkg/sharenet_passport_wasm_bg'); + const init = await import('./wasm-pkg/sharenet_passport_wasm'); // Initialize the WASM module - await wasm.default(); + await init.default(); // Create wrapper functions with proper typing const wasmModule: PassportWASM = {