🚨 Fix compilation warning about bin name conflict. (#50)

* 🚨 Fix compilation warning about lib/bin name conflict.

* 📝 Update `README.md` instructions for binary name.
This commit is contained in:
Thomas Ramirez 2022-04-03 21:09:13 +02:00 committed by GitHub
parent bdc11d8007
commit ed07d0a1ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -1,5 +1,6 @@
[package]
name = "eframe_template"
default-run = "eframe_template_bin"
version = "0.1.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
edition = "2021"
@ -7,6 +8,10 @@ rust-version = "1.56"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]
name = "eframe_template_bin"
path = "src/main.rs"
[lib]
crate-type = ["cdylib", "rlib"]

View file

@ -15,7 +15,10 @@ Start by clicking "Use this template" at https://github.com/emilk/eframe_templat
Change the name of the crate: Chose a good name for your project, and change the name to it in:
* `Cargo.toml`
* Update the `name` and `authors`
* Change the `package.name` from `eframe_template` to `your_crate`
* Change the `package.authors`
* Change the `package.default-run` from `eframe_template_bin` to `your_crate_bin` (note the `_bin`!)
* Change the `bin.name` from `eframe_template_bin` to `your_crate_bin` (note the `_bin`!)
* `main.rs`
* Change the `let app =…` line from `eframe_template::TemplateApp` to `your_crate::TemplateApp`
* `docs/index.html`