Always use wee_alloc for wasm
This commit is contained in:
parent
e02410ba91
commit
61bea53b7c
5 changed files with 6 additions and 12 deletions
10
src/wasm.rs
10
src/wasm.rs
|
|
@ -1,16 +1,12 @@
|
|||
//! Expose the `reconcile` crate's functionality to WebAssembly.
|
||||
use core::str;
|
||||
|
||||
use cfg_if::cfg_if;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use crate::{BuiltinTokenizer, CursorPosition, SpanWithHistory, TextWithCursors};
|
||||
cfg_if! {
|
||||
if #[cfg(feature = "wee_alloc")] {
|
||||
#[global_allocator]
|
||||
static ALLOC: wee_alloc::WeeAlloc<'_> = wee_alloc::WeeAlloc::INIT;
|
||||
}
|
||||
}
|
||||
|
||||
#[global_allocator]
|
||||
static ALLOC: wee_alloc::WeeAlloc<'_> = wee_alloc::WeeAlloc::INIT;
|
||||
|
||||
/// WASM wrapper around `crate::reconcile` for merging text.
|
||||
#[wasm_bindgen(js_name = reconcile)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue