Skip to content

Conversation

@vmarcella
Copy link
Member

@vmarcella vmarcella commented Jan 25, 2026

Summary

This PR removes the shaderc shader compilation backend from the codebase, simplifying the build process and reducing external dependencies. The naga backend is now the sole shader compilation backend for lambda.

Related Issues

Changes

  • Removed shaderc dependency and its build-from-source feature flags
  • Removed shaderc_backend.rs implementation file
  • Removed cmake and ninja as required external dependencies
  • Simplified shader module exports to only use naga backend
  • Updated documentation to reflect the simplified dependencies

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (updates to docs, specs, tutorials, or comments)
  • Refactor (code change that neither fixes a bug nor adds a feature)
  • Performance (change that improves performance)
  • Test (adding or updating tests)
  • Build/CI (changes to build process or CI configuration)

Affected Crates

  • lambda-rs
  • lambda-rs-platform
  • lambda-rs-args
  • lambda-rs-logging
  • Other:

Checklist

  • Code follows the repository style guidelines (cargo +nightly fmt --all)
  • Code passes clippy (cargo clippy --workspace --all-targets -- -D warnings)
  • Tests pass (cargo test --workspace)
  • New code includes appropriate documentation
  • Public API changes are documented
  • Breaking changes are noted in this PR description

Testing

Commands run:

cargo build --workspace
cargo test --workspace

Manual verification steps (if applicable):

  1. Verify shader compilation still works with naga backend
  2. Run existing examples that use shaders (e.g., cargo run --example triangle)

Screenshots/Recordings

Platform Testing

  • macOS
  • Windows
  • Linux

Additional Notes

Breaking Changes

Users who were explicitly using the following feature flags will need to update their configurations:

  • with-shaderc - No longer available
  • with-shaderc-build-from-source - No longer available
  • shader-backend-shaderc - No longer available
  • shader-backend-shaderc-build-from-source - No longer available

Benefits

  1. Simplified build process: Removes the need for cmake (>= 3.20.0) and ninja as external dependencies
  2. Faster compilation: Eliminates shaderc compilation from source, which was a significant build time contributor
  3. Reduced complexity: Single shader backend (naga) simplifies maintenance and testing
  4. Smaller dependency tree: Removes shaderc, shaderc-sys, and cmake crates from Cargo.lock

Migration

Projects using the shaderc backend should:

  1. Remove any with-shaderc or shader-backend-shaderc feature flags from their Cargo.toml
  2. Ensure shader-backend-naga (default) is being used
  3. No code changes should be required as the public API remains the same

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the shaderc shader compilation backend from the lambda-rs codebase, simplifying the build process by eliminating external dependencies on cmake (>= 3.20.0) and ninja. The naga backend becomes the sole shader compilation backend.

Changes:

  • Removed shaderc dependency and its build-from-source feature flags from Cargo.toml
  • Removed the shaderc_backend.rs implementation file (~120 lines) and deprecated shaderc.rs module
  • Updated documentation to reflect the simplified dependencies and single shader backend (naga)

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/features.md Updated to remove shaderc backend documentation, bumped version to 0.1.6, and added changelog entry
crates/lambda-rs/src/render/shader.rs Updated comment to reflect that only naga backend is now used
crates/lambda-rs/Cargo.toml Removed with-shaderc and with-shaderc-build-from-source feature flags
crates/lambda-rs-platform/src/shaderc.rs Removed deprecated shaderc module re-exports
crates/lambda-rs-platform/src/shader/shaderc_backend.rs Removed entire shaderc backend implementation (~120 lines)
crates/lambda-rs-platform/src/shader/mod.rs Simplified exports to only use naga backend, removed conditional compilation for shaderc
crates/lambda-rs-platform/src/lib.rs Removed shaderc module from public API
crates/lambda-rs-platform/Cargo.toml Removed shaderc dependency and shader-backend-shaderc feature flags
README.md Removed cmake and ninja from required external dependencies
Cargo.lock Removed cmake, shaderc, and shaderc-sys package entries

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vmarcella vmarcella merged commit cf3f472 into main Jan 25, 2026
11 checks passed
@vmarcella vmarcella deleted the vmarcella/drop-shaderc branch January 25, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants