interpretthis 0.1.0

Sandboxed Python AST interpreter for untrusted and LLM-generated code
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "interpretthis"
version = "0.1.0"
authors = [
    "Thomas Santerre <opensource@moderately.ai>",
    "Moderately AI Inc. <opensource@moderately.ai>",
]
build = "build.rs"
exclude = [
    "benches/baseline.json",
    "tests/integration/cpython_vendored/**",
    "tickets/**",
    "ticketsplease.toml",
    ".ticketsplease/**",
    "scripts/**",
    "license-header.txt",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Sandboxed Python AST interpreter for untrusted and LLM-generated code"
homepage = "https://github.com/moderately-ai/interpretthis"
documentation = "https://docs.rs/interpretthis"
readme = "README.md"
keywords = [
    "python",
    "interpreter",
    "sandbox",
    "ast",
    "llm",
]
categories = [
    "compilers",
    "parser-implementations",
    "asynchronous",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/moderately-ai/interpretthis"

[features]
bench-alloc-jemalloc = [
    "dep:tikv-jemallocator",
    "dep:tikv-jemalloc-ctl",
]
bench-alloc-mimalloc = ["dep:mimalloc"]

[lib]
name = "interpretthis"
path = "src/lib.rs"

[[test]]
name = "integration"
path = "tests/integration/main.rs"

[[bench]]
name = "interpreter"
path = "benches/main.rs"
harness = false

[dependencies.async-trait]
version = "=0.1.89"

[dependencies.base64]
version = "=0.22.1"

[dependencies.bigdecimal]
version = "=0.4.10"
features = ["serde"]

[dependencies.chrono]
version = "=0.4.44"
features = ["serde"]

[dependencies.compact_str]
version = "0.8"
features = ["serde"]

[dependencies.hex]
version = "=0.4.3"

[dependencies.indexmap]
version = "=2.13.0"
features = ["serde"]

[dependencies.mimalloc]
version = "0.1"
optional = true
default-features = false

[dependencies.num-bigint]
version = "=0.4.6"
features = ["serde"]

[dependencies.num-rational]
version = "=0.4.2"
features = ["serde"]

[dependencies.num-traits]
version = "=0.2.19"

[dependencies.parking_lot]
version = "=0.12.3"
features = ["send_guard"]

[dependencies.regex]
version = "=1.12.3"

[dependencies.rustc-hash]
version = "=2.1.1"

[dependencies.rustpython-parser]
version = "=0.4.0"

[dependencies.serde]
version = "=1.0.228"
features = [
    "derive",
    "rc",
]

[dependencies.serde_json]
version = "=1.0.149"
features = ["arbitrary_precision"]

[dependencies.sha2]
version = "=0.10.9"

[dependencies.thiserror]
version = "=2.0.18"

[dependencies.tikv-jemalloc-ctl]
version = "=0.6.0"
features = ["stats"]
optional = true

[dependencies.tikv-jemallocator]
version = "=0.6.0"
optional = true

[dependencies.tokio]
version = "=1.50.0"
features = [
    "rt",
    "rt-multi-thread",
    "macros",
    "sync",
    "time",
]

[dev-dependencies.criterion]
version = "=0.7.0"
features = ["html_reports"]

[lints.clippy]
await_holding_lock = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
cognitive_complexity = "allow"
dbg_macro = "deny"
doc_markdown = "allow"
expect_used = "allow"
float_cmp = "allow"
fn_params_excessive_bools = "allow"
future_not_send = "allow"
implicit_hasher = "allow"
items_after_statements = "allow"
large_enum_variant = "allow"
manual_let_else = "allow"
match_same_arms = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
must_use_candidate = "allow"
needless_pass_by_value = "allow"
option_if_let_else = "allow"
panic = "allow"
print_stderr = "deny"
print_stdout = "deny"
redundant_closure_for_method_calls = "allow"
redundant_pub_crate = "allow"
result_large_err = "allow"
return_self_not_must_use = "allow"
significant_drop_tightening = "allow"
similar_names = "allow"
struct_excessive_bools = "allow"
todo = "allow"
too_long_first_doc_paragraph = "allow"
too_many_arguments = "allow"
too_many_lines = "allow"
trivially_copy_pass_by_ref = "allow"
type_complexity = "allow"
uninlined_format_args = "allow"
unwrap_used = "allow"
wildcard_imports = "allow"

[lints.clippy.all]
level = "deny"
priority = -1

[lints.clippy.cargo]
level = "allow"
priority = -1

[lints.clippy.nursery]
level = "allow"
priority = -1

[lints.clippy.pedantic]
level = "allow"
priority = -1

[lints.rust]
unsafe_code = "deny"