Mercurial > public > mercurial-scm > hg
view rust/hg-pyo3/src/lib.rs @ 52839:b8cd277d26f4
rust-pyo3: remove the now unused `convert_cpython` module
This was unvaluable during the start of the transition period, but is useless
now that the `InnerRevlog` translation is over.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Tue, 07 Jan 2025 17:36:21 +0100 |
parents | 01aff9437828 |
children | 28f0f00b5dbd |
line wrap: on
line source
use pyo3::prelude::*; mod ancestors; mod dagops; mod discovery; mod exceptions; mod node; mod revision; mod revlog; mod transaction; mod store; mod util; #[pymodule] fn pyo3_rustext(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add("__package__", "mercurial")?; m.add( "__doc__", "Mercurial core concepts - Rust implementation exposed via PyO3", )?; let dotted_name: String = m.getattr("__name__")?.extract()?; env_logger::init(); m.add_submodule(&ancestors::init_module(py, &dotted_name)?)?; m.add_submodule(&dagops::init_module(py, &dotted_name)?)?; m.add_submodule(&discovery::init_module(py, &dotted_name)?)?; m.add_submodule(&revlog::init_module(py, &dotted_name)?)?; m.add("GraphError", py.get_type::<exceptions::GraphError>())?; Ok(()) }