[package] name = "rustpython" description = "A python interpreter written in rust." include = ["LICENSE", "Cargo.toml", "src/**/*.rs"] version.workspace = true authors.workspace = true edition.workspace = true rust-version.workspace = true repository.workspace = true license.workspace = true [features] default = ["threading", "stdlib", "stdio", "importlib", "ssl-rustls"] importlib = ["rustpython-vm/importlib"] encodings = ["rustpython-vm/encodings"] stdio = ["rustpython-vm/stdio"] stdlib = ["rustpython-stdlib", "rustpython-pylib", "encodings"] flame-it = ["rustpython-vm/flame-it", "flame", "flamescope"] freeze-stdlib = ["stdlib", "rustpython-vm/freeze-stdlib", "rustpython-pylib?/freeze-stdlib"] jit = ["rustpython-vm/jit"] threading = ["rustpython-vm/threading", "rustpython-stdlib/threading"] sqlite = ["rustpython-stdlib/sqlite"] ssl = [] ssl-rustls = ["ssl", "rustpython-stdlib/ssl-rustls"] ssl-openssl = ["ssl", "rustpython-stdlib/ssl-openssl"] ssl-vendor = ["ssl-openssl", "rustpython-stdlib/ssl-vendor"] tkinter = ["rustpython-stdlib/tkinter"] [build-dependencies] winresource = "0.1" [dependencies] rustpython-compiler = { workspace = true } rustpython-pylib = { workspace = true, optional = true } rustpython-stdlib = { workspace = true, optional = true, features = ["compiler"] } rustpython-vm = { workspace = true, features = ["compiler"] } ruff_python_parser = { workspace = true } cfg-if = { workspace = true } log = { workspace = true } flame = { workspace = true, optional = true } lexopt = "0.3" dirs = { package = "dirs-next", version = "2.0" } env_logger = "0.11" flamescope = { version = "0.1.2", optional = true } [target.'cfg(windows)'.dependencies] libc = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] rustyline = { workspace = true } [dev-dependencies] criterion = { workspace = true } pyo3 = { version = "0.26", features = ["auto-initialize"] } [[bench]] name = "execution" harness = false [[bench]] name = "microbenchmarks" harness = false [[bin]] name = "rustpython" path = "src/main.rs" [profile.dev.package."*"] opt-level = 3 [profile.test] opt-level = 3 # https://github.com/rust-lang/rust/issues/92869 # lto = "thin" # Doesn't change often [profile.release.package.rustpython-doc] codegen-units = 1 [profile.bench] lto = "thin" codegen-units = 1 opt-level = 3 [profile.release] lto = "thin" [patch.crates-io] # REDOX START, Uncomment when you want to compile/check with redoxer # REDOX END # Used only on Windows to build the vcpkg dependencies [package.metadata.vcpkg] git = "https://github.com/microsoft/vcpkg" # The revision of the vcpkg repository to use # https://github.com/microsoft/vcpkg/tags rev = "2025.09.17" [package.metadata.vcpkg.target] x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md", dev-dependencies = ["openssl" ] } [package.metadata.packager] product-name = "RustPython" identifier = "com.rustpython.rustpython" description = "An open source Python 3 interpreter written in Rust" homepage = "https://rustpython.github.io/" license_file = "LICENSE" authors = ["RustPython Team"] publisher = "RustPython Team" resources = ["LICENSE", "README.md", "Lib"] icons = ["32x32.png"] [package.metadata.packager.nsis] installer_mode = "both" template = "installer-config/installer.nsi" [package.metadata.packager.wix] template = "installer-config/installer.wxs" [workspace] resolver = "2" members = [ ".", "crates/*", ] [workspace.package] version = "0.4.0" authors = ["RustPython Team"] edition = "2024" rust-version = "1.89.0" repository = "https://github.com/RustPython/RustPython" license = "MIT" [workspace.dependencies] rustpython-compiler-core = { path = "crates/compiler-core", version = "0.4.0" } rustpython-compiler = { path = "crates/compiler", version = "0.4.0" } rustpython-codegen = { path = "crates/codegen", version = "0.4.0" } rustpython-common = { path = "crates/common", version = "0.4.0" } rustpython-derive = { path = "crates/derive", version = "0.4.0" } rustpython-derive-impl = { path = "crates/derive-impl", version = "0.4.0" } rustpython-jit = { path = "crates/jit", version = "0.4.0" } rustpython-literal = { path = "crates/literal", version = "0.4.0" } rustpython-vm = { path = "crates/vm", default-features = false, version = "0.4.0" } rustpython-pylib = { path = "crates/pylib", version = "0.4.0" } rustpython-stdlib = { path = "crates/stdlib", default-features = false, version = "0.4.0" } rustpython-sre_engine = { path = "crates/sre_engine", version = "0.4.0" } rustpython-wtf8 = { path = "crates/wtf8", version = "0.4.0" } rustpython-doc = { path = "crates/doc", version = "0.4.0" } ruff_python_parser = { git = "https://github.com/astral-sh/ruff.git", tag = "0.14.1" } ruff_python_ast = { git = "https://github.com/astral-sh/ruff.git", tag = "0.14.1" } ruff_text_size = { git = "https://github.com/astral-sh/ruff.git", tag = "0.14.1" } ruff_source_file = { git = "https://github.com/astral-sh/ruff.git", tag = "0.14.1" } phf = { version = "0.13.1", default-features = false, features = ["macros"]} ahash = "0.8.12" ascii = "1.1" bitflags = "2.9.4" bstr = "1" cfg-if = "1.0" chrono = { version = "0.4.42", default-features = false, features = ["clock", "oldtime", "std"] } constant_time_eq = "0.4" criterion = { version = "0.7", features = ["html_reports"] } crossbeam-utils = "0.8.21" flame = "0.2.2" getrandom = { version = "0.3", features = ["std"] } glob = "0.3" hex = "0.4.3" indexmap = { version = "2.11.3", features = ["std"] } insta = "1.42" itertools = "0.14.0" is-macro = "0.3.7" junction = "1.3.0" libc = "0.2.169" libffi = "4.1" log = "0.4.28" nix = { version = "0.30", features = ["fs", "user", "process", "term", "time", "signal", "ioctl", "socket", "sched", "zerocopy", "dir", "hostname", "net", "poll"] } malachite-bigint = "0.6" malachite-q = "0.6" malachite-base = "0.6" memchr = "2.7.4" num-complex = "0.4.6" num-integer = "0.1.46" num-traits = "0.2" num_enum = { version = "0.7", default-features = false } optional = "0.5" once_cell = "1.20.3" parking_lot = "0.12.3" paste = "1.0.15" proc-macro2 = "1.0.93" pymath = "0.0.2" quote = "1.0.38" radium = "1.1.1" rand = "0.9" rand_core = { version = "0.9", features = ["os_rng"] } rustix = { version = "1.0", features = ["event"] } rustyline = "17.0.1" serde = { version = "1.0.225", default-features = false } schannel = "0.1.28" scoped-tls = "1" scopeguard = "1" static_assertions = "1.1" strum = "0.27" strum_macros = "0.27" syn = "2" thiserror = "2.0" thread_local = "1.1.9" unicode-casing = "0.1.1" unic-char-property = "0.9.0" unic-normal = "0.9.0" unic-ucd-age = "0.9.0" unic-ucd-bidi = "0.9.0" unic-ucd-category = "0.9.0" unic-ucd-ident = "0.9.0" unicode_names2 = "2.0.0" unicode-bidi-mirroring = "0.4" widestring = "1.2.0" windows-sys = "0.59.0" wasm-bindgen = "0.2.100" # Lints [workspace.lints.rust] unsafe_code = "allow" unsafe_op_in_unsafe_fn = "deny" elided_lifetimes_in_paths = "warn" [workspace.lints.clippy] perf = "warn" style = "warn" complexity = "warn" suspicious = "warn" correctness = "warn"