Skip to content

webidl: Add a method of whitelisting an API as not mutating its byte slice argument #1005

Closed
@alexcrichton

Description

@alexcrichton

Spawned off from #978, we currently pessmize all slices to be mutable when passed to JS. This conservative decision is required for correctness, but we typically know on a one-off basis that the mutable borrow isn't actually necessary.

We should add a specific method to whitelist particular APIs and switch the to using an immutable slice instead of a mutable one!

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontend:webidlIssues related to the WebIDL frontend to wasm-bindgen

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions