fix wasm build, remove from native veilid-flutter rust
This commit is contained in:
parent
243c53606e
commit
736e7a0cb0
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -4260,23 +4260,15 @@ dependencies = [
|
|||||||
"anyhow",
|
"anyhow",
|
||||||
"async-std",
|
"async-std",
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"cfg-if 1.0.0",
|
|
||||||
"console_error_panic_hook",
|
|
||||||
"ffi-support",
|
"ffi-support",
|
||||||
"futures",
|
"futures",
|
||||||
"jni",
|
"jni",
|
||||||
"js-sys",
|
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"log",
|
"log",
|
||||||
"parking_lot 0.12.0",
|
"parking_lot 0.12.0",
|
||||||
"serde 1.0.136",
|
"serde 1.0.136",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"veilid-core",
|
"veilid-core",
|
||||||
"wasm-bindgen",
|
|
||||||
"wasm-bindgen-futures",
|
|
||||||
"wasm-bindgen-test",
|
|
||||||
"wasm-logger",
|
|
||||||
"wee_alloc",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -10,7 +10,6 @@ crate-type = ["cdylib", "staticlib", "rlib"]
|
|||||||
veilid-core = { path="../../veilid-core" }
|
veilid-core = { path="../../veilid-core" }
|
||||||
parking_lot = "^0"
|
parking_lot = "^0"
|
||||||
log = "^0"
|
log = "^0"
|
||||||
cfg-if = "^1"
|
|
||||||
backtrace = "^0"
|
backtrace = "^0"
|
||||||
serde_json = "^1"
|
serde_json = "^1"
|
||||||
serde = "^1"
|
serde = "^1"
|
||||||
@ -25,22 +24,6 @@ allo-isolate = "^0"
|
|||||||
ffi-support = "^0"
|
ffi-support = "^0"
|
||||||
lazy_static = "^1"
|
lazy_static = "^1"
|
||||||
|
|
||||||
# Dependencies for WASM builds only
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
||||||
wasm-bindgen = "^0"
|
|
||||||
console_error_panic_hook = "^0"
|
|
||||||
wee_alloc = "^0"
|
|
||||||
wasm-logger = "^0"
|
|
||||||
wasm-bindgen-futures = "^0"
|
|
||||||
js-sys = "^0"
|
|
||||||
|
|
||||||
# Dependencies for Android builds only
|
# Dependencies for Android builds only
|
||||||
[target.'cfg(target_os = "android")'.dependencies]
|
[target.'cfg(target_os = "android")'.dependencies]
|
||||||
jni = "^0"
|
jni = "^0"
|
||||||
|
|
||||||
# Dev Dependencies for WASM builds only
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
|
||||||
wasm-bindgen-test = "^0"
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
cfg-if = "^1"
|
|
||||||
|
@ -1,14 +1,6 @@
|
|||||||
use cfg_if::*;
|
mod dart_ffi;
|
||||||
|
mod dart_isolate_wrapper;
|
||||||
cfg_if! {
|
mod dart_serialize;
|
||||||
if #[cfg(not(target_arch = "wasm32"))] {
|
|
||||||
mod dart_ffi;
|
|
||||||
mod dart_isolate_wrapper;
|
|
||||||
mod dart_serialize;
|
|
||||||
} else {
|
|
||||||
//mod wasm;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
use jni::{objects::JClass, objects::JObject, JNIEnv};
|
use jni::{objects::JClass, objects::JObject, JNIEnv};
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
#![cfg(target_arch = "wasm32")]
|
|
||||||
#![no_std]
|
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate alloc;
|
|
||||||
|
|
||||||
pub use log::*;
|
|
||||||
pub use wasm_bindgen::prelude::*;
|
|
||||||
pub use wasm_bindgen::JsCast;
|
|
||||||
|
|
||||||
pub use alloc::boxed::Box;
|
|
||||||
pub use alloc::string::String;
|
|
||||||
pub use alloc::sync::Arc;
|
|
||||||
pub use alloc::vec::Vec;
|
|
||||||
pub use core::convert::TryFrom;
|
|
||||||
pub use js_sys::*;
|
|
||||||
pub use js_veilid_core::*;
|
|
||||||
pub use utils::*;
|
|
||||||
pub use veilid_core::dht::key::*;
|
|
||||||
pub use veilid_core::xx::*;
|
|
||||||
pub use veilid_core::*;
|
|
||||||
pub use wasm_logger::*;
|
|
||||||
|
|
||||||
mod js_veilid_core;
|
|
||||||
mod utils;
|
|
@ -7,7 +7,7 @@ if [[ "$1" == "release" ]]; then
|
|||||||
else
|
else
|
||||||
RELEASE=
|
RELEASE=
|
||||||
RUSTFLAGS="-O -g"
|
RUSTFLAGS="-O -g"
|
||||||
GENERATE_SOURCE_MAP="./wasm-sourcemap.py ../target/wasm32-unknown-unknown/debug/veilid_flutter.wasm -o ../target/wasm32-unknown-unknown/debug/veilid_flutter.wasm.map --dwarfdump `which llvm-dwarfdump`"
|
GENERATE_SOURCE_MAP="./wasm-sourcemap.py ../target/wasm32-unknown-unknown/debug/veilid_wasm.wasm -o ../target/wasm32-unknown-unknown/debug/veilid_wasm.wasm.map --dwarfdump `which llvm-dwarfdump`"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd $SCRIPTDIR 2> /dev/null
|
pushd $SCRIPTDIR 2> /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user