We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We have C string literals now stabilized in Rust since rust-lang/rust#105723 (since v1.77.0, which'll be released next month).
It seems reasonable to have const string literals like these:
use std::ffi::CStr; pub const BAR: &CStr = c"hello world";
and convert them to #define or constexpr or whatever cbindgen usually does with constants
#define
constexpr
Current behavior is very much not ideal (probably need to update syn to v2?):
$ cbindgen --lang C thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-1.0.109/src/lit.rs:1020:13: Unrecognized literal: `c"hello world"`
The text was updated successfully, but these errors were encountered:
actually, that's not supported yet in syn: dtolnay/syn#1502
syn
Sorry, something went wrong.
Seems like sending a PR to syn would be the way to go, then once that's merged we can use it...
looks like it's already merged: dtolnay/syn#1622
No branches or pull requests
We have C string literals now stabilized in Rust since rust-lang/rust#105723 (since v1.77.0, which'll be released next month).
It seems reasonable to have const string literals like these:
and convert them to
#define
orconstexpr
or whatever cbindgen usually does with constantsCurrent behavior is very much not ideal (probably need to update syn to v2?):
The text was updated successfully, but these errors were encountered: