Skip to content

Symbols always resolve to an empty str on wasm32-unknown-unknown #33

@QuinnWilton

Description

@QuinnWilton

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 on wasm32-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, logs Ustr::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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions