rust/hg-cpython/Cargo.toml
author Georges Racinet <georges.racinet@octobus.net>
Fri, 27 Oct 2023 22:11:05 +0200
changeset 51239 7eea2e4109ae
parent 49638 5844cd8e81ca
permissions -rw-r--r--
rust-index: using the `hg::index::Index` in ancestors iterator and lazy set Since there is no Rust implementation for REVLOGV2/CHANGELOGv2, we declare them to be incompatible with Rust, hence indexes in these formats will use the implementations from Python `mercurial.ancestor`. If this is an unacceptable performance hit for current users of these formats, we can later on add Rust implementations based on the C index for them or implement these formats for the Rust indexes. Among the challenges that we had to meet, we wanted to avoid taking the GIL each time the inner (vcsgraph) iterator has to call the parents function. This would probably still be acceptable in terms of performance with `AncestorsIterator`, but not with `LazyAncestors` nor for the upcoming change in `MissingAncestors`. Hence we enclose the reference to the index in a `PySharedRef`, leading to more rigourous checking of mutations, which does pass now that there no logically immutable methods of `hg::index::Index` that take a mutable reference as input.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40965
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
     1
[package]
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
     2
name = "hg-cpython"
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
     3
version = "0.1.0"
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
     4
authors = ["Georges Racinet <gracinet@anybox.fr>"]
49629
1b6be761c23d rust: move all crates in the main workspace to edition 2021
Raphaël Gomès <rgomes@octobus.net>
parents: 48954
diff changeset
     5
edition = "2021"
40965
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
     6
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
     7
[lib]
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
     8
name='rusthg'
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
     9
crate-type = ["cdylib"]
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
    10
5532823e8c18 rust-cpython: start cpython crate bindings
Georges Racinet <gracinet@anybox.fr>
parents:
diff changeset
    11
[dependencies]
49638
5844cd8e81ca hg-cpython: upgrade dependencies
Raphaël Gomès <rgomes@octobus.net>
parents: 49629
diff changeset
    12
cpython = { version = "0.7.1", features = ["extension-module"] }
5844cd8e81ca hg-cpython: upgrade dependencies
Raphaël Gomès <rgomes@octobus.net>
parents: 49629
diff changeset
    13
crossbeam-channel = "0.5.6"
44305
d8d4fa9a7f18 rust-re2: add wrapper for calling Re2 from Rust
Raphaël Gomès <rgomes@octobus.net>
parents: 44231
diff changeset
    14
hg-core = { path = "../hg-core"}
49638
5844cd8e81ca hg-cpython: upgrade dependencies
Raphaël Gomès <rgomes@octobus.net>
parents: 49629
diff changeset
    15
libc = "0.2.137"
5844cd8e81ca hg-cpython: upgrade dependencies
Raphaël Gomès <rgomes@octobus.net>
parents: 49629
diff changeset
    16
log = "0.4.17"
5844cd8e81ca hg-cpython: upgrade dependencies
Raphaël Gomès <rgomes@octobus.net>
parents: 49629
diff changeset
    17
env_logger = "0.9.3"
47954
4afd6cc447b9 rust: Make OwningDirstateMap generic and move it into hg-core
Simon Sapin <simon.sapin@octobus.net>
parents: 47520
diff changeset
    18
stable_deref_trait = "1.2.0"
48517
99a0b5422cf5 rust: add vcsgraph crate as dependency
pacien <pacien.trangirard@pacien.net>
parents: 48197
diff changeset
    19
vcsgraph = "0.2.0"