##// END OF EJS Templates
rust-index: add a struct wrapping the C index...
rust-index: add a struct wrapping the C index Implementing the full index logic in one go is journey larger than we would like. To achieve a smoother transition, we start with a simple Rust wrapper that delegates allwork to the current C implementation. Once we will have a fully working index object in Rust, we can easily start using more and more Rust Code with it. The object in this patch is functional and tested. However, multiple of the currently existing rust (in the `hg-cpython` crate) requires a `Graph`. Right now we build this `Graph` (as cindex::Index) using the C index passed as a PyObject. They will have to be updated to be made compatible. Differential Revision: https://phab.mercurial-scm.org/D7655

File last commit:

r40336:72b94f94 default
r44413:b69d5f3a default
Show More
lib.rs
19 lines | 609 B | application/rls-services+xml | RustLexer
// Copyright 2018 Georges Racinet <gracinet@anybox.fr>
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
//! Bindings for CPython extension code
//!
//! This exposes methods to build and use a `rustlazyancestors` iterator
//! from C code, using an index and its parents function that are passed
//! from the caller at instantiation.
extern crate hg;
extern crate libc;
mod ancestors;
pub use ancestors::{
rustlazyancestors_contains, rustlazyancestors_drop,
rustlazyancestors_init, rustlazyancestors_next,
};