Skip to content

Commit

Permalink
quickstart remove compile error (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
kriswuollett authored Sep 11, 2023
1 parent f0b5619 commit 0029467
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ crate-type = [
# such as integration `tests/`, doctests, and `examples/`
]

[[bin]]
name = "generate-headers"
required-features = ["headers"] # Do not build unless generating headers.

[dependencies]
# Use `cargo add` or `cargo search` to find the latest values of x.y.z.
# For instance:
Expand Down
4 changes: 4 additions & 0 deletions guide/src/introduction/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ crate-type = [
"lib", # For `generate-headers`, `examples/`, `tests/` etc.
]

[[bin]]
name = "generate-headers"
required-features = ["headers"] # Do not build unless generating headers.

[dependencies]
# Use `cargo add` or `cargo search` to find the latest values of x.y.z.
# For instance:
Expand Down
12 changes: 0 additions & 12 deletions guide/src/usage/lib-rs.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ file(name), or into the given `Write`-able / "write sink":

to generate the headers.

- You may also want to add:

```toml
# Cargo.toml
[[bin]]
name = "generate-headers"
required-features = ["headers"]
```

to your `Cargo.toml` to improve the error messages when the feature is
missing.

<details>
<summary>More advanced example (runtime-dependent header output)</summary>

Expand Down

0 comments on commit 0029467

Please sign in to comment.