1[package]
2name = "cxx"
3version = "1.0.119"
4authors = ["David Tolnay <[email protected]>"]
5categories = ["development-tools::ffi", "api-bindings", "no-std"]
6description = "Safe interop between Rust and C++"
7documentation = "https://docs.rs/cxx"
8edition = "2021"
9exclude = ["/demo", "/gen", "/syntax", "/third-party", "/tools/buck/prelude"]
10homepage = "https://cxx.rs"
11keywords = ["ffi", "c++"]
12license = "MIT OR Apache-2.0"
13links = "cxxbridge1"
14repository = "https://github.com/dtolnay/cxx"
15rust-version = "1.60"
16
17[features]
18default = ["std", "cxxbridge-flags/default"] # c++11
19"c++14" = ["cxxbridge-flags/c++14"]
20"c++17" = ["cxxbridge-flags/c++17"]
21"c++20" = ["cxxbridge-flags/c++20"]
22alloc = []
23std = ["alloc"]
24
25[dependencies]
26cxxbridge-macro = { version = "=1.0.119", path = "macro" }
27link-cplusplus = "1.0.9"
28
29[build-dependencies]
30cc = "1.0.83"
31cxxbridge-flags = { version = "=1.0.119", path = "flags", default-features = false }
32
33[dev-dependencies]
34cxx-build = { version = "=1.0.119", path = "gen/build" }
35cxx-gen = { version = "0.7", path = "gen/lib" }
36cxx-test-suite = { version = "0", path = "tests/ffi" }
37rustversion = "1.0.13"
38trybuild = { version = "1.0.81", features = ["diff"] }
39
40[lib]
41doc-scrape-examples = false
42
43[workspace]
44members = ["demo", "flags", "gen/build", "gen/cmd", "gen/lib", "macro", "tests/ffi"]
45
46[package.metadata.docs.rs]
47targets = ["x86_64-unknown-linux-gnu"]
48rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]
49
50[package.metadata.bazel]
51additive_build_file_content = """
52cc_library(
53    name = "cxx_cc",
54    srcs = ["src/cxx.cc"],
55    hdrs = ["include/cxx.h"],
56    include_prefix = "rust",
57    includes = ["include"],
58    linkstatic = True,
59    strip_include_prefix = "include",
60    visibility = ["//visibility:public"],
61)
62"""
63deps = [":cxx_cc"]
64extra_aliased_targets = { cxx_cc = "cxx_cc" }
65gen_build_script = false
66
67[patch.crates-io]
68cxx = { path = "." }
69cxx-build = { path = "gen/build" }
70