wasm-bindgen/tests
Nick Fitzgerald d5d3e46334 cli-support: Skip generating JS shims for imports when unnecessary
After this change, any import that only takes and returns ABI-safe numbers (signed
integers less than 64 bits and unrestricted floating point numbers) will be a
direct import, and will not have a little JS shim in the middle.

We don't have a great mechanism for testing the generated bindings' contents --
as opposed to its behavior -- but I manually verified that everything here does
the Right Thing and doesn't have a JS shim:

```rust
\#[wasm_bindgen]
extern "C" {
    fn trivial();

    fn incoming_i32() -> i32;
    fn incoming_f32() -> f32;
    fn incoming_f64() -> f64;

    fn outgoing_i32(x: i32);
    fn outgoing_f32(y: f32);
    fn outgoing_f64(z: f64);

    fn many(x: i32, y: f32, z: f64) -> i32;
}
```

Furthermore, I verified that when our support for emitting native `anyref` is
enabled, then we do not have a JS shim for the following import, but if it is
disabled, then we do have a JS shim:

```rust
\#[wasm_bindgen]
extern "C" {
    fn works_when_anyref_support_is_enabled(v: JsValue) -> JsValue;
}
```

Fixes #1636.
2019-07-11 15:44:16 -07:00
..
crates cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
headless Fix warnings about missing dyn on trait objects 2019-07-11 13:27:20 -07:00
no-std cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
wasm cli-support: Skip generating JS shims for imports when unnecessary 2019-07-11 15:44:16 -07:00
non_wasm.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
std-crate-no-std-dep.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
unwrap_throw.rs Add the UnwrapThrowExt<T> trait 2019-01-31 13:26:21 -08:00