remove veilid-wasm project, too out of date

refactor state updates and formalize a VeilidState object
work on veilid-flutter api
This commit is contained in:
John Smith
2022-01-18 12:33:14 -05:00
parent e39835d51f
commit 1b6864bf22
36 changed files with 512 additions and 3963 deletions

View File

@@ -1,38 +0,0 @@
#![cfg(target_arch = "wasm32")]
use cfg_if::*;
use wasm_bindgen::prelude::*;
//use wasm_bindgen_futures::*;
cfg_if! {
if #[cfg(feature = "wee_alloc")] {
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
// allocator.
extern crate wee_alloc;
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
}
}
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(js_namespace = console, js_name = log)]
pub fn console_log(s: &str);
#[wasm_bindgen]
pub fn alert(s: &str);
}
pub fn set_panic_hook() {
#[cfg(feature = "console_error_panic_hook")]
console_error_panic_hook::set_once();
}
pub fn f64_try_to_unsigned<T>(f: f64) -> Result<T,()>
where T: core::convert::TryFrom<u64>
{
let rf = f.floor();
if rf < 0.0 {
return Err(());
}
T::try_from(rf as u64).map_err(drop)
}