Closed
Description
Support the following example
#[wasm_bindgen(apply_ending_slice_bikeshedded)]
pub fn add(first: u32, second: u32, rest: &[u32]) -> u32 {
rest.iter().sum() + first + second
}
callable from javascript as
import { add } from './wasm';
console.log(add(1, 2, 3, 4, 5)); // prints 15
You could implement the transformation in javascript as
function add(first, second, ..rest) {
return add_from_rust(first, second, rest);
}
This is a prerequisite for implementing #503 the reverse of #503.
Metadata
Metadata
Assignees
Labels
No labels