Make example runnable as example
Trying to run examples as usual (and as described in the README) fails:
> cargo run --release --example cosmic
error: no example target named `cosmic`.
The examples themselves are written as separate crates, and are
therefore not usable as examples (they also won't build via `cargo build
--examples`).
This commit makes the example fit the style that cargo can understand.
That is:
- Don't declare the example as a separate crate.
- Remove the nested `src` inside the example directory.
- Put example-only dependencies in dev-dependencies
No rust code was modified, files were only moved.
This commit is contained in:
parent
e3ec7e3b7d
commit
6ce9f4fc7a
12 changed files with 3 additions and 14 deletions
|
|
@ -74,10 +74,12 @@ optional = true
|
||||||
path = "iced/glow"
|
path = "iced/glow"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
once_cell = "1.15"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
"examples/*",
|
|
||||||
]
|
]
|
||||||
exclude = [
|
exclude = [
|
||||||
"iced",
|
"iced",
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "cosmic"
|
|
||||||
version = "0.1.0"
|
|
||||||
authors = []
|
|
||||||
edition = "2021"
|
|
||||||
publish = false
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
apply = "0.3.0"
|
|
||||||
fraction = "0.13.0"
|
|
||||||
libcosmic = { path = "../..", default-features = false, features = ["debug", "winit_softbuffer"] }
|
|
||||||
once_cell = "1.15"
|
|
||||||
slotmap = "1.0.6"
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue