Skip to content

Commit be1bacd

Browse files
committed
Add no-start-func feature
1 parent 304a47a commit be1bacd

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

wasm/lib/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ crate-type = ["cdylib", "rlib"]
1313
[features]
1414
default = ["freeze-stdlib"]
1515
freeze-stdlib = ["rustpython-vm/freeze-stdlib"]
16+
no-start-func = []
1617

1718
[dependencies]
1819
rustpython-parser = { path = "../../parser" }

wasm/lib/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub fn panic_hook(info: &panic::PanicInfo) {
3838
}
3939

4040
#[doc(hidden)]
41+
#[cfg(not(feature = "no-start-func"))]
4142
#[wasm_bindgen(start)]
4243
pub fn _setup_console_error() {
4344
std::panic::set_hook(Box::new(panic_hook));

0 commit comments

Comments
 (0)