Merge pull request #2134 from iced-rs/fix/widget-crate
Fix standalone compilation of `iced_renderer` crate
This commit is contained in:
commit
217cbce8a1
3 changed files with 31 additions and 20 deletions
29
.github/workflows/check.yml
vendored
Normal file
29
.github/workflows/check.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: Check
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
widget:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: hecrj/setup-rust-action@v1
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Check standalone `iced_widget` crate
|
||||||
|
run: cargo check --package iced_widget --features image,svg,canvas
|
||||||
|
|
||||||
|
wasm:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: --cfg=web_sys_unstable_apis
|
||||||
|
steps:
|
||||||
|
- uses: hecrj/setup-rust-action@v1
|
||||||
|
with:
|
||||||
|
rust-version: stable
|
||||||
|
targets: wasm32-unknown-unknown
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Run checks
|
||||||
|
run: cargo check --package iced --target wasm32-unknown-unknown
|
||||||
|
- name: Check compilation of `tour` example
|
||||||
|
run: cargo build --package tour --target wasm32-unknown-unknown
|
||||||
|
- name: Check compilation of `todos` example
|
||||||
|
run: cargo build --package todos --target wasm32-unknown-unknown
|
||||||
|
- name: Check compilation of `integration` example
|
||||||
|
run: cargo build --package integration --target wasm32-unknown-unknown
|
||||||
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
name: Test
|
name: Test
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
native:
|
all:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -22,22 +22,3 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cargo test --verbose --workspace
|
cargo test --verbose --workspace
|
||||||
cargo test --verbose --workspace --all-features
|
cargo test --verbose --workspace --all-features
|
||||||
|
|
||||||
web:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
RUSTFLAGS: --cfg=web_sys_unstable_apis
|
|
||||||
steps:
|
|
||||||
- uses: hecrj/setup-rust-action@v1
|
|
||||||
with:
|
|
||||||
rust-version: stable
|
|
||||||
targets: wasm32-unknown-unknown
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- name: Run checks
|
|
||||||
run: cargo check --package iced --target wasm32-unknown-unknown
|
|
||||||
- name: Check compilation of `tour` example
|
|
||||||
run: cargo build --package tour --target wasm32-unknown-unknown
|
|
||||||
- name: Check compilation of `todos` example
|
|
||||||
run: cargo build --package todos --target wasm32-unknown-unknown
|
|
||||||
- name: Check compilation of `integration` example
|
|
||||||
run: cargo build --package integration --target wasm32-unknown-unknown
|
|
||||||
|
|
|
||||||
|
|
@ -252,6 +252,7 @@ impl<T> crate::graphics::geometry::Renderer for Renderer<T> {
|
||||||
crate::Geometry::TinySkia(primitive) => {
|
crate::Geometry::TinySkia(primitive) => {
|
||||||
renderer.draw_primitive(primitive);
|
renderer.draw_primitive(primitive);
|
||||||
}
|
}
|
||||||
|
#[cfg(feature = "wgpu")]
|
||||||
crate::Geometry::Wgpu(_) => unreachable!(),
|
crate::Geometry::Wgpu(_) => unreachable!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue