aboutsummaryrefslogtreecommitdiff
path: root/Cargo.toml
blob: 70508e9d90f0c1429716d0bd178e579380a265ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
[package]
name = "cxx"
version = "1.0.118"
authors = ["David Tolnay <dtolnay@gmail.com>"]
categories = ["development-tools::ffi", "api-bindings", "no-std"]
description = "Safe interop between Rust and C++"
documentation = "https://docs.rs/cxx"
edition = "2021"
exclude = ["/demo", "/gen", "/syntax", "/third-party", "/tools/buck/prelude"]
homepage = "https://cxx.rs"
keywords = ["ffi", "c++"]
license = "MIT OR Apache-2.0"
links = "cxxbridge1"
repository = "https://github.com/dtolnay/cxx"
rust-version = "1.60"

[features]
default = ["std", "cxxbridge-flags/default"] # c++11
"c++14" = ["cxxbridge-flags/c++14"]
"c++17" = ["cxxbridge-flags/c++17"]
"c++20" = ["cxxbridge-flags/c++20"]
alloc = []
std = ["alloc"]

[dependencies]
cxxbridge-macro = { version = "=1.0.118", path = "macro" }
link-cplusplus = "1.0.9"

[build-dependencies]
cc = "1.0.83"
cxxbridge-flags = { version = "=1.0.118", path = "flags", default-features = false }

[dev-dependencies]
cxx-build = { version = "=1.0.118", path = "gen/build" }
cxx-gen = { version = "0.7", path = "gen/lib" }
cxx-test-suite = { version = "0", path = "tests/ffi" }
rustversion = "1.0.13"
trybuild = { version = "1.0.81", features = ["diff"] }

[lib]
doc-scrape-examples = false

[workspace]
members = ["demo", "flags", "gen/build", "gen/cmd", "gen/lib", "macro", "tests/ffi"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]

[package.metadata.bazel]
additive_build_file_content = """
cc_library(
    name = "cxx_cc",
    srcs = ["src/cxx.cc"],
    hdrs = ["include/cxx.h"],
    include_prefix = "rust",
    includes = ["include"],
    linkstatic = True,
    strip_include_prefix = "include",
    visibility = ["//visibility:public"],
)
"""
deps = [":cxx_cc"]
extra_aliased_targets = { cxx_cc = "cxx_cc" }
gen_build_script = false

[patch.crates-io]
cxx = { path = "." }
cxx-build = { path = "gen/build" }