Richard Dodd
615f8fbc4d
Push updates - still WIP
2018-08-09 21:38:37 +01:00
Richard Dodd
1e02ca7eab
Add support for modules to the backend.
2018-08-09 18:07:41 +01:00
Alex Crichton
f85fd0e2ad
Merge pull request #675 from sepiropht/master
...
[670] add extends for Array type
2018-08-09 09:52:13 -05:00
Nick Fitzgerald
bd62fdbd8b
Merge pull request #672 from bokuweb/number-extends-attributes
...
js-sys: Add extends attributes for js_sys::Number
2018-08-09 07:35:35 -07:00
sepiropht
e9e7072687
[670] add extends for Array type
2018-08-09 14:35:44 +02:00
Alex Crichton
157ba00660
Merge pull request #673 from fitzgen/futures-docs
...
wasm-bindgen-futures docs and example usage
2018-08-08 23:23:48 -05:00
bokuweb
42e02f7769
js-sys: Add extends attributes for js_sys::Number
2018-08-09 10:10:20 +09:00
Alex Crichton
505037ffae
Merge pull request #669 from fitzgen/contributing-testing
...
Contributing testing docs
2018-08-08 19:50:00 -05:00
Nick Fitzgerald
05dd67a63f
ci: Also test wasm-bindgen-futures
2018-08-08 17:44:38 -07:00
Nick Fitzgerald
170f20e1fd
futures: Add more documentation and example usage
...
Adds an example future that becomes ready on the next tick of the JavaScript
micro task queue.
Part of #614
2018-08-08 17:44:38 -07:00
Nick Fitzgerald
16dbed59b2
Merge pull request #671 from fitzgen/regexp-extends-attributes
...
js-sys: Add extends attributes for js_sys::RegExp
2018-08-08 16:43:46 -07:00
Nick Fitzgerald
235f9cc04e
js-sys: Add extends attributes for js_sys::RegExp
...
Part of #670
2018-08-08 16:23:12 -07:00
Nick Fitzgerald
e8a6341d2b
test: Add documentation about configuring headless browser testing
2018-08-08 15:47:46 -07:00
Nick Fitzgerald
2fcc74e226
guide: refactor and update testing instructions for contributing
2018-08-08 15:33:56 -07:00
Nick Fitzgerald
66f10b0c72
Merge pull request #666 from fitzgen/instanceof-renamed-import-types
...
Instanceof renamed import types
2018-08-08 15:31:24 -07:00
Nick Fitzgerald
2f455f1f7a
macro-support: Run rustfmt on src/parser.rs
2018-08-08 14:42:53 -07:00
Nick Fitzgerald
b0df5f79e4
Update package-lock.json via npm install
2018-08-08 14:42:21 -07:00
Nick Fitzgerald
998d37a353
Use the JS name of an imported type for instanceof
checks
2018-08-08 14:42:21 -07:00
Nick Fitzgerald
5ab3059a45
Merge pull request #667 from gnzlbg/patch-1
...
Document workaround fo using wasm-bindgen-test from git
2018-08-08 13:02:33 -07:00
gnzlbg
153505f6c7
Document workaround for avoiding duplicated symbols when using wasm-bindgen-test from git
2018-08-08 20:28:49 +02:00
Nick Fitzgerald
9104bf87e9
backend: Rename ast::ImportType::name to ast::ImportType::rust_name
...
This helps pave the way for adding a js_name, and makes it more clear which name
this is.
2018-08-07 16:09:38 -07:00
Alex Crichton
5b935526ff
Merge pull request #640 from alexcrichton/jscast
...
Implement RFC #2 - casting hierarchy between JS values
2018-08-07 17:26:37 -05:00
Nick Fitzgerald
43636977ae
Merge pull request #664 from fitzgen/guide-serde-arbitrary-data
...
Guide serde arbitrary data
2018-08-07 14:48:45 -07:00
Nick Fitzgerald
81c893b5d8
Merge pull request #663 from fitzgen/guide-closures-and-attributes
...
guide: add `indexing_{getter,setter,deleter}` attribute pages
2018-08-07 14:44:25 -07:00
Nick Fitzgerald
1d92784e07
guide: add indexing_{getter,setter,deleter}
attribute page
2018-08-07 14:42:13 -07:00
Nick Fitzgerald
2e7620e014
guide: Polish Serializing + Deserializing into/from JsValue with Serde section
2018-08-07 14:25:30 -07:00
Nick Fitzgerald
676611020e
guide: Delete "Feature Reference" page
...
We now have a rather large section for feature reference, and I don't think
there is anything in this page that isn't covered elsewhere and in more detail
anymore.
2018-08-07 14:25:30 -07:00
Alex Crichton
bd15db40a0
Rebase fallout and review comments
2018-08-07 13:24:48 -07:00
Alex Crichton
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
Alex Crichton
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
Alex Crichton
f3f11ed8eb
Clean up generated code for imported types
...
Group all the generated impls in a `const` block so we can use `use` without
clashing with the outside scope.
2018-08-07 12:59:51 -07:00
Alex Crichton
bea07abd0f
Add a JsCast
trait specified in [RFC 2]
...
[RFC 2]: https://github.com/rustwasm/rfcs/pull/2
2018-08-07 12:59:51 -07:00
Nick Fitzgerald
9b65e57585
Merge pull request #662 from alexcrichton/consume-ret-string
...
Fix consuming a struct and returning a slice
2018-08-07 11:16:14 -07:00
Nick Fitzgerald
6d4d9150cb
Merge pull request #661 from fitzgen/guide-closures-and-attributes
...
Guide: closures and attributes
2018-08-07 11:15:51 -07:00
Nick Fitzgerald
9d291187c5
guide: Fix alphabetizing of attributes
2018-08-07 11:14:00 -07:00
Nick Fitzgerald
451a2a8118
guide: Add small intro to Rust export attributes section
2018-08-07 11:13:41 -07:00
Nick Fitzgerald
e22ccb4d5d
guide: Clean up passing rust closures to JS section; add passing JS closures to rust section
2018-08-07 11:09:19 -07:00
Nick Fitzgerald
33520d4828
guide: add exhuastive reference docs for #[wasm_bindgen] attributes
2018-08-07 11:09:19 -07:00
Alex Crichton
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
Alex Crichton
b6a6dee7f1
Merge pull request #652 from afdw/master
...
Add support for getters, setters and deleters
2018-08-06 21:43:53 -05:00
Anton Danilkin
86b5ba6431
Add missing indexing words
2018-08-07 02:45:08 +03:00
Anton Danilkin
f54d51e045
Add documentation
2018-08-07 01:49:45 +03:00
Anton Danilkin
d396c168a5
Fix comments in parser
2018-08-07 00:48:03 +03:00
Anton Danilkin
3ad5493d23
Add a test for webidl
2018-08-07 00:42:47 +03:00
Anton Danilkin
e70c9015ff
Rename special to indexing
2018-08-07 00:06:04 +03:00
Anton Danilkin
ef3f086102
Merge remote-tracking branch 'upstream/master'
...
# Conflicts:
# crates/webidl/src/first_pass.rs
# crates/webidl/src/lib.rs
# crates/webidl/src/util.rs
2018-08-06 23:37:12 +03:00
Alex Crichton
b2977a4262
Delete wasm-bindgen-test-project-builder
...
No more tests use it!
2018-08-06 11:48:34 -07:00
Alex Crichton
c82c8e7acb
Move comments
test to wasm
2018-08-06 11:46:23 -07:00
Alex Crichton
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
Alex Crichton
2ee4ab362d
Remove a stray file
2018-08-06 11:31:24 -07:00