Skip to content

Commit

Permalink
generator: Emit new c"" CStr literals
Browse files Browse the repository at this point in the history
These will land in Rust 1.76 and automatically append a `\0` terminator
in the compiler without having to have a checked or `unsafe`-unchecked
constructor on `CStr`.

Hacking in an invalid `\0` anywhere in the string is disallowed with a
compiler error.

Note that `proc-macro`, and by extension `proc-macro2` only has support
for parsing this literal, but not for emitting it yet.
  • Loading branch information
MarijnS95 committed Mar 21, 2024
1 parent f2979c8 commit 3442ad4
Show file tree
Hide file tree
Showing 6 changed files with 1,120 additions and 3,441 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
- run: cargo check --workspace --all-targets --all-features

check_msrv:
name: Check ash, ash-window and ash-rewrite MSRV (1.69.0)
name: Check ash, ash-window and ash-rewrite MSRV (1.77.0)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.69.0
- uses: dtolnay/rust-toolchain@1.77.0
- run: cargo check -p ash -p ash-rewrite -p ash-window --all-features

# TODO: add a similar job for the rewrite once that generates code
Expand Down
2 changes: 1 addition & 1 deletion ash-window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ categories = [
"rendering::graphics-api"
]
edition = "2021"
rust-version = "1.69.0"
rust-version = "1.77.0"

[dependencies]
ash = { path = "../ash", version = "0.37", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion ash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ categories = [
"rendering::graphics-api"
]
edition = "2021"
rust-version = "1.69.0"
rust-version = "1.77.0"

[dependencies]
libloading = { version = "0.8", optional = true }
Expand Down
Loading

0 comments on commit 3442ad4

Please sign in to comment.