wasm fixes

This commit is contained in:
John Smith
2022-11-29 22:51:51 -05:00
parent 5c0a500971
commit 672d750f8f
14 changed files with 166 additions and 112 deletions

View File

@@ -3,10 +3,7 @@ mod protected_store;
mod system;
mod table_store;
pub mod utils;
pub use block_store::*;
pub use protected_store::*;
pub use system::*;
pub use table_store::*;
use utils::*;

View File

@@ -1,4 +1,3 @@
use super::*;
use crate::*;
use data_encoding::BASE64URL_NOPAD;
use rkyv::{Archive as RkyvArchive, Deserialize as RkyvDeserialize, Serialize as RkyvSerialize};

View File

@@ -1,6 +1,6 @@
use async_executors::{Bindgen, LocalSpawnHandleExt, SpawnHandleExt, Timer};
use futures_util::future::{select, Either};
use js_sys::*;
use crate::*;
//use js_sys::*;
pub async fn get_outbound_relay_peer() -> Option<crate::veilid_api::PeerInfo> {
// unimplemented!
@@ -8,7 +8,7 @@ pub async fn get_outbound_relay_peer() -> Option<crate::veilid_api::PeerInfo> {
}
// pub async fn get_pwa_web_server_config() -> {
// if utils::is_browser() {
// if is_browser() {
// let win = window().unwrap();
// let doc = win.document().unwrap();

View File

@@ -1,5 +1,3 @@
use super::*;
use crate::intf::table_db::*;
use crate::*;
use keyvaluedb_web::*;
@@ -135,7 +133,7 @@ impl TableStore {
}
}
if utils::is_browser() {
if is_browser() {
let out = match Database::delete(table_name.clone()).await {
Ok(_) => true,
Err(_) => false,