-
Notifications
You must be signed in to change notification settings - Fork 26
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
Symbols always resolve to an empty str on wasm32-unknown-unknown #33
Comments
Thanks for the repro case! I was a bit confused by your last issue as the parking lot bump was already published in 0.8! I'm afraid I have zero experience with WASM or web tech in general so it's unlikely I'll be able to do too much about this myself in the near term at least. |
Was it? Unless I'm misunderstanding the crates.io UI (which is very possible, I'm new to Rust!), 0.9 and 0.8 both depend on
No worries at all! |
This swaps the Ustr crate for string_interner, to resolve: anderslanglands/ustr#33
This swaps the Ustr crate for string_interner, to resolve: anderslanglands/ustr#33
This swaps the Ustr crate for string_interner, to resolve: anderslanglands/ustr#33
This is to resolve 0 length on architectures where size_of<usize> != size_of<u64>, which causes padding to be added so the struct is aligned. Fixes anderslanglands#33
Got a fix here: #34 (the problem is that wasm32 is 32-bit) |
Hi again!
I spoke a little too soon in my last issue, and even with an updated
parking_lot
, I haven't quite been able to get things to work onwasm32-unknown-unknown
, and symbols always end up resolving to an empty&str
.I've created a minimal reproduction here. The code should be fairly straightforward, but it just exports a
reproduce
function to Javascript, which when called, logsUstr::from("test").as_str()
to the browser's console. You'll note that an empty string is logged.I imagine this has something to do with the pointer tagging scheme you employ, but I haven't investigated enough to be sure.
In the meantime, I've swapped out for a simpler string interning crate in my code, so this isn't a blocking issue for me or anything, but I at least wanted to raise it in case you had any ideas, or anyone else gets stuck on the same thing :)
Thanks again for the crate! If this ever gets resolved, I'd love to switch back to
Ustr
, because it really is an impressively fast piece of code.The text was updated successfully, but these errors were encountered: