Commit Graph

1294 Commits

Author SHA1 Message Date
Alex Crichton
18746ecf4a
Merge pull request #1461 from alexcrichton/rustfmt-web-sys
Format web-sys bindings by default
2019-04-15 12:36:28 -05:00
Alex Crichton
3ab9bb192a
Merge pull request #1449 from alexcrichton/no-interface-objects
Support [NoInterfaceObject] in `web-sys`
2019-04-15 12:36:14 -05:00
Alex Crichton
01a52233d3 Support [NoInterfaceObject] in web-sys
This commit enables `[NoInterfaceObject]` annotated interfaces in
`web-sys`. The `NoInterfaceObject` attribute means that there's not
actually a JS class for the object, but all of its properties and such
can still be accessed structually and invoked. This should help provide
more bindings for some more common types on the web!

Note that this builds on recent features to ensure that `dyn_into` and
friends always fail for `NoInterfaceObject` objects because they don't
actually have a class.

Closes #893
Closes #1257
Closes #1315
2019-04-15 10:36:01 -07:00
Alex Crichton
fd4f0b6508 Format web-sys bindings by default
This commit switches to executing `rustfmt` by default on
`web-sys`-generated bindings. This improves situations like "view
source" in Rustdoc as well as the IDE interactive debugging experience.

This was initially disabled by default because `rustfmt` took so long to
execute, but nowadays `web-sys` is by default much smaller so there's
much less need to avoid running `rustfmt` in fear of it taking too
long.

Closes #1457
2019-04-15 08:33:02 -07:00
Alex Crichton
526b253b47
Merge pull request #1451 from RReverser/more-static-namespaces
Transform Math, Reflect and JSON into static namespaces
2019-04-15 09:41:40 -05:00
Alex Crichton
7ee4906661
Merge pull request #1410 from alexlapa/add-wasm-bindgen-skip-attr
Add wasm_bindgen(skip) attribute
2019-04-15 09:31:01 -05:00
Ingvar Stepanyan
ed45ca72da Fix more DataView documentation mistakes
I fixed few copy-paste mistakes in https://github.com/rustwasm/wasm-bindgen/pull/1372, but haven't noticed that they go even deeper :(
2019-04-15 14:31:23 +01:00
alexlapa
00c4dd9b6f Merge branch 'master' into add-wasm-bindgen-skip-attr 2019-04-14 23:43:21 +03:00
Ingvar Stepanyan
62b7d3e3c4 Transform JSON into a namespace 2019-04-13 02:22:19 +01:00
Ingvar Stepanyan
75c2971ab9 Transform Reflect into a namespace 2019-04-13 02:21:33 +01:00
Ingvar Stepanyan
fe939bc911 Transform Math into a namespace 2019-04-13 02:20:24 +01:00
Ingvar Stepanyan
2f524ee494 Leverage new is_type_of for iterator protocol
Treats any object of shape `{ next: function }` as an iterator via new `is_type_of` method. This is consistent with JavaScript iteration protocol which we already respect.

Also fixes a minor issue that `is_function` was unnecessarily called twice (once explicitly and once as part of `dyn_into` which now does the same check).
2019-04-12 20:30:41 +01:00
Alex Crichton
c4776becbb Touch up descriptions of has_type 2019-04-12 10:54:36 -07:00
Ingvar Stepanyan
cb880bdbff Add customisable is_type_of 2019-04-12 17:23:42 +01:00
Alex Crichton
ba1f67d854 Remove some unnecessary unsafe in js-sys 2019-04-12 09:02:39 -07:00
Alex Crichton
df8da56a6c Add PartialEq/Eq to many js-sys types
This commit adds `#[derive(PartialEq, Eq)]` to many types throughout
`js-sys`. These types are basically all based on `Object`, which means
that `Object.is` can be used for `PartialEq` and the `Eq` requirements
are upheld.

The macro has also been updated to internally store the deref target
instead of unconditionally storing `JsValue`, allowing `#[derive]` to
work a bit better in these situations.
2019-04-12 09:02:33 -07:00
Alex Crichton
018b9b4e09 Fix compile of js-sys 2019-04-12 08:54:23 -07:00
Alex Crichton
ba88ae8b64 Improve Boolean/Number/JsString consistency
* Ensure `PartialEq` is implemented from these types to native Rust types
* Implement `From` between these type and native Rust types
* Deprecated `Number::new` and `Boolean::new` to discourage use of the
  object forms, recommending the `from` constructors instead.

Closes #1446
2019-04-12 08:50:29 -07:00
Alex Crichton
df6e15e3ab Bump to 0.2.42 2019-04-11 07:39:45 -07:00
Alex Crichton
3906e4066d Fix a bug using encodeInto truncating strings
The last write accidentally wasn't accounted for in the returned length
of the string and we unfortunately don't have any test coverage of
`encodeInto` since it requires Firefox nightly right now (and doesn't
work in Node yet).

Closes #1436
2019-04-11 07:25:27 -07:00
Alex Crichton
02394724ea Bump to 0.2.41 2019-04-10 10:53:32 -07:00
Alex Crichton
7e5e401076 Add an accessor for the function table
This commit adds an intrinsics to the `wasm_bindgen` crate which
accesses the `WebAssembly.Table` which is the function table of the
module. Eventually the thinking is that a module would import its own
function table via native wasm functionality (via `anyref` and such),
but until that's implemented let's add a binding for it ourselves!

Closes #1427
2019-04-08 10:40:46 -07:00
Alex Crichton
e4400ac8b4 Improve error message for non-copy struct fields
Make sure the error message points to the type in question instead of to
the `#[wasm_bindgen]` macro which can be overly confusing!
2019-04-08 07:35:14 -07:00
Alex Crichton
16745edf3f
Merge pull request #1416 from alexcrichton/js-string-valid-utf16
Add warnings about UTF-16 vs UTF-8 strings
2019-04-05 10:12:32 -05:00
Alex Crichton
44738e049a Add warnings about UTF-16 vs UTF-8 strings
This commit aims to address #1348 via a number of strategies:

* Documentation is updated to warn about UTF-16 vs UTF-8 problems
  between JS and Rust. Notably documenting that `as_string` and handling
  of arguments is lossy when there are lone surrogates.

* A `JsString::is_valid_utf16` method was added to test whether
  `as_string` is lossless or not.

The intention is that most default behavior of `wasm-bindgen` will
remain, but where necessary bindings will use `JsString` instead of
`str`/`String` and will manually check for `is_valid_utf16` as
necessary. It's also hypothesized that this is relatively rare and not
too performance critical, so an optimized intrinsic for `is_valid_utf16`
is not yet provided.

Closes #1348
2019-04-05 08:11:50 -07:00
Nick Fitzgerald
dff9b9b1e3 Don't put anything before ES module imports
Because of some incorrect use of `js.push_str(..)`, we could sometimes emit code
before the ES modules imports, which is syntactically invalid:

    const __exports = {};
    import { Thing } from '...'; // Syntax error!

This has been fixed by making sure that the correct `imports` or `imports_post`
string is built up. We now also assert that the `js` string is empty at the
location where we add imports if we're using ES modules.
2019-04-04 15:53:43 -07:00
Alex Crichton
f48fdec21e Fix imported usage of wasm_bindgen macro
Make sure it refers to `__wasm_bindgen_class_marker` via an absolute
path!

Closes #1422
2019-04-04 09:56:16 -07:00
Alex Crichton
e3473f5e9e Fix instantiation with a Module
This commit fixes the `init` function when passed a
`WebAssembly.Module`. Upon closer reading of the [spec] we see there's
two possible return values from `WebAssembly.instantiate`. If passed a
`Module`, it will return only the `Instance`. If passed a buffer source,
though, it'll return an object with the module/instance.

The fix here is to check the result value is an `Instance`, and if so
assume the input must have been a module so it's paired up in the
output.

Closes #1418

[spec]: http://webassembly.github.io/spec/js-api/index.html#webassembly-namespace
2019-04-02 14:19:24 -07:00
Alex Crichton
fa674df109
Merge pull request #1412 from c410-f3r/init-ts
Add TS type for init fn
2019-04-02 15:46:34 -05:00
Caio
b6317e3f24 Add TS type for init fn 2019-04-01 19:45:53 -03:00
Ingvar Stepanyan
2f28b8b80e Optimise encodeInto reallocations
Instead of doubling the size on each iteration, use precise upper limit (3 * JS length) if the string turned out not to be ASCII-only. This results in maximum of 1 reallocation instead of O(log N).

Some dummy examples of what this would change:
 - 1000 of ASCII chars: no change, allocates 1000 bytes and bails out.
 - 1000 ASCII chars + 1 '😃': before allocated 1000 bytes and reallocated to 2000; now allocates 1000 bytes and reallocates to 1006.
 - 1000 of '😃' chars: before allocated 1000 bytes, reallocated to 2000, finally reallocated again to 4000; now allocates 1000 bytes and reallocates to 4000 right away.

Related issue: #1313
2019-04-01 13:08:08 +01:00
alexlapa
1dcf468c9d add wasm_bindgen(skip) attr to disable getters and setters exposure of pub fields 2019-03-30 05:09:02 +02:00
Alex Crichton
1121393203
Merge pull request #1403 from RReverser/expose-constructor
Add `constructor` property to `Object`
2019-03-28 10:55:22 -03:00
Alex Crichton
0160f6af45 Fix handling of u32 between Rust and JS
All numbers in WebAssembly are signed and then each operation on them
may optionally have an unsigned version. This means that when we pass
large signed numbers to JS they actually show up as large negative
numbers even though JS numbers can faithfully represent the type.

This is fixed by adding `>>>0` in a few locations in the generated
bindings to coerce the JS value into an unsigned value.

Closes #1388
2019-03-27 13:37:14 -07:00
Ingvar Stepanyan
db17e9d2a7 Add constructor property to Object 2019-03-27 14:25:55 +00:00
Ingvar Stepanyan
a5f5c7a9e8 Consistently expose is_like_none
Aside from visual deduplication, this actually fixes a bug in js2rust.rs where it didn't call `expose_is_like_none` but used `isLikeNone` inside of `arg.get_64()` branch.
2019-03-26 18:53:55 +00:00
Alex Crichton
72672ff42a
Merge pull request #1397 from RReverser/option-char-abi
Simplify ABI for Option<char>
2019-03-26 13:50:59 -05:00
Ingvar Stepanyan
5f742ca4c4 Simplify ABI for Option<char>
Flatten None to a special u32 value instead of using an intermediate pointer.
2019-03-26 18:12:24 +00:00
Alex Crichton
778e497186 Generate r#async method names in web-sys
This is a new keyword in the 2018 edition!
2019-03-26 08:51:46 -07:00
Alex Crichton
a6fe0cefa8 Migrate all crates to the 2018 edition
Most of the CLI crates were already in the 2018 edition, and it turns
out that one of the macro crates was already in the 2018 edition so we
may as well move everything to the 2018 edition!

Always nice to remove those `extern crate` statements nowadays!

This commit also does a `cargo fmt --all` to make sure we're conforming
with style again.
2019-03-26 08:10:53 -07:00
Alex Crichton
c5d2b2d1fb
Merge pull request #1359 from konstin/reexporting_in_2018
Allow reexporting proc macro output in the 2018 edition
2019-03-26 10:08:46 -05:00
Ingvar Stepanyan
11bb8f03c2 Remove string allocation from try_iter
This allows to significantly speed up iteration over small collections, where string encoding is the primary overhead.

Related to #1386, but works around only this partial case.
2019-03-26 12:22:54 +00:00
Alex Crichton
b4b3926bb8
Merge pull request #1305 from alexcrichton/npm-dependencies
Implement transitive support for NPM dependencies
2019-03-25 16:03:02 -05:00
Ingvar Stepanyan
12011f4537 Add specialised passStringToWasm for Node.js
Node.js doesn't currently implement `TextEncoder::encodeInto`. I've raised an upstream issue to add it - https://github.com/nodejs/node/issues/26904 - but it's likely to take some time and will be available only in new releases.

In the meanwhile, it's worth noting that Node.js already has `Buffer::write` which has pretty similar semantics, but doesn't require creating an intermediate view using `.subarray` and instead accepts pointer and length directly.

Also, Node.js has `Buffer::byteLength` helper which allows to efficiently retrieve an encoded byte length of a string upfront, and so allows us to avoid a loop with reallocations.

This change takes leverage of these methods by generating an additional Buffer-based view into the WASM memory and using it for string operations.

I'm seeing up to 35% increase in performance in string-heavy library benchmarks.
2019-03-25 17:42:16 +00:00
Alex Crichton
362777fc75 Start implementing a test suite for the CLI
We have very few tests today so this starts to add the basics of a test
suite which compiles Cargo projects on-the-fly which will hopefully help
us bolster the amount of assertions we can make about the output.
2019-03-22 11:32:03 -07:00
Alex Crichton
6edb40a807 Implement transitive support for NPM dependencies
This commit implements [RFC 8], which enables transitive and transparent
dependencies on NPM. The `module` attribute, when seen and not part of a
local JS snippet, triggers detection of a `package.json` next to
`Cargo.toml`. If found it will cause the `wasm-bindgen` CLI tool to load
and parse the `package.json` within each crate and then create a merged
`package.json` at the end.

[RFC 8]: https://github.com/rustwasm/rfcs/pull/8
2019-03-22 09:42:40 -07:00
Alex Crichton
0631182b68 Enable the stable feature of compiletest_rs
Should fix CI!
2019-03-22 07:26:23 -07:00
Alex Crichton
6803c619bb Bump to 0.2.40 2019-03-21 17:08:48 -07:00
Alex Crichton
a8c5fa4a2a
Merge pull request #1385 from alexcrichton/fix-uaf
Fix use-after-free with closures in JS bindings
2019-03-21 19:05:24 -05:00
Nick Fitzgerald
6c62d54ad9
Update crates/cli-support/src/js/closures.rs
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
2019-03-21 19:05:15 -05:00
Nick Fitzgerald
407bc5dfbb
Update crates/cli-support/src/js/closures.rs
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
2019-03-21 19:05:10 -05:00
Alex Crichton
1a7b3d56bd
Merge pull request #1384 from rustwasm/cloudflare-workers
feat(js): add check to no_modules gen js for cloudflare workers
2019-03-21 19:04:53 -05:00
Ashley Williams
3e814a6824 feat(js): add check to no_modules gen js for cloudflare workers 2019-03-21 18:10:20 -05:00
Alex Crichton
2ff2e2505a Fix use-after-free with closures in JS bindings
This commit fixes an erroneous use-after-free which can happen in
erroneous situations in JS. It's intended that if you invoke a closure
after its environment has been destroyed that you'll immediately get an
error from Rust saying so. The JS binding generation for mutable
closures, however, accidentally did not protect against this.

Each closure has an internal reference count which is incremented while
being invoked and decremented when the invocation finishes and also when
the `Closure` in Rust is dropped. That means there's two branches where
the reference count reaches zero and the internal pointer stored in JS
needs to be set to zero. Only one, however, actually set the pointer to
zero!

This means that if a closure was destroyed while it was being invoked it
would not correctly set its internal pointer to zero. A further
invocation of the closure would then pass as seemingly valid pointer
into Rust, causing a use-after-free.

A test isn't included here specifically for this because our CI has
started failing left-and-right over this test, so this commit will
hopefully just make our CI green!
2019-03-21 15:57:08 -07:00
Alex Crichton
b8e9a20d8f
Merge pull request #1377 from alexcrichton/fix-dupe
Move `links` annotation to `wasm-bindgen-shared`
2019-03-21 16:58:53 -05:00
Alex Crichton
c9a972ac55
Merge pull request #1376 from alexcrichton/more-debugging
Add some logging useful in debugging #1373
2019-03-21 16:55:04 -05:00
Alex Crichton
a5a600192a Fix a nondeterministic bug in the JS wrapper emitted
We've always wanted this to be the deterministic, but usage of `HashMap`
for example can accidentally lead to non-determinism. Looks like one was
forgotten and the bindings were nondeterministic by accident as a
result!
2019-03-21 14:37:44 -07:00
Alex Crichton
995be7c027 Replace target flags with --target
This commit deprecates the `--web`, `--no-modules`, and `--nodejs` flags
in favor of one `--target` flag. The motivation for this commit is to be
consistent between `wasm-bindgen` and `wasm-pack` so documentation for
one is applicable for the other (so we don't have to document everywhere
what the translation is between flags). Additionally this should make it
a bit easier to add new targets (if necessary) in the future as it won't
add to the proliferation of flags.

For now the old flags (like `--web`) continue to be accepted, but
they'll be removed during the next set of breaking changes for
`wasm-bindgen`.
2019-03-21 14:00:33 -07:00
Alex Crichton
7b6731fd3b Move links annotation to wasm-bindgen-shared
This commit moves our `links` annotation in the `wasm-bindgen` crate to
the `wasm-bindgen-shared` crate. The `links` annotation is used to
ensure that there's only one version of `wasm-bindgen` in a crate graph
because if there are multiple versions then a CLI surely cannot actually
process the wasm binary (as the multiple versions likely have different
formats in their custom sections).

Discovered in #1373 it looks like the usage in `wasm-bindgen` isn't
quite sufficient to cause this deduplication. It turns out that
`wasm-bindgen-shared`, a very core dependency, is actually the most
critical to be deduplicated since its the one that defines the format of
the custom section. In #1373 a case came up where `wasm-bindgen` was
deduplciated but there were two versions of `wasm-bindgen-shared` in the
crate graph, meaning that a `[patch]` for only `wasm-bindgen` wasn't
sufficient, but rather `web-sys` and/or `js-sys` also needed a `[patch]`
annotation to ensure everyone used the right dependencies.

This commit won't actually fix #1373 to the point where it "just works",
but what it does do is present a better error message than an internal
panic of `wasm-bindgen`. The hope is that by moving the `links`
annotation we can catch more errors of this crate graph duplication,
leading to more `[patch]` annotations locally.

Closes #1373
2019-03-21 08:35:27 -07:00
Alex Crichton
12355ce81c Add some logging useful in debugging #1373
Ended up helping diagnose the problem in the end!
2019-03-21 08:30:30 -07:00
Alex Crichton
d49d8c9e1b
Merge pull request #1372 from RReverser/fix-dataview-docs
Fix docs for DataView::get*int32*
2019-03-20 13:47:10 -05:00
Ingvar Stepanyan
4e806bab70 Fix docs for DataView::get*int32* 2019-03-20 18:32:34 +00:00
Ingvar Stepanyan
c5260f29aa Merge TypedArray definitions into a macro 2019-03-20 17:25:35 +00:00
konstin
42c1cdd8bf
Merge branch 'master' into reexporting_in_2018 2019-03-18 21:38:18 +01:00
Alex Crichton
2177dee9e4
Merge pull request #1353 from alexcrichton/raw-module
Add a `raw_module` attribute to `#[wasm_bindgen]`
2019-03-18 12:48:14 -05:00
Alex Crichton
ae47665b4d
Merge pull request #1356 from c410-f3r/ts-tests
Improve TS tests
2019-03-18 10:10:21 -05:00
konstin
69bbf597af Allow reexporting proc macro output in the 2018 edition
Trying to use a proc macro from a 2018 edition crate in a 2018 edition crate that reexports wasm bindgen's output failed before this commit with "could not find `wasm_bindgen` in `{{root}}`".

This commit was made with 

rg " ::wasm_bindgen::" --files-with-matches | xargs sed -i 's/::wasm_bindgen::/wasm_bindgen::/g'
2019-03-18 10:43:48 +01:00
Caio
dc50a5ab58 Improve TS tests 2019-03-15 22:15:04 -03:00
alexlapa
4e32b5e430 add read_optional_enum_attribute to webidl-tests/enums 2019-03-15 14:27:18 -06:00
Alex Crichton
0d592fffb0 Add a raw_module attribute to #[wasm_bindgen]
This allows subverting the checks and resolution performed by the
`module` attribute added as part of [RFC 6] and has been discussed in #1343.

Closes #1343

[RFC 6]: https://github.com/rustwasm/rfcs/pull/6
2019-03-15 08:08:09 -07:00
alexlapa
1014bdb5df Merge remote-tracking branch 'upstream/master' into enable-rtc-rtp-transceiver 2019-03-14 13:24:24 -06:00
alexlapa
e6c42d4155 fix 2019-03-14 12:50:50 -06:00
alexlapa
bf273a2035 fix 2019-03-14 12:30:08 -06:00
alexlapa
9178231b60 impl OptionFromWasmAbi and OptionIntoWasmAbi for ImportEnum, enable RTCRtpTransceiver.webidl, add add rtc_rtp_transceiver_direction test 2019-03-14 12:15:02 -06:00
Caio
91ea972c03 Take &str instead of String in argument fn 2019-03-14 12:21:41 -03:00
Caio
59c1b2a565 Merge branch 'master' into arg-names 2019-03-14 09:30:14 -03:00
Caio
70f5373348 Preserve argument names 2019-03-14 08:46:42 -03:00
Alex Crichton
228f58dca3 Bump to 0.2.39 2019-03-13 11:02:27 -07:00
Alex Crichton
5192b95bf3 Workaround an upstream nom bug
This commit works around Geal/nom#843 where the API of the `nom` crate
changes based on feature selection, meaning we need to be compatible
even if another crate in the crate graph enables a feature.

Ideally this'd be fixed in upstream `nom`, and it looks like it will in
the next major version! For now a local catch-all directive should help
out.
2019-03-12 12:22:24 -07:00
Nathan Stoddard
03fa00d201 Make the slice argument of texImage2D and related functions immutable
This also adds immutable slice whitelisting for Uint8Array, ArrayBufferView, and BufferSource, and removes Uint8ArrayMut.
2019-03-08 15:25:52 -08:00
Alex Crichton
a7e7f8b5e1
Merge pull request #1328 from alexcrichton/switch-to-web
Switch the `--browser` argument to `--web`
2019-03-07 15:25:26 -06:00
Nick Fitzgerald
e5ec474896
Update crates/cli-support/src/js/mod.rs
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
2019-03-07 15:25:20 -06:00
Alex Crichton
0b7fab4474
Merge pull request #1331 from c410-f3r/span-impls
Remove PartialEq and Eq from Function
2019-03-07 13:32:42 -06:00
Alex Crichton
f00c74aeb0
Merge pull request #1330 from Vlad-Shcherbina/mkdir_pkg
Create --out_dir (usually "pkg") if it does not exist
2019-03-07 12:08:37 -06:00
Caio
ded4fdf52d Remove PartialEq and Eq from Function 2019-03-07 15:00:55 -03:00
Vlad Shcherbina
2a2581188a Create out_dir (usually "pkg") if it does not exist 2019-03-07 19:56:57 +03:00
Alex Crichton
cd3781cb73 Switch the --browser argument to --web
This commit reverts part of the implementation of [RFC 6]. That RFC
specified that the `--browser` flag was going to be repurposed for the
new "natively loadable as ES module output", but unfortunately the
breakage is far broader than initially expected. It turns out that
`wasm-pack` passes `--browser` by default which means that a change to
break `--browser` would break all historical versions of `wasm-pack`
which is a bit much for now.

To solve this the `--browser` flag is going back to what it represents
on the current released version of `wasm-bindgen` (optimize away some
node.js checks in a few places for bundler-style output) and a new
`--web` flag is being introduced as the new deployment strategy.

[RFC 6]: https://github.com/rustwasm/rfcs/pull/6

Closes #1318
2019-03-07 08:26:36 -08:00
Alex Crichton
17bd1969b6
Merge pull request #1323 from alexcrichton/bump-walrus
Update walrus to 0.5.0
2019-03-06 22:34:28 -06:00
Alex Crichton
795bf7c6b1 Update walrus to 0.5.0 2019-03-06 15:09:20 -08:00
ibaryshnikov
fa0a3610af issue-1317-typed-array-typo-fixed 2019-03-06 22:12:48 +03:00
Alex Crichton
9f6c2a6125
Merge pull request #1314 from alexcrichton/typescript-tests
Start testing TypeScript output on CI
2019-03-05 17:20:00 -06:00
Alex Crichton
d6e3770350 Scope snippets within a crate
Use the same crate identifier for manually included snippets as well as
inline snippets to help with debugging.
2019-03-05 14:53:14 -08:00
Alex Crichton
c463cc96df Clean up the super long finalize function 2019-03-05 14:40:05 -08:00
Alex Crichton
f3f3ebee3a Remove unsafe usage in backend/src/encode.rs
Using `unsafe` was just a little too eager there so let's use an
off-the-shelf solution for solving the actual problem we have, which is
to allocate strings with a lifetime of `Interner` rather than
deduplicating strings.
2019-03-05 12:28:14 -08:00
Alex Crichton
93a1301c9f Don't explicitly hide _INCLUDED_FILES
It's already hidden from docs!
2019-03-05 12:17:42 -08:00
Alex Crichton
bdcfcb49b1 Log webdriver command we execute 2019-03-05 09:33:22 -08:00
Alex Crichton
235bc7c889 Start testing TypeScript output on CI
This commit starts to add some simple tests for our TypeScript output of
the wasm-bindgen CLI, currently just running `tsc` to make sure syntax
looks good and types are emitted as expected. This'll hopefully be able
to get expanded over time with bug reports as they come in as well as
ensure that we don't regress anything in egregious manners!

Closes #922
2019-03-05 08:57:52 -08:00
Alex Crichton
20f1e503d3 Fix the webidl-tests crate 2019-03-05 08:00:47 -08:00
Alex Crichton
5de3189411 Fix js-sys and web-sys tests 2019-03-05 08:00:47 -08:00
Alex Crichton
7e62aff1ce Fix a case where snippet is specified twice
When importing a file across multiple locations in a module make sure it
doesn't trip an assert and it works as expected.
2019-03-05 08:00:47 -08:00