rust-cpython: start cpython crate bindings
This changeset introduces the hg-cpython crate, that compiles as a shared library holding a whole Python package (mercurial.rustext), with only the empty 'ancestor' submodule for now. Such bindings will be easier and safer to develop and maintain that those of `hg-direct-ffi`. They don't involve C code, only unsafe Rust that's mostly isolated within the cpython crate. The long-term goal would be to import the provided modules, such as rustext.ancestor with mercurial.policy.importmod, same as we already do with cext modules. Differential Revision: https://phab.mercurial-scm.org/D5434
Showing
- rust/Cargo.lock 129 additions, 0 deletionsrust/Cargo.lock
- rust/Cargo.toml 1 addition, 1 deletionrust/Cargo.toml
- rust/hg-cpython/Cargo.toml 29 additions, 0 deletionsrust/hg-cpython/Cargo.toml
- rust/hg-cpython/rustfmt.toml 3 additions, 0 deletionsrust/hg-cpython/rustfmt.toml
- rust/hg-cpython/src/ancestors.rs 30 additions, 0 deletionsrust/hg-cpython/src/ancestors.rs
- rust/hg-cpython/src/exceptions.rs 15 additions, 0 deletionsrust/hg-cpython/src/exceptions.rs
- rust/hg-cpython/src/lib.rs 40 additions, 0 deletionsrust/hg-cpython/src/lib.rs
Loading
Please register or sign in to comment