Commit Graph

3099 Commits

Author SHA1 Message Date
Alex Crichton
9c5a6dfff6
Merge pull request #2176 from jakobhellermann/deno-target
add deno target
2020-06-03 16:20:30 -05:00
Jakob Hellermann
665785e690 add deno test mode, enabled by WASM_BINDGEN_USE_DENO=1 2020-06-03 22:37:17 +02:00
Jakob Hellermann
77bf0e9e6b make wasm-bindgen-test-runner easier to expand 2020-06-03 22:33:15 +02:00
Jakob Hellermann
addb0824d1 fix deno import logic to include non-placeholder-module imports 2020-06-03 22:33:15 +02:00
Jakob Hellermann
84c7cf01ce address pr comments 2020-06-03 22:31:05 +02:00
Alex Crichton
36dcbb8066
Remove type=module from no-modules example (#2184)
We're not using ES modules, so use just a normal script!

Closes #2182
2020-06-03 11:39:18 -05:00
Alex Crichton
8edcda4095
Update threads-xform for current nightly (#2183)
This commit updates the threads transformation for LLVM 10 where LLD has
has breaking changes from LLVM 9. While previously the support here
attempted to straddle multiple LLVM styles this is now removed in favor
of simply supporting LLVM 10's style of output. This means that
wasm-bindgen will only be compatible with recent nightlies and forward.

The major change here is that the `__wasm_init_memory` function is
automatically called by the `start` function. We handle that by placing
the previous `start` function first, before stack/tls allocation. Other
changes are to delete all the old code from pre-llvm-9.

Closes #2175
2020-06-03 11:39:10 -05:00
Erlend
0d39f9013f
Fix broken links for Reflect (#2147)
Contributes to https://github.com/rustwasm/book/issues/203
2020-06-03 10:46:06 -05:00
Alex Crichton
b56233a3ad Remove type=module from no-modules example
We're not using ES modules, so use just a normal script!

Closes #2182
2020-06-03 08:40:54 -07:00
Jakob Hellermann
79f96af262 add deno target 2020-06-01 16:07:19 +02:00
Chris Morin
107606560e
Fix typo in Closure example code (#2174) 2020-06-01 08:38:13 -05:00
Alex Crichton
cc36bdc00d
Fix codegen of consuming setters/getters (#2172)
Make sure they reset their internal pointer to null after we call Rust
since it invalidates the Rust pointer after being called!

Closes #2168
2020-05-29 15:28:52 -05:00
Maciek Talaśka
b5e377da78
enhance wasm-bindgen installation doc (#2171) 2020-05-29 15:17:01 -05:00
Hajime Fukuda
87663c6d2a
Enable nested namespace (#951) (#2105)
* Enable nested namespace (#951)

* Specify the namespace as array (#951)

* added an example to the document

Co-authored-by: Alex Crichton <alex@alexcrichton.com>
2020-05-27 10:36:20 -05:00
Michael
e0ad7bfeac
Add another example to js_namespace (#2157) 2020-05-27 10:34:41 -05:00
Alex Crichton
df809df9a5
Bump to 0.2.63 (#2163)
* Update `syn` version requirement

Require latest version to fix issues with nightly.

* Bump to 0.2.63
2020-05-27 10:07:18 -05:00
Alex Crichton
47ccb49e4c
Unpin nightly toolchain (#2161)
Seeing what's left on CI to fix
2020-05-27 09:42:30 -05:00
Rahul Butani
3dd8f3d2ac
Handle the possibility that the class name is in its own Group (#2159)
* Handle the possibility that the class name is in its own Group

rust-lang/rust#72388 makes this happen

* Handle Groups in more places

* fmt!

* Add some functions to handle Groups

As suggested by @alexcrichton [here](https://gist.github.com/alexcrichton/3c93ab2547d45d9caa3b72309cd4262b).
2020-05-26 15:08:56 -05:00
Alex Crichton
cf45d5b24a Pin to an older nightly to fix CI 2020-05-26 08:26:12 -07:00
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