7d5d845608
Add docs and remove typecheck from variadic attribute
2018-09-01 13:55:35 +01:00
ce1cb84327
Merge branch 'master' into variadic_js_functions
2018-08-31 10:08:53 +01:00
e1474110d4
Add an accessor for wasm's own memory as a JS object
...
In addition to closing #495 this'll be useful eventually when instantiating
multiple wasm modules from Rust as you'd now be able to acquire a reference to
the current module in Rust itself.
2018-08-27 11:05:55 -07:00
8ff0da6f85
Add more tests then comment them out
2018-08-21 14:07:29 +01:00
b8c1f72dab
Comment out failing code
2018-08-21 13:55:14 +01:00
e92536f300
Allow Vec as well as slice
2018-08-21 13:47:00 +01:00
385e805509
Work on review comments
2018-08-21 12:55:09 +01:00
86d1ab513b
Merge pull request #741 from alexcrichton/duplicate-statics
...
Support importing same-name statics from two modules
2018-08-20 11:37:21 -07:00
f8cf4ab732
Support importing same-name statics from two modules
...
Closes #714
2018-08-20 10:56:58 -07:00
4195af68e7
Fix the constructor
and catch
attributes combined
...
This commit fixes annotations that include both the `constructor` and `catch`
attributes on imported types, ensuring that we infer the right type being
returned after extracting the first type parameter of the `Result`.
Closes #735
2018-08-20 10:40:54 -07:00
4c1bf937f2
Move the unsize
feature behind a nightly
Cargo feature
...
This should fully stabilize the `wasm-bindgen` crate, preparing us for stable
Rust!
2018-08-19 14:45:59 -07:00
d4297ad2d3
Remove use_extern_macros
features
...
This has now been stabilized!
2018-08-19 14:33:01 -07:00
a4835304eb
Add codegen to make test work.
2018-08-19 13:39:16 +01:00
d9fd2147a0
[wip] support variadic javascript function parameters
2018-08-18 22:15:29 +01:00
998d37a353
Use the JS name of an imported type for instanceof
checks
2018-08-08 14:42:21 -07:00
bd15db40a0
Rebase fallout and review comments
2018-08-07 13:24:48 -07:00
37db88ebfa
Implement #[wasm_bindgen(extends = ...)]
...
This commit implements the `extends` attribute for `#[wasm_bindgen]` to
statically draw the inheritance hierarchy in the generated bindings, generating
appropriate `AsRef`, `AsMut`, and `From` implementations.
2018-08-07 13:04:11 -07:00
11553a1af2
Implement JsCast
for all imported types
...
This commit implements the `JsCast` trait automatically for all imported types
in `#[wasm_bindgen] extern { ... }` blocks. The main change here was to generate
an `instanceof` shim for all imported types in case it's needed.
All imported types now also implement `AsRef<JsValue>` and `AsMut<JsValue>`
2018-08-07 12:59:51 -07:00
0d18c8c397
Fix consuming a struct and returning a slice
...
This came up in a [recent comment][1] and it turns out we're accidentally
generating two `const ptr = ...` declarations, invalid JS! While Node doesn't
catch this it looks like firefox does.
[1]: https://github.com/rustwasm/wasm-bindgen/issues/329#issuecomment-411082013
2018-08-07 08:46:38 -07:00
b2977a4262
Delete wasm-bindgen-test-project-builder
...
No more tests use it!
2018-08-06 11:48:34 -07:00
c82c8e7acb
Move comments
test to wasm
2018-08-06 11:46:23 -07:00
1dd8bc078e
Delete typescript test
...
We'll soon no longer have a great way to test this in the repository, but the
support has effectively never regressed so far. Let's rely on user-facing bug
reports for now and otherwise we can add this back in later if necessary.
2018-08-06 11:39:30 -07:00
2ee4ab362d
Remove a stray file
2018-08-06 11:31:24 -07:00
d5b81595ec
Remove support for the version
attribute
...
First added in #161 this never ended up panning out, so let's remove the
experimental suport which isn't actually used by anything today and hold off on
any other changes until an RFC happens.
2018-08-06 13:30:28 -05:00
7f8d510f3d
Move unused_imports_not_generated
test to wasm
2018-08-06 11:28:08 -07:00
0fbdc7682c
Remove stray file no longer needed
2018-08-06 11:10:19 -07:00
0a2399a7f1
Migrate #![no_std]
tests to wasm
...
This required getting a little creative in a few places, but otherwise these
tests shouldn't need the test builder any more.
2018-08-06 11:08:35 -07:00
005f7eb9fa
Migrate rest of dependencies
test to wasm
2018-08-06 10:42:08 -07:00
28036db262
Move node
test over to wasm
2018-08-06 10:06:45 -07:00
59d4c5a06a
Remove dependencies_work test
...
The fact that `web-sys` works at all obviates the need for this test!
2018-08-06 10:00:01 -07:00
d978878d86
Remove add_headless
test
...
We've got tons of other headless tests, no need for this particular one to stick
around!
2018-08-06 09:59:05 -07:00
6edf063c94
Allow disabling --debug
in wasm-bindgen-test-runner
...
Afterwards remove the `non_debug` test as we're running the entire test suite in
non-debug mode!
2018-08-06 09:57:41 -07:00
3c52a82213
Remove unused import
2018-08-06 09:55:45 -07:00
c83e498f52
Move non-wasm test to an actual non-wasm test
2018-08-06 09:55:20 -07:00
8513858973
Move $-renaming tests to wasm
2018-08-06 09:51:29 -07:00
0bdb31d41e
Migrate the serde-serialize
test to wasm
2018-08-06 09:43:55 -07:00
4661588171
Move most of the "simple" test to the wasm
suite
2018-08-06 09:21:41 -07:00
21c36d3902
Allow js_name attribute to accept a string
2018-08-06 09:06:00 -05:00
b4601295d0
Migrate most import tests to wasm
2018-08-05 12:35:47 -05:00
66d51f13ee
Migrate the import_class
to wasm
2018-08-05 12:35:47 -05:00
654bb9b683
Port tests that use only basic features
2018-08-04 22:25:29 -05:00
57fd1dedd6
Migrate wasm-bindgen classes
test to wasm
2018-08-04 15:09:43 -05:00
df7bcc4e03
Migrate wasm-bindgen char
test to wasm
2018-08-04 15:09:43 -05:00
61b3d52dc9
Rename the test
2018-08-03 15:59:27 -05:00
afaf94a428
Add support for optional chars
2018-08-03 15:59:27 -05:00
4a0c69ffed
Add support for optional bools
2018-08-03 15:59:27 -05:00
3d9401aca6
Fix JS style
2018-08-03 15:59:27 -05:00
81cbb2e26d
Migrate the test
2018-08-03 15:59:27 -05:00
c49c18826d
Add support for optional numbers
2018-08-03 15:59:27 -05:00
88db12669f
Add support for Option<&T>
in imported argument lists
...
Closes #619
2018-08-02 22:40:42 -07:00