Skip to content

Commit

Permalink
web: Make jpegxr optional on web but enabled by default by CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Oct 15, 2023
1 parent d2541a7 commit 5e3bd48
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ jobs:
env:
BUILD_ID: ${{ github.run_number }}
# Build web demo with WebGPU support for testing in Chrome origin trial on ruffle.rs
CARGO_FEATURES: ${{ matrix.demo && 'webgpu' || '' }}
CARGO_FEATURES: jpegxr${{ matrix.demo && ',webgpu' || '' }}
FIREFOX_EXTENSION_ID: ${{ secrets.FIREFOX_EXTENSION_ID }} # Needed to inject into manifest.json
working-directory: web
shell: bash -l {0}
Expand Down
3 changes: 2 additions & 1 deletion web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ publish = false # This crate is useless alone, people should use the npm package
crate-type = ["cdylib", "rlib"]

[features]
default = ["canvas", "console_error_panic_hook", "webgl", "wgpu-webgl", "ruffle_core/jpegxr"]
default = ["canvas", "console_error_panic_hook", "webgl", "wgpu-webgl"]

# core features
avm_debug = ["ruffle_core/avm_debug"]
lzma = ["ruffle_core/lzma"]
jpegxr = ["ruffle_core/jpegxr"]

# web features
canvas = ["ruffle_render_canvas"]
Expand Down
1 change: 1 addition & 0 deletions web/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ ENV PATH="/root/.cargo/bin:$PATH"
RUN cargo install wasm-bindgen-cli --version 0.2.87
COPY . ruffle
WORKDIR ruffle/web
ENV CARGO_FEATURES=jpegxr
RUN npm install --omit=optional
RUN npm run build:repro

0 comments on commit 5e3bd48

Please sign in to comment.