mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: wasm build (#4412)
* chore: enable wasm build * chore: bump collab * chore: fix build * chore: flowy-document wasm * chore: fix compile * chore: fix compile * chore: fix compile * chore: fix compile * chore: fix ci * chore: fix ci * chore: fix ci
This commit is contained in:
@ -12,7 +12,7 @@ chrono = { workspace = true, default-features = false, features = ["clock"] }
|
||||
bytes = { version = "1.5" }
|
||||
pin-project = "1.1.3"
|
||||
futures-core = { version = "0.3" }
|
||||
tokio = { workspace = true, features = ["time", "rt"] }
|
||||
tokio = { workspace = true, features = ["sync", "time", "rt"] }
|
||||
async-trait.workspace = true
|
||||
md5 = "0.7.0"
|
||||
anyhow.workspace = true
|
||||
@ -32,3 +32,4 @@ brotli = { version = "3.4.0", optional = true }
|
||||
|
||||
[features]
|
||||
compression = ["brotli"]
|
||||
wasm_build = []
|
@ -1,3 +1,19 @@
|
||||
#[macro_export]
|
||||
macro_rules! if_native {
|
||||
($($item:item)*) => {$(
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
$item
|
||||
)*}
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! if_wasm {
|
||||
($($item:item)*) => {$(
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
$item
|
||||
)*}
|
||||
}
|
||||
|
||||
pub fn move_vec_element<T, F>(
|
||||
vec: &mut Vec<T>,
|
||||
filter: F,
|
||||
|
Reference in New Issue
Block a user