Add wee_alloc
This commit is contained in:
parent
9cb73680f8
commit
da59156e07
3 changed files with 131 additions and 112 deletions
|
|
@ -11,9 +11,16 @@
|
|||
|
||||
use core::str;
|
||||
|
||||
use cfg_if::cfg_if;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use crate::{BuiltinTokenizer, CursorPosition, TextWithCursors, TextWithHistory};
|
||||
cfg_if! {
|
||||
if #[cfg(feature = "wee_alloc")] {
|
||||
#[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