Commit Graph

3080 Commits

Author SHA1 Message Date
Tanner Rogalsky
1e1cab6202
Add a test that fails to compile if generated code triggers unused lint warning. (#2145)
* Add a test that fails to compile if generated code triggers unused lint warning.

* Fix formatting.
2020-05-19 09:43:44 -05:00
Tanner Rogalsky
047b4209ad
Explictly drop instead of relying on RAII. (#2144) 2020-05-18 15:24:21 -05:00
Alex Crichton
996e92f3ae
Mass rename anyref to externref (#2142)
Updates a mess of dependencies and tracks the most recent version of the
reference types specification.
2020-05-18 09:36:30 -05:00
Alex Crichton
61e8fc0d38 Update tests for new anyref syntax 2020-05-18 05:02:31 -07:00
str4d
6ba8c6c2ec
Add Blob.stream() method (#2140)
This enables a ReadableStream to be obtained for a file, which can then
be handled with e.g. https://github.com/MattiasBuelens/wasm-streams

    let file: web_sys::File = ...;
    let stream = wasm_streams::readable::ReadableStream::from(
        file.stream()
            .unchecked_into::<wasm_streams::readable::sys::ReadableStream>(),
    );

WebIDL source: https://w3c.github.io/FileAPI/#blob-section
Docs: https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream
2020-05-18 06:59:16 -05:00
Yuji Sugiura
adad1fbf41
Add link to summary column (#2135) 2020-05-13 09:20:46 -05:00
Yuji Sugiura
f94e3772bb
[Examples] Add WebRTC DataChannel example (#2131)
* Add WebRTC DataChannel example

* Add guide

* Fix format

* Use webpack to build example
2020-05-12 14:00:33 -05:00
Markus Stange
6b5f7342a7
Remove outdated comment about path dependency. (#2129)
The path dependency was turned into a regular version dependency in PR #1015, so it doesn't need to be
called out as special anymore.
This commit also changes the phrasing in the preceding sentence.
2020-05-11 15:51:29 -05:00
Alex Crichton
8e3d6fe619
Update the walrus dependency (#2125)
This commit updates the `walrus` crate used in `wasm-bindgen`. The major
change here is how `walrus` handles element segments, exposing segments
rather than trying to keep a contiugous array of all the elements and
doing the splitting itself. That means that we need to do mroe logic
here in `wasm-bindgen` to juggle indices, segments, etc.
2020-05-06 12:57:02 -05:00
Alex Crichton
dc54c0fb25
Fix name collisions with test functions and intrinsics (#2123)
There was an unfortunate collision with how test symbols were named and
the various bindings functions exported by wasm-bindgen. This commit
fixes these issues by using a separate prefix for `#[wasm_bindgen_test]`
than other `#[wasm_bindgen]` functions which should avoid the name
clash.

Closes #2121
2020-05-04 16:20:41 -05:00
Alex Crichton
d896446edc
Bump to 0.2.62 (#2119) 2020-05-01 10:34:36 -05:00
Pauan
7bee6a8c19
Fixing require to be ignored by Webpack (#2115)
* Fixing require to be ignored by Webpack

* Making the module.require even more dynamic, to trick Webpack
2020-04-29 13:59:49 -05:00
Alex Crichton
6d61cd8b76
Bump to 0.2.61 (#2113) 2020-04-29 11:22:35 -05:00
Pauan
e16f7e41bf
Adding in wrapper file to fix circular dependency with Webpack 5 (#2110)
* Adding in wrapper file to fix circular dependency with Webpack 5

* Running rustfmt

* Fixing unit tests
2020-04-29 10:55:28 -05:00
Michael Kefeder
a521c9012c
Websockets binary msgs (#2109)
* info how to run webserver with non-EOL python3

* example how to send and receive binary messages over websockets
2020-04-28 13:16:54 -05:00
Michael Kefeder
8728f40aac
be more precise how to open the example in the browser (needs serving) (#2108) 2020-04-28 13:16:17 -05:00
Alex Crichton
69aef24acf Fix CI builds for now 2020-04-27 08:15:55 -07:00
Pauan
541e8f5359
No longer error for npm dependencies with web (#2103)
* No longer error for npm dependencies with web

* Fixing build error
2020-04-27 10:14:05 -05:00
Pauan
a479241c46
Merge pull request #2100 from vojta7/clipboard
Clipboard API
2020-04-23 10:00:00 +02:00
Vojtěch Pejša
4ff154fbfc Generate web-sys with old ClipboardEvent removed. 2020-04-23 07:15:47 +02:00
Vojtěch Pejša
d5da20c795 Remove old ClipboardEvent webidl 2020-04-23 07:12:39 +02:00
Vojtěch Pejša
e7361d8a36 Generate Clipboard APIs 2020-04-23 07:12:29 +02:00
Vojtěch Pejša
1d84a842cc Add clipboard webidl 2020-04-23 07:10:57 +02:00
Pauan
a22bbca92c
Making WebIDL generation deterministic (#2101)
* Making webidl generation deterministic

* Fixing line endings

* Regenerating WebIDL

* Running rustfmt
2020-04-22 20:01:40 -05:00
Pauan
7bc9147258
Improving the code generation for catch (#2098)
* Improving the code generation for catch

* Fixing newlines

* Running rustfmt

* Updating unit tests

* Fixing build error
2020-04-22 09:14:00 -05:00
Pauan
a93b778b5c
Fixing bug with Firefox extension content scripts (#2099) 2020-04-22 09:12:14 -05:00
a1trl9
3c40492fa3
exhausively match JSImportName (#2090) 2020-04-20 09:10:33 -05:00
Josh Groves
4900732f60
Add setBindGroup to immutable slice whitelist (#2087) 2020-04-17 10:08:35 -05:00
Chinedu Francis Nwafili
f7f47993f1
Update raytracing example browser support (#2083) 2020-04-16 16:36:57 -05:00
a1trl9
ad85de50c6
try to fix global / modulaized import ns conflict (#2057)
* use global import map for rename

* fix same ns import

* cargo fmt

* add basic test

* move generate_identifier, add comments, add tests

* remove leading &mut

* remove unnecessary bail

* use import_name for global and some refine

* Add back in error handling, clean up instruction iteration

* Remove unnecessary patch statements

Co-authored-by: Alex Crichton <alex@alexcrichton.com>
2020-04-15 08:28:29 -05:00
Pauan
a75570de31
Merge pull request #2082 from guest271314/master
Update README.md
2020-04-15 12:33:11 +02:00
guest271314
a1fe1113ce
Update README.md 2020-04-15 00:36:33 +00:00
0xd4d
826538922f
Copy more doc comments to JS/TS files, unescape comments (#2070)
* Copy more doc comments to JS/TS files, unescape comments

* Move unescape code to macro-support
2020-04-13 13:51:32 -05:00
Josh Groves
fc86589715
Update to latest WebGPU WebIDL (#2080) 2020-04-13 09:30:37 -05:00
0xd4d
2b128288c7
Add ability to rename enums (js_name = new_name) (#2071)
* Add ability to rename enums (js_name = new_name)

* Add a test
2020-04-13 09:14:41 -05:00
a1trl9
b9f78aba57
try to fix js_name error when both getter and setter used (#2074)
* try to fix js_name error when both `getter` and `setter` used

* add tests
2020-04-10 11:57:36 -05:00
Andrew Straw
301a5f36eb
Installation instructions for wasm-bindgen CLI tool (#2076)
* Installation instructions for wasm-bindgen CLI tool

* Recommend wasm-pack

* Justify recommendation of wasm-pack to install wasm-bindgen.

Co-authored-by: Duane Johnson <duane.johnson@gmail.com>
2020-04-10 11:33:52 -05:00
Alex Crichton
a19c8a3fe0
Bump to 0.2.60 (#2051)
* Bump to 0.2.60

* Try to fix CI

* Fix CI syntax
2020-03-25 16:33:36 -05:00
Alex Crichton
b0ebc98a64 Don't build webxr example
It requires unstable features currently
2020-03-17 07:50:11 -07:00
Alex Crichton
d04930c2a2 Run rustfmt 2020-03-17 07:49:46 -07:00
Alex Crichton
29fabdddb1 Update macos build agent 2020-03-17 07:26:11 -07:00
kevthecoder
2b29650920
Webxrdevice (#2000)
* crates/web-sys/webidls/enabled/WebXRDevice.webidl

* Add WebXR Web IDL.

* Add WebXr example.

* Workaround in WebXR for FrozenArray and XRWebGLLayer constructor.

* Remove commented code.

* Attempt to improve WebXr example.

* Add WebXr as unstable WebIDL.

* Fixes for XRWebGLLayer.

* Tidy up WebXR example code.

* Update WebXr example docs.

Co-authored-by: Kev Kirkland <kev.kirkland@elucidata.co.uk>
2020-03-17 09:14:05 -05:00
t-yng
3c85ae1fbf
fix contributing docs url (#2043) 2020-03-17 09:09:46 -05:00
Alex Crichton
ceac51f260 Fix a test for upstream changes 2020-03-17 07:02:50 -07:00
Christian Fosli
8f14ccc56d
Add CI example for GitHub Actions (#2044)
* Add CI example for GitHub Actions

* Don't rely on other GitHub actions
2020-03-17 09:02:12 -05:00
Pauan
5acd6a3451
Merge pull request #1986 from clearloop/master
Add typescript_type attribute
2020-03-13 03:02:06 +01:00
Ashley
8a3bdbd8ee
Allow changing the wasm-bindgen-test-runner timeout via an env variable (#2036)
* Add WASM_BINDGEN_TEST_TIMEOUT

* Formatting
2020-03-10 10:36:00 -05:00
Josh Groves
035902ab51
Update to latest WebGPU WebIDL (#2037) 2020-03-10 09:27:48 -05:00
daxpedda
5534253280
Fix undefined error in worker. (#2038) 2020-03-10 09:13:50 -05:00
Alex Crichton
6d5fc3dcca
reenable UTF-8 BOM tests (#2031) 2020-03-04 16:19:36 -06:00