Alex Crichton
e9d612a343
Implement optionally catching exceptions
2018-02-06 19:04:12 -08:00
Alex Crichton
43ee52bcbf
Change schemes for encoding custom type names
...
Store JSON a utf-32, map hashes of names to a `char` and store that name
in the map, and then do a reverse mapping when generating JS
2018-02-06 16:56:26 -08:00
Alex Crichton
ec5f0a29f7
Add a #[wasm_bindgen(constructor)] attribute
...
This can be used for specifying that a static function should actually delegate
to `new`
2018-02-06 15:25:46 -08:00
Alex Crichton
e60aa6a990
Rename JsObject
to JsValue
...
Let's reserve `JsObject` for something we actually know is an object
2018-02-06 15:04:46 -08:00
Alex Crichton
56b7fa453a
Fix some class import methods and auto gc
...
The runtime functions are now moved to the `wasm-bindgen` crate and are
auto-gc'd if they don't end up actually being required.
2018-02-06 08:58:15 -08:00
Alex Crichton
28966d9853
Fix String
type in imports
2018-02-06 08:39:49 -08:00
Alex Crichton
d2f2ed8c1a
Get the import-class
test working
2018-02-06 08:23:51 -08:00
Alex Crichton
d5ff725913
Greatly simplify handling of types in Rust
...
Push the compiler to do trait resolution to figure out what each type is bound
with in JS, and that way we can accept effectively all types (so long as they
implement a trait).
2018-02-06 07:56:14 -08:00
Alex Crichton
0320bc0d7c
more-wip
2018-02-05 16:39:11 -08:00
Alex Crichton
8f8da49dab
wip
2018-02-05 14:24:25 -08:00
Alex Crichton
28a25ef8b9
Update to released syn/quote verisons
2018-01-08 10:42:01 -08:00
Alex Crichton
5c0f9613f6
Update for syn
master
2018-01-02 12:30:47 -08:00
Alex Crichton
b2ce19bd3c
Update to master quote
2017-12-31 15:53:29 -08:00
Alex Crichton
8ba64bab68
Update to syn master
2017-12-31 14:40:57 -08:00
Felix Schütt
33679a2b02
Removed synom due to regression in c5ab8c6b9f
2017-12-27 10:27:58 +01:00
Alex Crichton
294c5e147b
Support passing booleans back and forth
2017-12-20 10:22:18 -08:00
Alex Crichton
66ae545bff
Add support for raw pointers in Rust
2017-12-20 07:35:14 -08:00
Alex Crichton
d3387d591f
Start optimizing code size:
...
* Use a bundled custom `WasmRefCell` instead of the one in the standard library.
This one primarily doesn't panic via libstd which means that its code
footprint is much smaller.
* Add a `throw` function to `wasm_bindgen`-the-crate which can be used to throw
an exception in JS from Rust. This is useful as a cheap way to throw an
exception code-wise (little code bloat) and it's also a great way of reporting
error messages to JS!
* Cut down on the code size of `__wbindgen_malloc` by aborting on huge requests
earlier.
* Use a custom `assert_not_null` function which delegates to `throw` to test for
incoming null pointers
2017-12-19 19:53:55 -08:00
Alex Crichton
946e5317fe
Support passing JS objects through Rust
2017-12-19 09:25:41 -08:00
Alex Crichton
eda9beae25
Get imports working in a basic capacity
2017-12-18 21:43:16 -08:00
Alex Crichton
1ffcb90d2d
Ensure class arguments have the expected type
2017-12-18 19:01:37 -08:00
Alex Crichton
eebe8b21a2
Fix generation for a fn with two string args
2017-12-18 16:13:37 -08:00
Alex Crichton
d38a448f15
Fix a hygiene issue with me
2017-12-18 15:54:43 -08:00
Alex Crichton
62808e8d99
Add some tests for exceptions
2017-12-18 14:44:09 -08:00
Alex Crichton
6593b5ef69
Classes are now working!
2017-12-18 14:31:01 -08:00
Alex Crichton
7c510a8a7e
Start adding support for classes
2017-12-18 12:39:14 -08:00
Alex Crichton
1b4f10217c
Start handling strings
2017-12-14 21:55:21 -08:00
Alex Crichton
2926e6e9f4
Initial commit
2017-12-14 19:31:01 -08:00