[package]
name = "interpretthis"
version = "0.3.0"
edition = "2024"
rust-version = "1.85"
license = "MIT OR Apache-2.0"
authors = [
"Thomas Santerre <opensource@moderately.ai>",
"Moderately AI Inc. <opensource@moderately.ai>",
]
repository = "https://github.com/moderately-ai/interpretthis"
homepage = "https://github.com/moderately-ai/interpretthis"
documentation = "https://docs.rs/interpretthis"
description = "Sandboxed Python AST interpreter for untrusted and LLM-generated code"
readme = "README.md"
keywords = ["python", "interpreter", "sandbox", "ast", "llm"]
categories = ["compilers", "parser-implementations", "asynchronous"]
exclude = [
"benches/baseline.json",
"tests/integration/cpython_vendored/**",
"tickets/**",
"ticketsplease.toml",
".ticketsplease/**",
"scripts/**",
"license-header.txt",
]
autobenches = false
[dependencies]
rustpython-parser = "=0.4.0"
tokio = { version = "=1.50.0", features = [
"rt",
"rt-multi-thread",
"macros",
"sync",
"time",
] }
serde = { version = "=1.0.228", features = ["derive", "rc"] }
serde_json = { version = "=1.0.149", features = ["arbitrary_precision"] }
thiserror = "=2.0.18"
indexmap = { version = "=2.13.0", features = ["serde"] }
async-trait = "=0.1.89"
parking_lot = { version = "=0.12.3", features = ["send_guard"] }
regex = "=1.12.3"
chrono = { version = "=0.4.44", features = ["serde"] }
sha2 = "=0.10.9"
base64 = "=0.22.1"
hex = "=0.4.3"
bigdecimal = { version = "=0.4.10", features = ["serde"] }
num-rational = { version = "=0.4.2", features = ["serde"] }
num-bigint = { version = "=0.4.6", features = ["serde"] }
num-traits = "=0.2.19"
rustc-hash = "=2.1.1"
compact_str = { version = "0.8", features = ["serde"] }
tikv-jemallocator = { version = "=0.6.0", optional = true }
tikv-jemalloc-ctl = { version = "=0.6.0", optional = true, features = ["stats"] }
mimalloc = { version = "0.1", optional = true, default-features = false }
[features]
bench-alloc-jemalloc = ["dep:tikv-jemallocator", "dep:tikv-jemalloc-ctl"]
bench-alloc-mimalloc = ["dep:mimalloc"]
[dev-dependencies]
criterion = { version = "=0.7.0", features = ["html_reports"] }
[[test]]
name = "integration"
path = "tests/integration/main.rs"
[[bench]]
name = "interpreter"
path = "benches/main.rs"
harness = false
[lints.rust]
unsafe_code = "deny"
[lints.clippy]
all = { level = "deny", priority = -1 }
pedantic = { level = "allow", priority = -1 }
nursery = { level = "allow", priority = -1 }
cargo = { level = "allow", priority = -1 }
dbg_macro = "deny"
print_stdout = "deny"
print_stderr = "deny"
unwrap_used = "allow"
expect_used = "allow"
panic = "allow"
todo = "allow"
redundant_pub_crate = "allow"
too_many_lines = "allow"
too_many_arguments = "allow"
cognitive_complexity = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
doc_markdown = "allow"
wildcard_imports = "allow"
cast_possible_truncation = "allow"
cast_sign_loss = "allow"
cast_precision_loss = "allow"
cast_possible_wrap = "allow"
cast_lossless = "allow"
float_cmp = "allow"
similar_names = "allow"
struct_excessive_bools = "allow"
fn_params_excessive_bools = "allow"
large_enum_variant = "allow"
type_complexity = "allow"
result_large_err = "allow"
multiple_crate_versions = "allow"
significant_drop_tightening = "allow"
await_holding_lock = "allow"
future_not_send = "allow"
items_after_statements = "allow"
option_if_let_else = "allow"
manual_let_else = "allow"
match_same_arms = "allow"
redundant_closure_for_method_calls = "allow"
needless_pass_by_value = "allow"
return_self_not_must_use = "allow"
trivially_copy_pass_by_ref = "allow"
implicit_hasher = "allow"
uninlined_format_args = "allow"
too_long_first_doc_paragraph = "allow"