File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ $ cxxbridge src/bridge.rs --header > path/to/bridge.rs.h
15
15
$ cxxbridge src/bridge.rs > path/to/bridge.rs.cc
16
16
```
17
17
18
+ <div class =" warning " >
19
+
20
+ ** Important:** The version number of ` cxxbridge-cmd ` used for the C++ side of
21
+ the binding must always be identical to the version number of ` cxx ` used for the
22
+ Rust side. You must use some form of lockfile or version pinning to ensure that
23
+ this is the case.
24
+
25
+ </div >
26
+
18
27
The CXX repo maintains working [ Bazel] ` BUILD.bazel ` and [ Buck2] ` BUCK ` targets
19
28
for the complete blobstore tutorial (chapter 3) for your reference, tested in
20
29
CI. These aren't meant to be directly what you use in your codebase, but serve
Original file line number Diff line number Diff line change @@ -36,6 +36,16 @@ But the C++ side of the bindings needs to be generated. Your options are:
36
36
- Or, build your own code generator frontend on top of the [ cxx-gen] crate. This
37
37
is currently unofficial and unsupported.
38
38
39
+ <div class =" warning " >
40
+
41
+ ** Important:** The Rust side and C++ side of a binding must always be created
42
+ using the same release of CXX. If using ` cxxbridge-cmd ` for the C++ side, the
43
+ version number of ` cxxbridge-cmd ` must be identical to the version number of
44
+ ` cxx ` used for the Rust side. If using ` cxx-gen ` for the C++ side, its patch
45
+ number must be identical to the patch number of ` cxx ` .
46
+
47
+ </div >
48
+
39
49
[ cxx-gen ] : https://docs.rs/cxx-gen
40
50
41
51
### Compiling C++
You can’t perform that action at this time.
0 commit comments