mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
15 lines
420 B
Rust
15 lines
420 B
Rust
mod ast;
|
|
mod json;
|
|
use std::collections::HashMap;
|
|
|
|
use super::pyobject::{PyContext, PyObjectRef};
|
|
|
|
pub type StdlibInitFunc = fn(&PyContext) -> PyObjectRef;
|
|
|
|
pub fn get_module_inits() -> HashMap<String, StdlibInitFunc> {
|
|
let mut modules = HashMap::new();
|
|
modules.insert("json".to_string(), json::mk_module as StdlibInitFunc);
|
|
modules.insert("ast".to_string(), ast::mk_module as StdlibInitFunc);
|
|
modules
|
|
}
|