Skip to content

Commit 02afb5b

Browse files
author
bors-servo
authored
Auto merge of #805 - fitzgen:update-tutorial, r=emilio
Update the tutorial for the latest bindgen release This also removes old references to `libbindgen` and replaces them with `bindgen`. I renamed the repo containing the tutorial's full code, so those github links should work, and this isn't just an artifact of a blind search/replace. Part of #803
2 parents ffc529d + f37aeb3 commit 02afb5b

File tree

7 files changed

+10
-12
lines changed

7 files changed

+10
-12
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ script:
4242
after_success:
4343
- test "$TRAVIS_PULL_REQUEST" == "false" &&
4444
test "$TRAVIS_BRANCH" == "master" &&
45-
test "$BINDGEN_FEATURES" == "" &&
46-
test "$LLVM_VERSION" == "3.9.0" &&
4745
./ci/deploy-book.sh
4846

4947
notifications:

book/src/tutorial-0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ systems) on-the-fly.
99
[**TL;DR?** The full tutorial code is available here.][example]
1010

1111
[tutorial]: http://fitzgeraldnick.com/2016/12/14/using-libbindgen-in-build-rs.html
12-
[example]: https://github.com/fitzgen/libbindgen-tutorial-bzip2-sys
12+
[example]: https://github.com/fitzgen/bindgen-tutorial-bzip2-sys

book/src/tutorial-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ Declare a build-time dependency on `bindgen` by adding it to the
55

66
```toml
77
[build-dependencies]
8-
bindgen = "0.23"
8+
bindgen = "0.26.3"
99
```

book/src/tutorial-3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This can be used to generate code at compile time.
55
And of course in our case, we will be generating Rust FFI
66
bindings to `bzip2` at compile time. The resulting bindings will be written to
77
`$OUT_DIR/bindings.rs` where `$OUT_DIR` is chosen by `cargo` and is something
8-
like `./target/debug/build/libbindgen-tutorial-bzip2-sys-afc7747d7eafd720/out/`.
8+
like `./target/debug/build/bindgen-tutorial-bzip2-sys-afc7747d7eafd720/out/`.
99

1010
```rust,ignore
1111
extern crate bindgen;

book/src/tutorial-4.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ We can run `cargo build` again to check that the bindings themselves compile:
1818

1919
```bash
2020
$ cargo build
21-
Compiling libbindgen-tutorial-bzip2-sys v0.1.0
21+
Compiling bindgen-tutorial-bzip2-sys v0.1.0
2222
Finished debug [unoptimized + debuginfo] target(s) in 62.8 secs
2323
```
2424

@@ -27,7 +27,7 @@ our generated Rust FFI structs match what `bindgen` thinks they should be:
2727

2828
```bash
2929
$ cargo test
30-
Compiling libbindgen-tutorial-bzip2-sys v0.1.0
30+
Compiling bindgen-tutorial-bzip2-sys v0.1.0
3131
Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
3232
Running target/debug/deps/bzip2_sys-10413fc2af207810
3333

@@ -49,7 +49,7 @@ test bindgen_test_layout__opaque_pthread_t ... ok
4949

5050
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured
5151

52-
Doc-tests libbindgen-tutorial-bzip2-sys
52+
Doc-tests bindgen-tutorial-bzip2-sys
5353

5454
running 0 tests
5555

book/src/tutorial-5.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ properly!
114114

115115
```bash
116116
$ cargo test
117-
Compiling libbindgen-tutorial-bzip2-sys v0.1.0
117+
Compiling bindgen-tutorial-bzip2-sys v0.1.0
118118
Finished debug [unoptimized + debuginfo] target(s) in 0.54 secs
119-
Running target/debug/deps/libbindgen_tutorial_bzip2_sys-1c5626bbc4401c3a
119+
Running target/debug/deps/bindgen_tutorial_bzip2_sys-1c5626bbc4401c3a
120120

121121
running 15 tests
122122
test bindgen_test_layout___darwin_pthread_handler_rec ... ok
@@ -161,7 +161,7 @@ test tests::round_trip_compression_decompression ... ok
161161

162162
test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured
163163

164-
Doc-tests libbindgen-tutorial-bzip2-sys
164+
Doc-tests bindgen-tutorial-bzip2-sys
165165

166166
running 0 tests
167167

book/src/tutorial-6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Check out the [full code on Github!][example]
1010

1111
[bz-sys]: https://crates.io/crates/bzip2-sys
1212
[bz]: https://crates.io/crates/bzip2
13-
[example]: https://github.com/fitzgen/libbindgen-tutorial-bzip2-sys
13+
[example]: https://github.com/fitzgen/bindgen-tutorial-bzip2-sys

0 commit comments

Comments
 (0)