Skip to content

Commit

Permalink
Document crate-type lib requirement for generate-sources (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
kriswuollett authored Sep 4, 2023
1 parent 0c5829a commit 5976546
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ edition = "2021"
crate-type = [
"staticlib", # Ensure it gets compiled as a (static) C library
# "cdylib", # If you want a shared/dynamic C library (advanced)
"lib", # For downstream Rust dependents: `examples/`, `tests/` etc.
"lib", # For `generate-headers` and other downstream rust dependents
# such as integration `tests/`, doctests, and `examples/`
]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion guide/src/introduction/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ edition = "2021"
crate-type = [
"staticlib", # Ensure it gets compiled as a (static) C library
# "cdylib", # If you want a shared/dynamic C library (advanced)
"lib", # For downstream Rust dependents: `examples/`, `tests/` etc.
"lib", # For `generate-headers`, `examples/`, `tests/` etc.
]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion guide/src/usage/cargo-toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ crate-type = [
"cdylib", # If you want a shared/dynamic C library (advanced)
# `target/{debug,release}/libcrate_name.{so,dylib}`

"lib", # For downstream Rust dependents: `examples/`, `tests/` etc.
"lib", # For `generate-headers`, `examples/`, `tests/` etc.
]
```

Expand Down

0 comments on commit 5976546

Please sign in to comment.