rust/hg-cpython/Cargo.toml
author Raphaël Gomès <rgomes@octobus.net>
Thu, 16 Jan 2020 13:34:04 +0100
changeset 44305 d8d4fa9a7f18
parent 44231 25ed4d8e707f
child 44540 82f51ab7a2dd
permissions -rw-r--r--
rust-re2: add wrapper for calling Re2 from Rust This assumes that Re2 is installed following Google's guide. I am not sure how we want to integrate it in the project, but I think a follow-up patch would be more appropriate for such work. As it stands, *not* having Re2 installed results in a compilation error, which is a problem as it breaks install compatibility. Hence, this is gated behind a non-default `with-re2` compilation feature. Differential Revision: https://phab.mercurial-scm.org/D7910

[package]
name = "hg-cpython"
version = "0.1.0"
authors = ["Georges Racinet <gracinet@anybox.fr>"]
edition = "2018"

[lib]
name='rusthg'
crate-type = ["cdylib"]

[features]
default = ["python27"]
with-re2 = ["hg-core/with-re2"]

# Features to build an extension module:
python27 = ["cpython/python27-sys", "cpython/extension-module-2-7"]
python3 = ["cpython/python3-sys", "cpython/extension-module"]

# Enable one of these features to build a test executable linked to libpython:
# e.g. cargo test --no-default-features --features python27-bin
python27-bin = ["cpython/python27-sys"]
python3-bin = ["cpython/python3-sys"]

[dependencies]
hg-core = { path = "../hg-core"}
libc = '*'

[dependencies.cpython]
version = "0.4"
default-features = false