From 9128be2afc86b81486a429a37e5c0107eedab68f Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 13 Jun 2021 12:20:35 +0530 Subject: shave off a couple more kb --- Cargo.toml | 5 +++-- src/lib.rs | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 52603a1..2f1a0d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" crate-type = ["cdylib", "rlib"] [features] -default = ["console_error_panic_hook"] +default = ["console_error_panic_hook", "wee_alloc"] [dependencies] wasm-bindgen = "0.2.63" @@ -22,4 +22,5 @@ wasm-bindgen-test = "0.3.13" [profile.release] # Tell `rustc` to optimize for small code size. -opt-level = "s" +opt-level = "z" +lto = true diff --git a/src/lib.rs b/src/lib.rs index 9593d68..ba431d0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,6 @@ mod utils; use js_sys::Array; - use syntax::{ ast::{self, AstNode}, NodeOrToken, SourceFile, SyntaxElement, SyntaxError, SyntaxNode, @@ -10,8 +9,6 @@ use wasm_bindgen::prelude::*; use std::{convert::From, str::FromStr}; -// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global -// allocator. #[cfg(feature = "wee_alloc")] #[global_allocator] static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; -- cgit v1.2.3