[package]
name = "rustpython_wasm"
description = "A Python-3 (CPython >= 3.5.0) Interpreter written in Rust, compiled to WASM"
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
repository.workspace = true
license.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[features]
default = ["freeze-stdlib"]
freeze-stdlib = ["rustpython-vm/freeze-stdlib", "rustpython-pylib/freeze-stdlib", "rustpython-stdlib"]
no-start-func = []

[dependencies]
rustpython-common = { workspace = true }
rustpython-pylib = { workspace = true, optional = true }
rustpython-stdlib = { workspace = true, default-features = false, optional = true }
# make sure no threading! otherwise wasm build will fail
rustpython-vm = { workspace = true, features = ["compiler", "encodings", "serde", "wasmbind"] }

ruff_python_parser = { workspace = true }

serde = { workspace = true }
wasm-bindgen = { workspace = true }

console_error_panic_hook = "0.1"
js-sys = "0.3"
serde-wasm-bindgen = "0.6.5"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [
    "console",
    "Document",
    "Element",
    "Window",
    "Headers",
    "Request",
    "RequestInit",
    "Response"
] }

[package.metadata.wasm-pack.profile.release]
wasm-opt = false#["-O1"]

[lints]
workspace = true
