Commit Graph

103 Commits

Author SHA1 Message Date
Nick Fitzgerald
e2e815a477 guide: Add documentation for testing with wasm-bindgen-test 2018-09-12 15:40:09 -07:00
Alex Crichton
73e6191b60
Merge pull request #703 from lnicola/guide-publish-app
Guide: explain how to deploy the applicaton to a web server
2018-09-12 09:33:39 -07:00
Nick Fitzgerald
27a7008764 guide: Add section on accessing properties of untyped values
Part of #616
2018-09-11 15:26:51 -07:00
Alex Crichton
1d2d397f55
Merge pull request #808 from fitzgen/web-sys-in-the-guide
web-sys gets its own section in the guide
2018-09-11 10:08:06 -07:00
Nick Fitzgerald
3f92607be2
Merge pull request #810 from Tarnadas/doc/js-sys-function
doc: Add number suffix hint for JS function calls
2018-09-11 10:04:20 -07:00
Mario Reder
84a477d78d doc: Add number suffix hint for JS function calls 2018-09-11 07:25:08 +02:00
Mario Reder
e6fe9cf353 doc: Add nightly feature hint for closures
resolves #767
2018-09-11 07:06:21 +02:00
Laurentiu Nicola
8ffa24bfe5 Guide: explain how to deploy the application 2018-09-11 07:33:24 +03:00
Nick Fitzgerald
86796f8a03 guide: Add a user-facing web-sys section 2018-09-10 17:51:44 -07:00
Nick Fitzgerald
e730ee9a62 guide: update publishing new releases page 2018-09-10 15:37:12 -07:00
Nick Fitzgerald
1a39e4e737 guide: Fix nesting of contributing pages 2018-09-10 15:32:39 -07:00
Alex Crichton
457efc0f31 Implement support for WebIDL Callback types
This commit adds support for the WebIDL `Callback` type by translating all
callbacks to the `js_sys::Function` type. This will enable passing raw JS values
into callbacks as well as Rust valus using the `Closure` type.

This commit doesn't currently implement "callback interfaces" in WebIDL, that's
left for a follow-up commit.
2018-09-06 19:50:46 -07:00
Alex Crichton
269c491380
Gate web-sys APIs on activated features (#790)
* Gate `web-sys` APIs on activated features

Currently the compile times of `web-sys` are unfortunately prohibitive,
increasing the barrier to using it. This commit updates the crate to instead
have all APIs gated by a set of Cargo features which affect what bindings are
generated at compile time (and which are then compiled by rustc). It's
significantly faster to activate only a handful of features vs all thousand of
them!

A magical env var is added to print the list of all features that should be
generated, and then necessary logic is added to ferry features from the build
script to the webidl crate which then uses that as a filter to remove items
after parsing. Currently parsing is pretty speedy so we'll unconditionally parse
all WebIDL files, but this may change in the future!

For now this will make the `web-sys` crate a bit less ergonomic to use as lots
of features will need to be specified, but it should make it much more
approachable in terms of first-user experience with compile times.

* Fix AppVeyor testing web-sys

* FIx a typo

* Udpate feature listings from rebase conflicts

* Add some crate docs and such
2018-09-05 12:55:30 -07:00
Richard Dodd
7d5d845608 Add docs and remove typecheck from variadic attribute 2018-09-01 13:55:35 +01:00
Nick Fitzgerald
e290c75c32 Add @afdw to the team! \o/ 2018-08-30 12:59:34 -07:00
Alex Crichton
69a831423b Update publishing instructions
We've got a publish script now!
2018-08-27 13:51:47 -07:00
Alex Crichton
d4297ad2d3 Remove use_extern_macros features
This has now been stabilized!
2018-08-19 14:33:01 -07:00
Nick Fitzgerald
a5a8fd747d guide: Split supported types section up into many sub sections 2018-08-14 18:01:17 -07:00
Nick Fitzgerald
b1e3101fd4 guide: Add examples for number slices 2018-08-14 17:42:47 -07:00
Nick Fitzgerald
fea41b4a87 guide: also allow Option<bool> 2018-08-14 17:34:16 -07:00
Nick Fitzgerald
9c9e53485a guide: Add examples of boxed number slices 2018-08-14 17:15:01 -07:00
Nick Fitzgerald
8043baac69 guide: Add examples for working with numbers to types section 2018-08-14 15:45:25 -07:00
Nick Fitzgerald
602b63c1b0 guide: Add working with pointers example to types section 2018-08-14 15:24:43 -07:00
Alex Crichton
46f1719524
Merge pull request #696 from fitzgen/more-examples-for-guide
More examples for guide
2018-08-13 18:34:26 -06:00
Nick Fitzgerald
d1b2299340 guide: Add Box<[JsValue]> example to supported types section 2018-08-13 17:08:18 -07:00
Nick Fitzgerald
60307e81f9 guide: Add JsValue example to supported types section 2018-08-13 16:57:29 -07:00
Nick Fitzgerald
fedd1a5440 guide: Add bool example to supported types section 2018-08-13 16:55:05 -07:00
Nick Fitzgerald
975a122d6d guide: Add a char example to the supported types section 2018-08-13 16:24:39 -07:00
Nick Fitzgerald
74dc8874e1 guide: add String example usage to supported types 2018-08-13 16:20:25 -07:00
Nick Fitzgerald
fa72afe286 guide: Add str examples to supported types section 2018-08-13 16:12:58 -07:00
Nick Fitzgerald
8e19645006 guide: Add exported rust type examples to reference 2018-08-13 16:03:02 -07:00
Nick Fitzgerald
485d377594 guide: Add a reference section for Promises and Futures 2018-08-13 15:44:28 -07:00
R. Andrew Ohana
36fe4c23dc
Merge pull request #678 from derekdreery/webidl_namespace_support
Add support webidl namespaces.
2018-08-12 17:41:54 -07:00
Richard Dodd
ea05235985 Fix docs about testing webidl 2018-08-12 21:28:59 +01:00
Nick Fitzgerald
e87498e939 guide: Start adding example usage to "supported types" section 2018-08-10 16:56:40 -07:00
Mario Reder
cc76963bad
guide: typo in arbitrary data with serde 2018-08-09 17:46:38 +02:00
Nick Fitzgerald
2fcc74e226 guide: refactor and update testing instructions for contributing 2018-08-08 15:33:56 -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
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
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
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