Commit Graph

49 Commits

Author SHA1 Message Date
Alex Crichton
d71ab78fc6 Bump to 0.2.47 2019-06-19 11:14:37 -07:00
Alex Crichton
8fc0a38402 Bump to 0.2.46 2019-06-14 11:44:58 -07:00
Sven Sauleau
546f65e2f3 chore: bump again 2019-05-29 17:37:37 +01:00
Sven Sauleau
f63238ee24 chore: update wasm-pack-plugin to 0.4.1 2019-05-29 17:09:26 +01:00
noelyoo
f3ec734310 docs: update docs link 2019-05-26 16:43:00 +09:00
Alex Crichton
137bbdf2e3 Bump to 0.2.45 2019-05-20 09:44:03 -07:00
Alex Crichton
773c6ff430 Bump to 0.2.44 2019-05-16 07:47:23 -07:00
Alex Crichton
f2429be07f Bump to 0.2.43 2019-04-29 08:28:41 -07:00
Alex Crichton
df6e15e3ab Bump to 0.2.42 2019-04-11 07:39:45 -07:00
Alex Crichton
02394724ea Bump to 0.2.41 2019-04-10 10:53:32 -07:00
Alex Crichton
6803c619bb Bump to 0.2.40 2019-03-21 17:08:48 -07:00
Alex Crichton
228f58dca3 Bump to 0.2.39 2019-03-13 11:02:27 -07:00
Alex Crichton
a659f27c07 Bump to 0.2.38 2019-03-04 09:11:23 -08:00
Sven Sauleau
5e7187a95f
chore: update pinned Webpack versions 2019-02-15 19:26:08 +01:00
Alex Crichton
e9f423d57e Bump to 0.2.37 2019-02-15 08:16:24 -08:00
Nick Fitzgerald
802cfedcbd Bump to 0.2.36 2019-02-12 13:19:02 -08:00
Nick Fitzgerald
d9cf9b3735 Bump to version 0.2.35 2019-02-12 11:36:19 -08:00
Nick Fitzgerald
078257943d Bump to 0.2.34 2019-02-11 18:58:54 -08:00
Andrew Chin
153acdb4fd Fix webaudio example
The rust set_* functions except numbers, not strings.
2019-01-28 23:54:40 -05:00
Alex Crichton
78c4075e40 Bump to 0.2.33 2019-01-18 15:32:17 -08:00
Alex Crichton
32c611d16d Convert all examples to using wasm-pack
This commit migrates all our examples to using `wasm-pack build` to
compile their code and run `wasm-bindgen`. This should make it a bit
easier to understand the examples as there's less to follow during the
build step.

Webpack projects are all using `@wasm-tool/wasm-pack-plugin` as well so
the build step is simple `npm run serve`. Other examples which retain
`build.sh` are just using `wasm-pack build` now
2019-01-17 08:37:32 -08:00
Nick Fitzgerald
31fdede9fc Bump to 0.2.32 2019-01-16 13:11:13 -08:00
Alex Crichton
b04f60cf2b Bump to 0.2.31 2019-01-09 09:17:50 -08:00
Alex Crichton
fbf000a508 Bump to 0.2.30 2019-01-07 07:47:07 -08:00
André Luis Leal Cardoso Junior
00d4c6b5a5 Update webaudio example to the 2018 edition 2018-12-11 13:36:08 -02:00
Alex Crichton
63e3ba722d Bump to 0.2.29 2018-12-04 06:04:47 -08:00
Alex Crichton
48f4adfa8c Run rustfmt over everything 2018-11-27 12:07:59 -08:00
Alex Crichton
22ca15f81e Bump to 0.2.28 2018-11-12 09:28:01 -08:00
Alex Crichton
5b76a6291e Implement Deref for all imported JS types
This commit implements the first half of [RFC #5] where the `Deref`
trait is implemented for all imported types. The target of `Deref` is
either the first entry of the list of `extends` attribute or `JsValue`.

All examples using `.as_ref()` with various `web-sys` types have been
updated to the more ergonomic deref casts now. Additionally the
`web-sys` generation of the `extends` array has been fixed slightly to
explicitly list implementatoins in the hierarchy order to ensure the
correct target for `Deref` is chosen.

[RFC #5]: https://github.com/rustwasm/rfcs/blob/master/text/005-structural-and-deref.md
2018-11-08 11:01:34 -08:00
Alex Crichton
56400c3738 Don't use path dependencies in examples
This commit updates all examples to not use `path` dependencies but
rather use versioned dependencies like would typically be found in the
wild. This should hopefully make the examples more copy-pastable and
less alien to onlookers!

The development of the examples remains the same where they continue to
use the `wasm-bindgen`, `js-sys`, `web-sys`, etc from in-tree. The
workspace-level `[patch]` section ensures that they use the in-tree
versions instead of the crates.io versions.
2018-11-07 11:27:43 -08:00
Alex Crichton
cfa4aa0e3e Promote CI jobs to using stable Rust
Everything should be stable now so let's test it!
2018-10-28 13:28:02 -07:00
Pascal Hertleif
959deeea5d Fix unimportant typo 2018-10-06 21:09:18 +02:00
Alex Crichton
32fd1227e4
Merge pull request #910 from alexcrichton/fix-text-encoder-edge
Fix polyfill of `TextEncoder` and `TextDecoder`
2018-10-03 00:07:30 -07:00
Alex Crichton
bb7271aa43 Fix our WebIDL for Safari
This commit employs the strategy described in #908 to apply a
non-breaking change to fix WebIDL to be compatible with all browsers,
including Safari.

The problem here is that `BaseAudioContext` and `AudioScheduledSourceNode`
are not types in Safari, but they are types in Firefox/Chrome. The fix
here was to move the contents of these two interfaces into mixins, and
then include the mixins in all classes which inherit from these two
classes. That should have the same effect as defining the methods
inherently on the original interface.

Additionally a special `[RustDeprecated]` attribute to WebIDL was added
to signify interfaces this has happened to. Currently it's directly
tailored towards this case of "this intermediate class doesn't exist in
all browsers", but we may want to refine and extend the deprecation
message over time.

Although it's possible we could do this as a breaking change to
`web-sys` I'm hoping that we can do this as a non-breaking change for
now and then eventually on the next breaking release batch all these
changes together, deleting the intermediate classes. This is also
hopefully a good trial run for how stable web-sys can be when it's
actually stable!

cc #897
cc #908
2018-10-01 12:24:37 -07:00
Alex Crichton
717cfa303d Fix polyfill of TextEncoder and TextDecoder
This commit does a few things, including:

* Fixing the generated JS of `wasm-bindgen` to allow polyfills to work.
  (a minor tweak of the generated JS)

* All examples are updated to include a Webpack-specific polyfill for
  these two types to get examples working in Edge.

* A new page has been added to the guide about supported browsers. This
  mentions known caveats like IE 11 requiring `wasm2js` as well as
  documenting some `TextEncoder` and `TextDecoder` workarounds for Edge.

Closes #895
2018-09-30 10:16:20 -07:00
Alex Crichton
bc36b6f84b Add catch(console.error) to all examples
Some examples have been failing to load in some browsers, and this
ensures that whenever the promise to load Rust code fails we log any
errors happening instead of accidentally failing silently.

This helped debug a bit in #897
2018-09-28 13:55:07 -07:00
Nick Fitzgerald
826619870f examples(webaudio): allow turning the noise off again 2018-09-26 10:37:12 -07:00
Cameron Taggart
052b41b84c update to "webpack-cli": "^3.1.1" 2018-09-25 18:50:27 -07:00
Alex Crichton
e353c1cf6f Build examples and deploy to gh-pages
Rejigger Travis slightly to take advantage of build stages to build the
`gh-pages` branch amongst a set of builders, and then when they're all
done we synchronize and deploy the site. For now use S3 as a backing
store for data between jobs.
2018-09-20 20:55:02 -07:00
Alex Crichton
3efe51eb8b Reorganize and rewrite examples
This commit is a large-ish scale reorganization of our examples. The
main goal here is to have a dedicated section of the guide for example,
and all examples will be listed there. Each example's `README` is now
just boilerplate pointing at the guide along with a blurb about how to
run it.

Some examples like `math` and `smorgasboard` have been deleted as they
didn't really serve much purpose, and others like `closures` have been
rewritten with `web-sys` instead of hand-bound bindings.

Overall it's hoped that this puts us in a good and consistent state for
our examples, with all of them being described in the guide, excerpts
are in the guide, and they're all relatively idiomatically using
`web-sys`.
2018-09-20 16:45:30 -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
Laurentiu Nicola
89005f3469 Examples: use html-webpack-plugin 2018-09-11 08:42:22 +03:00
Nick Fitzgerald
42ea38187f examples(webaudio): Tidy up the webaudio example 2018-09-10 17:50:34 -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
Alex Crichton
90fce8c9d4 Fix audio example 2018-08-30 13:45:42 -07:00
Alex Crichton
92b7de3d3d Skip args in overloaded method names if all same
This commit updates how we name overloaded methods. Previously all argument
names were concatenated, but after this commit it only concatenates argument
names where at least one possibility has a different type. Otherwise if all
possibilities have the same type name it in theory isn't adding too much more
information!

Additionally this commit also switches to using `_with_` consistently everywhere
instead of `_with_` for constructors and `_using_` for methods.

Closes #712
2018-08-20 10:30:02 -07:00
Alex Crichton
305ecb7910 Remove nll feature from webaudio example 2018-08-19 14:42:25 -07:00
Alex Crichton
d4297ad2d3 Remove use_extern_macros features
This has now been stabilized!
2018-08-19 14:33:01 -07:00
Andrew Chin
4f18e21659 Initial example of using the WebAudio APIs from web-sys
Part of #443
2018-08-17 07:02:48 -04:00