Skip to content

Commit

Permalink
Add package name to example Cargo.toml (#290)
Browse files Browse the repository at this point in the history
This commit adds a `[package] name = "..."` entry to the example `Cargo.toml` file in the `Swift Packages` chapter of the book.

This prevents the example crate from being interpreted as a virtual manifest.
This is important because a Cargo virtual manifest cannot have a `[lib]` section.
  • Loading branch information
setoelkahfi committed Aug 26, 2024
1 parent 9cfb0aa commit 0698b41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions book/src/building/swift-packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ mkdir my-rust-lib && cd my-rust-lib
```toml
# Cargo.toml

[package]
name = "my-rust-lib"

[lib]
crate-type = ["staticlib"]

Expand Down

0 comments on commit 0698b41

Please sign in to comment.