Skip to content

Commit

Permalink
Revise feature configurations, test targets; remove Harfbuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed May 20, 2024
1 parent 689080f commit 1827320
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
- name: Build docs
run: |
cargo doc --all --no-deps
cargo doc --all-features --all --no-deps
cargo doc --features nightly --all --no-deps
- name: Test kas-macros
run: |
cargo test --manifest-path crates/kas-macros/Cargo.toml
cargo test --manifest-path crates/kas-macros/Cargo.toml --all-features
- name: Test kas-core
run: |
cargo test --manifest-path crates/kas-core/Cargo.toml --features winit,x11
cargo test --manifest-path crates/kas-core/Cargo.toml --all-features
cargo test --manifest-path crates/kas-core/Cargo.toml --features minimal
cargo test --manifest-path crates/kas-core/Cargo.toml --features nightly
- name: Test kas-widgets
run: |
cargo test --manifest-path crates/kas-widgets/Cargo.toml --features kas/winit,kas/wayland
Expand All @@ -55,9 +55,9 @@ jobs:
cargo test --manifest-path crates/kas-dylib/Cargo.toml --features kas-core/winit,kas-core/wayland
cargo test --manifest-path crates/kas-dylib/Cargo.toml --all-features --features kas-core/winit,kas-core/x11
- name: Test kas
run: |
cargo test
cargo test --all-features
run: cargo test --features nightly
- name: Test kas (experimental)
run: cargo test --features nightly,experimental
- name: Test examples/mandlebrot
run: cargo test --manifest-path examples/mandlebrot/Cargo.toml

Expand Down
13 changes: 6 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ rustdoc-args = ["--cfg", "doc_cfg"]
# markdown, resvg. Recommended also: clipboard, yaml (or some config format).
minimal = ["wgpu", "winit", "wayland"]
# All recommended features for optimal experience
default = ["minimal", "x11", "view", "image", "resvg", "clipboard", "markdown", "shaping", "spawn"]
default = ["minimal", "view", "image", "resvg", "clipboard", "markdown", "shaping", "spawn"]
# All standard test target features
# NOTE: dynamic is excluded due to linker problems on Windows
stable = ["default", "serde", "toml", "yaml", "json", "ron", "macros_log"]
# Enables "recommended" unstable features
nightly = ["min_spec"]
stable = ["default", "x11", "serde", "toml", "yaml", "json", "ron", "macros_log"]
# Enables all "recommended" features for nightly rustc
nightly = ["stable", "min_spec"]
# Additional, less recommendation-worthy features
experimental = ["dark-light", "recursive-layout-widgets", "unsafe_node"]

# Enable dynamic linking (faster linking via an extra run-time dependency):
dynamic = ["dep:kas-dylib"]
Expand Down Expand Up @@ -66,8 +67,6 @@ markdown = ["kas-core/markdown"]

# Enable text shaping
shaping = ["kas-core/shaping"]
# Alternative: use Harfbuzz library for shaping
harfbuzz = ["kas-core/harfbuzz"]

# Enable serde support (mainly config read/write)
serde = ["kas-core/serde"]
Expand Down
13 changes: 9 additions & 4 deletions crates/kas-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ features = ["stable"]
rustdoc-args = ["--cfg", "doc_cfg"]

[features]
# All features usable on stable rust
stable = ["winit", "x11", "wayland", "markdown", "yaml", "json", "ron", "shaping", "clipboard", "spawn", "dark-light", "serde"]
# The minimal feature set needed to build basic applications (with assumptions
# about target platforms).
minimal = ["winit", "wayland"]
# All standard test target features
stable = ["minimal", "clipboard", "markdown", "shaping", "spawn", "x11", "serde", "toml", "yaml", "json", "ron", "macros_log"]
# Enables all "recommended" features for nightly rustc
nightly = ["stable"]
# Additional, less recommendation-worthy features
experimental = ["dark-light", "recursive-layout-widgets", "unsafe_node"]

# Use full specialization
spec = []
Expand All @@ -34,8 +41,6 @@ markdown = ["kas-text/markdown"]

# Enable text shaping
shaping = ["kas-text/shaping"]
# Alternative: use Harfbuzz library for shaping
harfbuzz = ["kas-text/harfbuzz"]

# Enable support for YAML (de)serialisation
yaml = ["serde", "dep:serde_yaml"]
Expand Down

0 comments on commit 1827320

Please sign in to comment.