[package]
edition = "2024"
rust-version = "1.95.0"
name = "rustpython"
version = "0.6.0"
authors = ["RustPython Team"]
build = false
include = [
"LICENSE",
"Cargo.toml",
"src/**/*.rs",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A python interpreter written in rust."
readme = "README.md"
license = "MIT"
repository = "https://github.com/RustPython/RustPython"
resolver = "2"
[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"
[features]
capi = [
"dep:rustpython-capi",
"threading",
]
default = [
"threading",
"stdlib",
"stdio",
"importlib",
"ssl-rustls-aws-lc",
"host_env",
"mimalloc",
"doc",
]
doc = [
"rustpython-vm/doc",
"rustpython-stdlib?/doc",
]
encodings = ["rustpython-vm/encodings"]
flame-it = [
"rustpython-vm/flame-it",
"rustpython-stdlib/flame-it",
"flame",
"flamescope",
]
freeze-stdlib = [
"stdlib",
"rustpython-vm/freeze-stdlib",
"rustpython-pylib?/freeze-stdlib",
]
host_env = [
"rustpython-vm/host_env",
"rustpython-stdlib?/host_env",
]
importlib = ["rustpython-vm/importlib"]
jit = ["rustpython-vm/jit"]
mimalloc = ["dep:mimalloc"]
opcode-histogram = ["rustpython-vm/opcode-histogram"]
sqlite = ["rustpython-stdlib/sqlite"]
ssl = [
"host_env",
"rustpython-stdlib?/ssl",
]
ssl-openssl = [
"ssl",
"rustpython-stdlib/ssl-openssl",
]
ssl-openssl-vendor = [
"ssl-openssl",
"rustpython-stdlib/ssl-openssl-vendor",
]
ssl-rustls = [
"ssl",
"rustpython-stdlib/ssl-rustls",
]
ssl-rustls-aws-lc = [
"ssl-rustls",
"dep:rustls",
"rustls/aws_lc_rs",
]
ssl-rustls-aws-lc-fips = [
"ssl-rustls-aws-lc",
"rustls/fips",
]
stdio = ["rustpython-vm/stdio"]
stdlib = [
"rustpython-stdlib",
"rustpython-pylib",
"encodings",
]
threading = [
"rustpython-vm/threading",
"rustpython-stdlib/threading",
]
[lib]
name = "rustpython"
path = "src/lib.rs"
[[bin]]
name = "rustpython"
path = "src/main.rs"
[dependencies.dirs]
version = "6"
[dependencies.env_logger]
version = "0.11"
[dependencies.flame]
version = "0.2.2"
optional = true
[dependencies.flamescope]
version = "0.1.2"
optional = true
[dependencies.lexopt]
version = "0.3"
[dependencies.log]
version = "0.4.30"
[dependencies.rustls]
version = "0.23.39"
optional = true
default-features = false
[dependencies.rustpython-capi]
version = "0.6.0"
optional = true
[dependencies.rustpython-compiler]
version = "0.6.0"
[dependencies.rustpython-pylib]
version = "0.6.0"
optional = true
[dependencies.rustpython-stdlib]
version = "0.6.0"
features = ["compiler"]
optional = true
default-features = false
[dependencies.rustpython-vm]
version = "0.6.0"
features = [
"compiler",
"gc",
]
default-features = false
[dev-dependencies.criterion]
version = "5.0.1"
features = ["html_reports"]
package = "codspeed-criterion-compat"
[dev-dependencies.pyo3]
version = "0.29"
features = ["auto-initialize"]
[dev-dependencies.ruff_python_parser]
version = "0.16.5"
package = "rustpython-ruff_python_parser"
[dev-dependencies.rustls-graviola]
version = "0.4"
[dev-dependencies.rustpython-stdlib]
version = "0.6.0"
default-features = false
[build-dependencies.winresource]
version = "0.1"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.mimalloc]
version = "0.1"
optional = true
default-features = false
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rustyline]
version = "18"
[target."cfg(windows)".dependencies.libc]
version = "0.2.186"
[lints.clippy]
alloc_instead_of_core = "warn"
assigning_clones = "warn"
bool_to_int_with_if = "warn"
cfg_not_test = "warn"
checked_conversions = "warn"
cloned_instead_of_copied = "warn"
collapsible_else_if = "warn"
collection_is_never_read = "warn"
comparison_chain = "warn"
copy_iterator = "warn"
debug_assert_with_mut_call = "warn"
derive_partial_eq_without_eq = "warn"
doc_link_with_quotes = "warn"
duration_suboptimal_units = "warn"
elidable_lifetime_names = "warn"
enum_glob_use = "warn"
explicit_deref_methods = "warn"
explicit_into_iter_loop = "warn"
explicit_iter_loop = "warn"
filter_map_next = "warn"
flat_map_option = "warn"
format_collect = "warn"
if_not_else = "allow"
imprecise_flops = "warn"
inconsistent_struct_constructor = "warn"
index_refutable_slice = "warn"
inefficient_to_string = "warn"
ip_constant = "warn"
iter_filter_is_ok = "warn"
iter_filter_is_some = "warn"
iter_on_empty_collections = "warn"
iter_on_single_items = "warn"
iter_over_hash_type = "warn"
large_futures = "warn"
large_types_passed_by_value = "warn"
literal_string_with_formatting_args = "warn"
manual_assert = "warn"
manual_instant_elapsed = "warn"
manual_is_variant_and = "warn"
map_unwrap_or = "warn"
match_bool = "warn"
match_same_arms = "allow"
mismatching_type_param_order = "warn"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "warn"
mut_mut = "warn"
needless_bitwise_bool = "warn"
needless_collect = "warn"
needless_for_each = "warn"
non_std_lazy_statics = "warn"
option_as_ref_cloned = "warn"
or_fun_call = "warn"
ptr_offset_by_literal = "warn"
range_minus_one = "warn"
range_plus_one = "warn"
redundant_clone = "warn"
redundant_else = "warn"
redundant_test_prefix = "warn"
ref_option = "warn"
return_self_not_must_use = "warn"
same_functions_in_if_condition = "warn"
search_is_some = "warn"
significant_drop_in_scrutinee = "warn"
similar_names = "allow"
single_char_pattern = "warn"
single_match_else = "allow"
single_option_map = "warn"
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
tests_outside_test_module = "warn"
trait_duplication_in_bounds = "warn"
trivially_copy_pass_by_ref = "warn"
tuple_array_conversions = "warn"
type_repetition_in_bounds = "warn"
unchecked_time_subtraction = "warn"
uninlined_format_args = "warn"
unnecessary_box_returns = "warn"
unnecessary_join = "warn"
unnecessary_struct_initialization = "warn"
unnecessary_wraps = "warn"
unnested_or_patterns = "warn"
unused_peekable = "warn"
unused_rounding = "warn"
use_self = "warn"
useless_let_if_seq = "warn"
while_float = "warn"
[lints.clippy.complexity]
level = "warn"
priority = -2
[lints.clippy.correctness]
level = "warn"
priority = -2
[lints.clippy.perf]
level = "warn"
priority = -2
[lints.clippy.style]
level = "warn"
priority = -2
[lints.clippy.suspicious]
level = "warn"
priority = -2
[lints.rust]
elided_lifetimes_in_paths = "warn"
unreachable_pub = "warn"
unsafe_code = "allow"
unsafe_op_in_unsafe_fn = "deny"
[profile.bench]
opt-level = 3
lto = "thin"
codegen-units = 1
[profile.dev.package."*"]
opt-level = 3
[profile.release]
lto = "thin"
[profile.release.package.rustpython-common]
codegen-units = 1
[profile.release.package.rustpython-doc]
codegen-units = 1
[profile.release.package.rustpython-literal]
codegen-units = 1
[profile.release.package.rustpython-wtf8]
codegen-units = 1
[profile.test]
opt-level = 3
[profile.wasm-release]
opt-level = "s"
lto = true
codegen-units = 1
panic = "abort"
inherits = "release"
strip = true