diff options
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | src/lib.rs | 3 |
2 files changed, 3 insertions, 5 deletions
@@ -8,7 +8,7 @@ edition = "2018" | |||
8 | crate-type = ["cdylib", "rlib"] | 8 | crate-type = ["cdylib", "rlib"] |
9 | 9 | ||
10 | [features] | 10 | [features] |
11 | default = ["console_error_panic_hook"] | 11 | default = ["console_error_panic_hook", "wee_alloc"] |
12 | 12 | ||
13 | [dependencies] | 13 | [dependencies] |
14 | wasm-bindgen = "0.2.63" | 14 | wasm-bindgen = "0.2.63" |
@@ -22,4 +22,5 @@ wasm-bindgen-test = "0.3.13" | |||
22 | 22 | ||
23 | [profile.release] | 23 | [profile.release] |
24 | # Tell `rustc` to optimize for small code size. | 24 | # Tell `rustc` to optimize for small code size. |
25 | opt-level = "s" | 25 | opt-level = "z" |
26 | lto = true | ||
@@ -1,7 +1,6 @@ | |||
1 | mod utils; | 1 | mod utils; |
2 | 2 | ||
3 | use js_sys::Array; | 3 | use js_sys::Array; |
4 | |||
5 | use syntax::{ | 4 | use syntax::{ |
6 | ast::{self, AstNode}, | 5 | ast::{self, AstNode}, |
7 | NodeOrToken, SourceFile, SyntaxElement, SyntaxError, SyntaxNode, | 6 | NodeOrToken, SourceFile, SyntaxElement, SyntaxError, SyntaxNode, |
@@ -10,8 +9,6 @@ use wasm_bindgen::prelude::*; | |||
10 | 9 | ||
11 | use std::{convert::From, str::FromStr}; | 10 | use std::{convert::From, str::FromStr}; |
12 | 11 | ||
13 | // When the `wee_alloc` feature is enabled, use `wee_alloc` as the global | ||
14 | // allocator. | ||
15 | #[cfg(feature = "wee_alloc")] | 12 | #[cfg(feature = "wee_alloc")] |
16 | #[global_allocator] | 13 | #[global_allocator] |
17 | static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; | 14 | static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; |