Skip to content

Support for i64/u64 in interface types #1837

Open
@ibaryshnikov

Description

@ibaryshnikov

Consider the following code

#[wasm_bindgen]
pub fn render() -> u64 {
    123
}

Compiling it with

WASM_INTERFACE_TYPES=1 wasm-pack build

produces

error: failed to generate a standard wasm bindings custom section
    caused by: failed to map return value for export `render` to standard binding expressions
    caused by: cannot represent 64-bit integer with a standard bindings expression

Expected behavior:
it should correctly generate interface type for the return value

In the proposal the types from u8/s8 to u64/s64 are covered, where u stands for unsigned and s for signed.

wasm-pack 0.8.1
wasm-bindgen 0.2.52
rustc 1.38.0 (625451e37 2019-09-23)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions