Skip to content

Use core and alloc instead of std in naga #7256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 3, 2025

Conversation

bushrat011899
Copy link
Contributor

@bushrat011899 bushrat011899 commented Mar 1, 2025

Connections

Description

  • Reduce friction in future no_std development

Solution

  • Added the following warning level lints to naga:
    • std_instead_of_alloc
    • std_instead_of_core
    • alloc_instead_of_core
  • Added #![no_std] to change the implicit prelude from std to core
  • Added extern crate alloc and extern crate std
  • Fixed use statements across naga

Testing

cargo clippy -p naga --all-features --all-targets

Squash or Rebase?

Squash.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@bushrat011899 bushrat011899 requested a review from a team as a code owner March 1, 2025 04:03
@bushrat011899 bushrat011899 force-pushed the naga_implicit_prelude branch from a55fd67 to e51198e Compare March 2, 2025 23:51
@cwfitzgerald
Copy link
Member

I know this is a PR which will bitrot exceptionally fast, going to make sure all is clear tomorrow with the rest of the team, then merge.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@cwfitzgerald cwfitzgerald merged commit e4cc5cb into gfx-rs:trunk Mar 3, 2025
34 checks passed
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