commit a7a5f3298559a1d2b157cde5c2414d77b07c1cd5
parent 9337dce1ec555f597365b59bf8620ed1aec6162a
Author: triesap <tyson@radroots.org>
Date: Thu, 11 Jun 2026 14:14:03 -0700
wasm: fix replica package builds
Diffstat:
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
@@ -26,12 +26,12 @@ help:
build-replica-db-wasm:
wasm-pack build crates/replica_db_wasm --release --target web \
- --out-dir ../replica-db-wasm/pkg/dist --scope radroots
+ --out-dir pkg/dist --scope radroots
build-events-codec-wasm:
wasm-pack build crates/events_codec_wasm --release --target web \
- --out-dir ../events-codec-wasm/pkg/dist --scope radroots
+ --out-dir pkg/dist --scope radroots
build-replica-sync-wasm:
wasm-pack build crates/replica_sync_wasm --release --target web \
- --out-dir ../replica-sync-wasm/pkg/dist --scope radroots
+ --out-dir pkg/dist --scope radroots
diff --git a/crates/replica_db_wasm/src/lib.rs b/crates/replica_db_wasm/src/lib.rs
@@ -2,6 +2,8 @@
#![forbid(unsafe_code)]
#[cfg(target_arch = "wasm32")]
+mod utils;
+#[cfg(target_arch = "wasm32")]
mod wasm_impl;
#[cfg(target_arch = "wasm32")]
pub use wasm_impl::*;
diff --git a/crates/replica_db_wasm/src/wasm_impl.rs b/crates/replica_db_wasm/src/wasm_impl.rs
@@ -1,3 +1,4 @@
+use crate::utils::value_to_js;
use radroots_replica_db::migrations;
use radroots_replica_db::{ReplicaDbExportManifestRs, export_manifest};
use radroots_replica_sync::radroots_replica_sync_status;
@@ -84,9 +85,6 @@ use radroots_replica_db_schema::trade_product_location::ITradeProductLocationRel
use radroots_replica_db_schema::trade_product_media::ITradeProductMediaRelation;
-pub mod utils;
-pub use utils::*;
-
#[wasm_bindgen(js_name = replica_db_run_migrations)]
pub fn replica_db_run_migrations() -> Result<(), JsValue> {
let exec = WasmSqlExecutor::new();
diff --git a/crates/replica_sync/src/sync_state.rs b/crates/replica_sync/src/sync_state.rs
@@ -1,5 +1,5 @@
#[cfg(not(feature = "std"))]
-use alloc::{collections::BTreeMap, string::String};
+use alloc::{collections::BTreeMap, string::String, string::ToString, vec::Vec};
#[cfg(feature = "std")]
use std::collections::BTreeMap;