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.
14 lines
357 B
Rust
14 lines
357 B
Rust
// Copyright 2022 System76 <info@system76.com>
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
use cosmic::{iced::Application, settings};
|
|
|
|
mod window;
|
|
pub use window::*;
|
|
|
|
pub fn main() -> cosmic::iced::Result {
|
|
settings::set_default_icon_theme("Pop");
|
|
let mut settings = settings();
|
|
settings.window.min_size = Some((600, 300));
|
|
Window::run(settings)
|
|
}
|