Skip to content

Commit

Permalink
light-client-js: Remove wee_alloc optional dependency (#1201)
Browse files Browse the repository at this point in the history
Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
  • Loading branch information
thanethomson authored Sep 23, 2022
1 parent e7f4978 commit 3b89cf1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
7 changes: 0 additions & 7 deletions light-client-js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,5 @@ wasm-bindgen = { version = "0.2.63", default-features = false, features = [ "ser
# code size when deploying.
console_error_panic_hook = { version = "0.1.6", default-features = false, optional = true }

# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
# compared to the default allocator's ~10K. It is slower than the default
# allocator, however.
#
# Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now.
wee_alloc = { version = "0.4.5", default-features = false, optional = true }

[dev-dependencies]
wasm-bindgen-test = { version = "0.3.13", default-features = false }
6 changes: 0 additions & 6 deletions light-client-js/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ use tendermint_light_client_verifier::{
};
use wasm_bindgen::{prelude::*, JsValue};

// 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;

/// Check whether a given untrusted block can be trusted.
#[wasm_bindgen]
pub fn verify(untrusted: &JsValue, trusted: &JsValue, options: &JsValue, now: &JsValue) -> JsValue {
Expand Down

0 comments on commit 3b89cf1

Please sign in to comment.