rustpython 0.6.0

A python interpreter written in rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use rustpython::{InterpreterBuilder, InterpreterBuilderExt};

#[cfg(feature = "mimalloc")]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

#[must_use]
pub fn main() -> std::process::ExitCode {
    let mut config = InterpreterBuilder::new();
    #[cfg(feature = "stdlib")]
    {
        config = config.init_stdlib();
    }
    rustpython::run(config)
}