Commit Graph

2517 Commits

Author SHA1 Message Date
RSSchermer
15e5162275 Add bufferData and clearBuffer to immutable slice whitelist 2019-05-02 18:19:31 +02:00
Alex Crichton
358ee18ab2
Merge pull request #1466 from fitzgen/log-stacks
Log stacks of imported JS functions that throw but aren't marked `catch`
2019-05-01 16:51:50 -05:00
Alex Crichton
a13eb10763
Merge pull request #1503 from alexcrichton/fix-web-imports
Fix direct imports in `--target web`
2019-05-01 15:56:40 -05:00
Alex Crichton
22eb34d9ab Fix direct imports in --target web
Currently the import object constructed for the `--target web` output
only ever includes the current module as an one of the modules included.
With `wasm-bindgen`'s optimization to import directly from modules,
however, it's possible to have more modules imported from in the
generated wasm file. This commit ensures that the imports are hooked up
in the `--target web` es6 emulation mode, ensuring there aren't
extraneous errors about import objects.
2019-05-01 13:53:59 -07:00
Alex Crichton
8174973c81
Merge pull request #1504 from alexcrichton/fix-drop-ref-showing-up
Fix `__wbindgen_object_drop_ref` unnecessary bindings
2019-05-01 15:52:50 -05:00
Alex Crichton
c96e3ce097 Fix __wbindgen_object_drop_ref unnecessary bindings
This commit fixes an issue where bindings for
`__wbindgen_object_drop_ref` are generated even if the function isn't
actually used by the final wasm file. This is currently due to the fact
that we run gc passes pretty late in wasm-bindgen and one of the
intrinsics that ended up getting gc'd referenced the
`__wbindgen_object_drop_ref` intrinsic function.

The fix here is somewhat naive by just updating the intrinsic to not
actually use `__wbindgen_object_drop_ref`. This may not be a long-term
solution but it should be good enough for now at least.
2019-05-01 12:13:12 -07:00
Alex Crichton
c127ef7691
Merge pull request #1502 from xtuc/patch-1
Update webpack.config.js
2019-05-01 10:46:05 -05:00
Sven Sauleau
98de4d7098
Update webpack.config.js 2019-05-01 17:43:50 +02:00
Alex Crichton
187a289ec8
Merge pull request #1499 from RReverser/patch-2
Fix CHANGELOG for 0.2.43
2019-05-01 08:15:29 -05:00
Ingvar Stepanyan
c6428e2234
Fix CHANGELOG for 0.2.43
"Bindings for some variadic functions ..." line referenced irrelevant PRs.

Moved them to correct places and updated the line with relevant PR link instead.
2019-05-01 01:19:05 +01:00
Alex Crichton
578d59ebc0
Merge pull request #1440 from c410-f3r/getters
Getters/Setters for fields
2019-04-30 12:07:34 -05:00
Alex Crichton
3031c15bf6 Rewrite docs for getters/setters 2019-04-30 10:06:38 -07:00
Alex Crichton
c70ed36be4 Add some tests which do computation in getters/setters 2019-04-30 10:02:11 -07:00
Caio
470eea9fb0 Getters/Setters for fields 2019-04-30 10:26:03 -03:00
Alex Crichton
402e72ed39
Merge pull request #1495 from alexcrichton/bump
Bump to 0.2.43
2019-04-29 11:21:21 -05:00
Alex Crichton
f2429be07f Bump to 0.2.43 2019-04-29 08:28:41 -07:00
Alex Crichton
77d2c2856e Don't rustfmt web-sys bindings
File is then too large to upload to GitHub!

Closes #1482
2019-04-29 08:20:01 -07:00
Alex Crichton
103da22692
Merge pull request #1494 from limira/patch-1
update 'host bindings' -> 'web idl bindings'
2019-04-29 09:27:30 -05:00
Alex Crichton
60bb68649b
Merge pull request #1490 from RReverser/deprecate-custom-try-from
Recommend to use dyn_ref on funcs and strings
2019-04-29 09:08:00 -05:00
Caio
0c4cdefd07 Rustfmt 2019-04-29 09:45:23 -03:00
limira
9c7faefed1
update 'host bindings' -> 'web idl bindings' 2019-04-28 13:58:22 +07:00
Alex Crichton
36c0a1347d
Merge pull request #1492 from RReverser/function-new-with-args
Add bindings for `new Function(args, body)`
2019-04-26 12:05:46 -05:00
Alex Crichton
4865b08513
Merge pull request #1491 from RReverser/more-variadic
Add missing variadic bindings for string methods
2019-04-26 12:04:36 -05:00
Ingvar Stepanyan
814f576b1d Add bindings for new Function(args, body)
We don't support variadic args in front, but, luckily for us, `new Function` accepts comma-separated args as a single string as well (see updated JSON test for an example).
2019-04-26 17:42:23 +01:00
Ingvar Stepanyan
85eea18658 Adds missing variadic bindings for string methods
- `JsString::from_code_point` - allows to create JS strings using slice of codes in WASM memory.
 - `JsString::from_char_code` - same as above, but also uses updated signature with `u16` instead of `u32` (partially helps with #1460 at least for the new binding).
2019-04-26 16:57:34 +01:00
Ingvar Stepanyan
ccc99cd047 Recommend to use dyn_ref on funcs and strings
Now that functions and strings work properly with custom typechecks, these custom methods seem obsolete, so I'd recommend to use standard dyn_ref instead.
2019-04-26 15:50:08 +01:00
Alex Crichton
26f9d86f62
Merge pull request #1487 from ibaryshnikov/shared_array_buffer_tests
Added tests for SharedArrayBuffer
2019-04-26 09:38:16 -05:00
Alex Crichton
cd7aa717c5
Merge pull request #1467 from RReverser/tuple-structs
Generate bindings for indexed struct properties
2019-04-26 09:21:36 -05:00
Alex Crichton
38fcfc3125
Merge pull request #1456 from bakkot/object-from-entries
js-sys: add Object.fromEntries
2019-04-26 09:10:53 -05:00
Kevin Gibbons
70480ad29d fix test 2019-04-25 21:21:17 -07:00
Kevin Gibbons
a32d2553fc js-sys: add Object.fromEntries 2019-04-25 20:52:29 -07:00
Alex Crichton
7f4f9ce136
Merge pull request #1486 from alexcrichton/fix-raytrace
Fix raytrace example by using an older nightly
2019-04-25 22:30:03 -05:00
Alex Crichton
26df24ae6a
Merge pull request #1484 from alexcrichton/new-node
Upgrade version of node.js used on Azure
2019-04-25 22:14:31 -05:00
ibaryshnikov
af22a26880 added tests for SharedArrayBuffer 2019-04-26 10:59:06 +08:00
Alex Crichton
7e512ba187
Merge pull request #1463 from ibaryshnikov/atomics-support
added Atomics and SharedArrayBuffer
2019-04-25 21:48:55 -05:00
Alex Crichton
4156a37856
Merge pull request #1485 from alexcrichton/missing-vector-len
Add missing `expose_wasm_vector_len`
2019-04-25 21:48:09 -05:00
Alex Crichton
03299a73b4 Fix raytrace example by using an older nightly
Unfortunately xargo is currently broken against master Rust, so let's
pin to an older nightly while that's sorted out
2019-04-25 19:47:59 -07:00
Alex Crichton
dea5bad698 Fix test for node 12 2019-04-25 19:30:32 -07:00
Alex Crichton
21205eccf2 Add missing expose_wasm_vector_len
Found through some testing I did awhile back!
2019-04-25 19:21:13 -07:00
Alex Crichton
7882fe7807 Upgrade version of node.js used on Azure
Pulls in some nice new features!
2019-04-25 19:16:58 -07:00
ibaryshnikov
b05ae44a8c changed f64 to i32 in static methods of Atomics, changed static_method_of to js_namespace, set typed_array type to Int32Array in notify and wait methods 2019-04-26 01:56:58 +08:00
ibaryshnikov
58245b0587 changed String to JsString in Atomics::wait 2019-04-26 00:02:19 +08:00
ibaryshnikov
de2c2cf26c fixed Atomics::wait and Atomics::wait_with_timeout return type 2019-04-25 19:18:31 +08:00
Ingvar Stepanyan
a0a3a1446d Include props usage in exported_types example 2019-04-24 20:30:31 +01:00
Alex Crichton
cc89109004
Merge pull request #1473 from RReverser/chars
Add JsString <-> char conversions
2019-04-24 09:49:56 -07:00
Ingvar Stepanyan
680a6bbb0c Remove PartialEq<char> for JsString for now
This seems to spark controversy, so removing for now but should be easy enough to still add in the future.
2019-04-24 13:40:18 +01:00
ibaryshnikov
0759bfa7e2 f32 changed to f64 in Atomics 2019-04-24 00:27:15 +08:00
ibaryshnikov
f1eaefdf0d fixed value types in Atomics methods 2019-04-24 00:25:25 +08:00
ibaryshnikov
1071457c3d added SharedArrayBuffer and Atomics to js-sys 2019-04-24 00:01:15 +08:00
Ingvar Stepanyan
bc4a98d146 Add JsString <-> char conversions
These are pretty common and already supported via ABI conversions, yet pretty easy to get wrong when converting them manually.

Fixes #1363.
2019-04-23 15:54:06 +01:00