Skip to content

Commit

Permalink
update dependencies, and support LLVM 13
Browse files Browse the repository at this point in the history
  • Loading branch information
cdisselkoen committed Oct 21, 2021
1 parent cf647be commit 8769c18
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords = ["symbolic", "llvm", "IR", "SMT"]
license = "MIT"

[dependencies]
llvm-ir = "0.8.0"
llvm-ir = "0.8.1"
boolector = "0.4.2"
either = "1.6"
itertools = "0.10"
Expand All @@ -22,7 +22,7 @@ log = "0.4.8"
rustversion = "1.0"

[dev-dependencies]
env_logger = "0.8"
env_logger = "0.9"

[features]
# Select the LLVM version to be compatible with.
Expand All @@ -31,6 +31,7 @@ llvm-9 = ["llvm-ir/llvm-9", "llvm-9-or-lower", "llvm-9-or-greater"]
llvm-10 = ["llvm-ir/llvm-10", "llvm-10-or-lower", "llvm-10-or-greater"]
llvm-11 = ["llvm-ir/llvm-11", "llvm-11-or-lower", "llvm-11-or-greater"]
llvm-12 = ["llvm-ir/llvm-12", "llvm-12-or-lower", "llvm-12-or-greater"]
llvm-13 = ["llvm-ir/llvm-13", "llvm-13-or-lower", "llvm-13-or-greater"]

# If you enable this, Cargo will automatically download and build Boolector as
# part of the build process. If you don't enable this, Cargo will look for a
Expand All @@ -45,11 +46,13 @@ llvm-9-or-greater = []
llvm-10-or-greater = ["llvm-9-or-greater"]
llvm-11-or-greater = ["llvm-10-or-greater"]
llvm-12-or-greater = ["llvm-11-or-greater"]
llvm-13-or-greater = ["llvm-12-or-greater"]

llvm-9-or-lower = ["llvm-10-or-lower"]
llvm-10-or-lower = ["llvm-11-or-lower"]
llvm-11-or-lower = ["llvm-12-or-lower"]
llvm-12-or-lower = []
llvm-12-or-lower = ["llvm-13-or-lower"]
llvm-13-or-lower = []
###

# These features select the corresponding LLVM version, and require an exact
Expand All @@ -59,6 +62,7 @@ llvm-9-strict = ["llvm-9", "llvm-ir/llvm-9-strict"]
llvm-10-strict = ["llvm-10", "llvm-ir/llvm-10-strict"]
llvm-11-strict = ["llvm-11", "llvm-ir/llvm-11-strict"]
llvm-12-strict = ["llvm-12", "llvm-ir/llvm-12-strict"]
llvm-13-strict = ["llvm-13", "llvm-ir/llvm-13-strict"]

[package.metadata.docs.rs]
# Generate docs.rs documentation with the llvm-10 feature
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ to the LLVM version you want:
haybale = { version = "0.7.0", features = ["llvm-12"] }
```

Currently, the supported LLVM versions are `llvm-9`, `llvm-10`, `llvm-11`, and
`llvm-12`.
The latest crates.io release (0.7.0) supports LLVM versions `llvm-9`, `llvm-10`,
`llvm-11`, and `llvm-12`.
The Git version you're looking at also supports `llvm-13`.

`haybale` depends (indirectly) on the LLVM and Boolector libraries.
* LLVM must be available on your system, in the version which matches the
Expand Down Expand Up @@ -288,6 +289,8 @@ or of course you can generate local documentation with `cargo doc --open`.
Currently, the official crates.io releases of `haybale` (`0.7.0` and later)
depend on Boolector 3.2.1 and either LLVM 9, 10, 11, or 12, depending on whether
you select the `llvm-9`, `llvm-10`, `llvm-11`, or `llvm-12` feature.
The Git version you're looking at also supports LLVM 13 via the `llvm-13`
feature.
As of this writing, choosing an LLVM version has essentially no effect
on `haybale`'s features or interface; the only difference is the ability to
analyze bitcode generated with newer LLVMs. (And the LLVM 10+ versions
Expand All @@ -301,9 +304,7 @@ backported features.

LLVM 7 and earlier are not supported.

`haybale` works on stable Rust. LLVM 9 and 10 users need Rust 1.43 or later,
while LLVM 11 and 12 users need Rust 1.44 or later instead, due to requirements
of `llvm-ir`.
`haybale` works on stable Rust, and requires Rust 1.45 or later.

## Under the hood

Expand Down
4 changes: 2 additions & 2 deletions refresh-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Requires ghp-import to be installed (e.g. via pip3)

rm -rf target/doc && # purge old docs that may include docs for deps
cargo doc --no-deps --features=llvm-11 && # document just this crate
cargo doc --no-deps --features=llvm-13 && # document just this crate
echo "<meta http-equiv=refresh content=0;url=haybale/index.html>" > target/doc/index.html && # put in the top-level redirect
ghp-import -np target/doc && # publish to gh-pages branch
rm -rf target/doc && # kill the docs that were just this crate
cargo doc --features=llvm-11 # regenerate all docs (including deps) for local use
cargo doc --features=llvm-13 # regenerate all docs (including deps) for local use

0 comments on commit 8769c18

Please sign in to comment.