Skip to content

Commit ee9dbf4

Browse files
committed
Add instructions on building the Rust API to COMPILING.md
1 parent f1fd989 commit ee9dbf4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

COMPILING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,3 +562,29 @@ then run make as follows.
562562
cd unit
563563
make test
564564
```
565+
566+
## Rust API
567+
568+
CBMC is now offering a [Rust API](src/libcprover-rust/). To build that along with
569+
CBMC, you need two things:
570+
571+
- Rust/Cargo, instructions the installation of which can be found [here](https://www.rust-lang.org/tools/install), and
572+
- CMake (the Rust API doesn't support being built with `Make` yet)
573+
574+
Provided these two are available, you can perform a CBMC build *including*
575+
the Rust API by passing in the option `WITH_RUST_API` to `CMake` like this:
576+
577+
```sh
578+
$ cmake -S. -Bbuild -DWITH_RUST_API=ON <other_options>
579+
[...]
580+
-- Rust Target: aarch64-apple-darwin
581+
-- Found Rust: /opt/homebrew/bin/rustc (found version "1.66.1")
582+
-- Using Corrosion as a subdirectory
583+
-- Configuring done
584+
-- Generating done
585+
-- Build files have been written to: cbmc/build
586+
```
587+
588+
If you come across any issues during the configuration or the build of the Rust API,
589+
please let us know by filing a [bug report](https://github.com/diffblue/cbmc/issues/new)
590+
and mark it with the label `Rust API` if possible.

0 commit comments

Comments
 (0)