Alex Crichton
105a6bc853
js_sys: Use a thread local to cache global()
...
When we add threads it's not actually valid to have a global cache as
the index is only valid on one thread! Instead let's use a per-thread
cache using `thread_local!` which compiles to basically the same code as
before for single-threaded wasm.
2018-10-10 16:01:32 -07:00
Alex Crichton
70e13705b4
Merge pull request #952 from alexcrichton/field-export
...
Fix bindings for classes only referenced through struct fields
2018-10-10 11:55:24 -07:00
Nick Fitzgerald
fe35750448
Merge pull request #953 from alexcrichton/bigint
...
Add caveat for `BigInt` and `u64` in browser support
2018-10-10 11:44:04 -07:00
Alex Crichton
5957289ef2
Add caveat for BigInt
and u64
in browser support
...
Closes #948
2018-10-10 10:30:32 -07:00
Alex Crichton
f6cb73442a
Fix bindings for classes only referenced through struct fields
...
The bindings generation for a class would accidentally omit the `__wrap`
function if it was only discovered very late in the process that
`__wrap` was needed, after we'd already passed the point where we needed
to have decided that.
This commit moves struct field generation of bindings much earlier in
the binding generation process which should ensure everything is all
hooked up by the time we generate the classes themselves.
Closes #949
2018-10-10 10:21:19 -07:00
Alex Crichton
35eeb711ad
Merge pull request #947 from fitzgen/use-global-allocator-not-system
...
Use the global allocator, not the system allocator
2018-10-10 08:43:23 -07:00
Nick Fitzgerald
3ceb0441d3
Use the global allocator, not the system allocator
...
This was previously causing us to accidentally always pull in the system
allocator, even if users were trying to just use a custom global allocator.
2018-10-09 18:08:46 -07:00
Alex Crichton
d70149dd91
Merge pull request #946 from fitzgen/guide-testing-wasm-pack
...
guide: clarify testing docs; prefer `wasm-pack`-based workflows
2018-10-09 09:38:18 -07:00
Nick Fitzgerald
8d195d07ee
guide: clarify testing docs; prefer wasm-pack
-based workflows
2018-10-09 09:31:01 -07:00
Alex Crichton
1410b5253d
Merge pull request #944 from alexcrichton/windows-slash
...
Fix web-sys build on some Windows builds
2018-10-08 12:46:44 -07:00
Alex Crichton
6a9ad2e5d3
Merge pull request #942 from alexcrichton/parity-wasm-public
...
Update parity-wasm dependency
2018-10-08 12:46:35 -07:00
Alex Crichton
a40b27da60
Merge pull request #941 from alexcrichton/fix-201
...
Add tests for internal imports now working
2018-10-08 10:20:05 -07:00
Alex Crichton
18deb5e848
Fix web-sys build on some Windows builds
...
The official pathname separator on Windows is `\` instead of `/`, but
we've been unconditionally using `/`. This typically works on Windows
because Cargo's default `OUT_DIR` listing is a normal `C:\...` path
which works with either `/` or `\`. If, however, a user sets
`CARGO_TARGET_DIR` to a UNC-style path like `\\?\C:\...` then `/` is
*not* the same as `\`, but rather `/` is interpreted as part of the file
name (to allow file names with `/` in the name).
Let's bypass all this and just use a build script output env var.
Closes #943
2018-10-08 10:19:43 -07:00
Alex Crichton
79e4324a3b
Update parity-wasm dependency
...
While doing this, make `parity-wasm` a public dependency of all crates
instead of using the `Any` trick as that's not really needed any more.
2018-10-08 10:01:53 -07:00
Alex Crichton
b868185637
Add tests for internal imports now working
...
These compiler bugs have now been fixed on nightly, so we just need to
wait for the bug fixes to ride the trains to be available to everyone!
Closes #201
2018-10-08 09:47:17 -07:00
Alex Crichton
e3e5c0f57d
Merge pull request #938 from killercup/patch-1
...
Fix unimportant typo
2018-10-06 14:12:25 -07:00
Pascal Hertleif
959deeea5d
Fix unimportant typo
2018-10-06 21:09:18 +02:00
Alex Crichton
5ee35524e9
Merge pull request #936 from alexcrichton/import-gc
...
Import the `wasm-gc-api` crate into this repository
2018-10-05 15:29:49 -07:00
Alex Crichton
4750927f11
Import the wasm-gc-api
crate into this repository
...
The `wasm-bindgen` crate is effectively the only user of this crate now
that the `wasm-gc` tool has been deprecated. It's also much easier to
keep it in this repository as it's easier to sync changes to
`parity-wasm`. I'd also like to start refactoring out utilities for
managing a `parity_wasm::Module` to share between this crate and the
other CLI support code.
2018-10-05 14:21:59 -07:00
Alex Crichton
4357d7d23d
Merge pull request #934 from alexcrichton/bump
...
Bump to 0.2.24
2018-10-05 11:20:50 -07:00
Alex Crichton
c210ccd596
Bump to 0.2.24
2018-10-05 09:53:19 -07:00
Alex Crichton
f064f5a9d4
Merge pull request #933 from expobrain/basig_usage_fix
...
Update installation of toolchain in Basic Usage page
2018-10-05 09:25:19 -07:00
Daniele Esposti
882c6ef0ed
Update installation of toolchain in Basic Usage page
2018-10-05 17:15:22 +01:00
Alex Crichton
b6caad4df8
Merge pull request #932 from twilco/fix-broken-link
...
Fix broken link to contribution page
2018-10-05 08:41:03 -07:00
Tyler Wilcock
2aaa4b8fc6
Fix broken link to contribution page
2018-10-05 10:25:55 -05:00
Alex Crichton
e368e49af1
Merge pull request #928 from alexcrichton/node-args
...
Allow passing extra args to node in test runner
2018-10-04 23:13:58 -07:00
Alex Crichton
7eb49acf0d
Allow passing extra args to node in test runner
...
This can be useful for enabling experimental features
2018-10-04 22:20:23 -07:00
Nick Fitzgerald
64a39703ef
Merge pull request #930 from alexcrichton/ssl
...
Use `https` on badge url
2018-10-04 12:48:56 -07:00
Alex Crichton
c584b8ac84
Use https
on badge url
2018-10-04 11:10:35 -07:00
Nick Fitzgerald
7ea3ee60b7
Merge pull request #927 from alexcrichton/fix-browser
...
Fix the `no_modules` example by fixing `--browser`
2018-10-03 16:34:31 -07:00
Nick Fitzgerald
0b736c7ef0
Merge pull request #926 from alexcrichton/fix-warnings
...
Filter only for `RustDeprecated` in attrs
2018-10-03 16:33:46 -07:00
Alex Crichton
3f357f46eb
Fix the no_modules
example by fixing --browser
...
Recent refactorings forgot a case of emitting code for
`cachedTextDecoder`!
2018-10-03 15:54:57 -07:00
Alex Crichton
9eaba6e28b
Filter only for RustDeprecated
in attrs
...
Previously any string-related attribute would emit a deprecation
warning!
cc #925
2018-10-03 15:44:58 -07:00
Alex Crichton
84bda02bbf
Merge pull request #923 from alexcrichton/extends-path
...
Parse `Path`s in `extends` attributes
2018-10-03 10:38:50 -07:00
Alex Crichton
b7f1f9c086
Merge pull request #924 from alexcrichton/no-closure-new
...
Switch `Closure::new` to `wrap` in paint example
2018-10-03 10:38:39 -07:00
Alex Crichton
991e61931e
Switch Closure::new
to wrap
in paint example
...
Show off stable usage!
2018-10-03 09:53:55 -07:00
Alex Crichton
5df8e20815
Parse Path
s in extends
attributes
...
Closes #916
2018-10-03 09:14:23 -07:00
Alex Crichton
4a5e13b08b
Merge pull request #920 from alexcrichton/fix-borrow-mut
...
Fix exporting structs with `BorrowMut` in scope
2018-10-03 09:09:36 -07:00
Alex Crichton
05742177c2
Merge pull request #921 from alexcrichton/fix-typescript
...
Fix TypeScript for generated constructors
2018-10-03 09:09:23 -07: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
157750fd99
Fix TypeScript for generated constructors
...
It accidentally had a stray colon!
Closes #917
2018-10-03 00:00:54 -07:00
Alex Crichton
32b62b4358
Fix exporting structs with BorrowMut
in scope
...
Apparently the codegen wasn't precise enough such that a trait import
could cause method resolution to go awry!
Closes #919
2018-10-02 23:56:15 -07:00
Nick Fitzgerald
7ec1511d3d
Merge pull request #915 from alexcrichton/add-inline
...
Add a number of `#[inline]` annotation through crates
2018-10-02 16:46:32 -07:00
Alex Crichton
727e0a7154
Fix Closure::forget
...
It forgot to actually forget the contents!
2018-10-01 15:37:15 -07:00
Alex Crichton
332beecabe
Add a number of #[inline]
annotation through crates
...
Adding `#[inline]` will typically improve codegen for optimized builds
without LTO (so far the majority in practice) by allowing functions that
otherwise couldn't be inlined across codegen units to get inlined
across codegen units.
Right now `wasm-bindgen` has a lot of functions that are very small and
delegate to other functions, but aren't otherwise candidates for
inlining because they're concrete.
I was poking around in release-mode wasm recently and noticed an
alarming number of functions for tiny pieces of functionality, which
motivates this patch!
2018-10-01 15:31:09 -07:00
Alex Crichton
9c085dc0f5
Merge pull request #914 from alexcrichton/rename-polyfill
...
Rename `polyfill` to `vendor_prefix`
2018-10-01 14:47:07 -07:00
Alex Crichton
f75349262a
Rename polyfill
to vendor_prefix
...
cc #906
2018-10-01 14:45:30 -07:00
Alex Crichton
8e7238d15f
Fix test --release
...
Unfortuantely we need to do some linking trickery to make sure a custom
section is correctly pulled in...
2018-10-01 14:44:21 -07:00
Alex Crichton
a7e9da0a81
Merge pull request #879 from alexcrichton/closure-zst
...
Improve codegen for `Closure<T>`
2018-10-01 14:41:13 -07:00
Alex Crichton
3001d1e973
Merge pull request #909 from alexcrichton/fix-webidl
...
Fix our WebIDL for Safari
2018-10-01 14:40:56 -07:00