From d88b64642a9a9def5bbb495c499d2d9edc73f47d Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Sun, 21 Jan 2024 09:47:18 +0100 Subject: [PATCH] js: enable `unstable-options` to reduce WASM size --- Cargo.toml | 4 ++-- webln-js/.cargo/config.toml | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e898b3f..6de69b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,9 +13,9 @@ license = "MIT" rust-version = "1.64.0" # TODO: check MSRV [workspace.dependencies] -js-sys = "0.3" +js-sys = { version = "0.3", default-features = false } wasm-bindgen = { version = "0.2", default-features = false } -wasm-bindgen-futures = "0.4" +wasm-bindgen-futures = { version = "0.4", default-features = false } [profile.release] lto = true diff --git a/webln-js/.cargo/config.toml b/webln-js/.cargo/config.toml index 3a85386..90cfb38 100644 --- a/webln-js/.cargo/config.toml +++ b/webln-js/.cargo/config.toml @@ -7,4 +7,9 @@ lto = true codegen-units = 1 panic = "abort" strip = true -debug = false \ No newline at end of file +debug = false + +[unstable] +unstable-options = true +build-std = ["panic_abort", "std"] +build-std-features = ["panic_immediate_abort"] \ No newline at end of file