chore: no default features
This commit is contained in:
parent
796fe3c1a9
commit
18debe546d
3 changed files with 22 additions and 9 deletions
|
|
@ -7,7 +7,6 @@ edition = "2021"
|
||||||
name = "cosmic"
|
name = "cosmic"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["wayland", "tokio"]
|
|
||||||
# Accessibility support
|
# Accessibility support
|
||||||
a11y = ["iced/a11y", "iced_accessibility"]
|
a11y = ["iced/a11y", "iced_accessibility"]
|
||||||
# Builds support for animated images
|
# Builds support for animated images
|
||||||
|
|
@ -121,6 +120,5 @@ exclude = [
|
||||||
"iced",
|
"iced",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
[patch."https://github.com/pop-os/libcosmic"]
|
[patch."https://github.com/pop-os/libcosmic"]
|
||||||
libcosmic = { path = "./", features = ["wayland", "tokio", "a11y"]}
|
libcosmic = { path = "./" }
|
||||||
|
|
|
||||||
19
justfile
19
justfile
|
|
@ -1,13 +1,20 @@
|
||||||
projects := 'application cosmic cosmic_sctk design open_dialog'
|
examples := 'application cosmic cosmic_sctk design open_dialog'
|
||||||
|
|
||||||
# Check for errors and linter warnings
|
# Check for errors and linter warnings
|
||||||
check *args:
|
check *args: (check-wayland args) (check-winit args) (check-examples args)
|
||||||
cargo clippy --no-deps {{args}} -- -W clippy::pedantic
|
|
||||||
cargo clippy --no-deps --no-default-features --features="winit,tokio" {{args}} -- -W clippy::pedantic
|
check-examples *args:
|
||||||
for project in {{projects}}; do \
|
#!/bin/bash
|
||||||
cargo check -p ${project}; \
|
for project in {{examples}}; do
|
||||||
|
cargo check -p ${project} {{args}}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
check-wayland *args:
|
||||||
|
cargo clippy --no-deps --features="wayland,tokio" {{args}} -- -W clippy::pedantic
|
||||||
|
|
||||||
|
check-winit *args:
|
||||||
|
cargo clippy --no-deps --features="winit,tokio" {{args}} -- -W clippy::pedantic
|
||||||
|
|
||||||
# Runs a check with JSON message format for IDE integration
|
# Runs a check with JSON message format for IDE integration
|
||||||
check-json: (check '--message-format=json')
|
check-json: (check '--message-format=json')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,12 @@
|
||||||
|
|
||||||
#![allow(clippy::module_name_repetitions)]
|
#![allow(clippy::module_name_repetitions)]
|
||||||
|
|
||||||
|
#[cfg(all(not(feature = "wayland"), not(feature = "winit")))]
|
||||||
|
compile_error!("must define `wayland` or `winit` feature");
|
||||||
|
|
||||||
|
#[cfg(all(feature = "wayland", feature = "winit"))]
|
||||||
|
compile_error!("cannot use `wayland` feature with `winit");
|
||||||
|
|
||||||
/// Recommended default imports.
|
/// Recommended default imports.
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use crate::ext::*;
|
pub use crate::ext::*;
|
||||||
|
|
@ -55,3 +61,5 @@ pub mod widget;
|
||||||
|
|
||||||
pub type Renderer = iced::Renderer<Theme>;
|
pub type Renderer = iced::Renderer<Theme>;
|
||||||
pub type Element<'a, Message> = iced::Element<'a, Message, Renderer>;
|
pub type Element<'a, Message> = iced::Element<'a, Message, Renderer>;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue