Commit Graph

1412 Commits

Author SHA1 Message Date
Johann Hofmann
04a3e596a5
Fix bindings link in README.md 2018-01-20 18:47:44 +01:00
Alex Crichton
9f939d9625
Merge pull request #4 from rillian/typo
Fix typos in the README.
2018-01-15 15:24:44 -08:00
Ralph Giles
5b37523d87 Fix typos in the README. 2018-01-15 15:12:38 -08:00
Alex Crichton
b8292a617a Try to fix Travis 2018-01-08 14:57:00 -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
0b81185c99 Expose primitive information about JsObject
Adds bindings for wbindgen to fill in via JS bindings to read the various
primitive properties of a JS value.
2017-12-31 15:45:47 -08:00
Alex Crichton
996c296de8 Disable incremental for tests
Seems buggy?
2017-12-31 14:48:56 -08:00
Alex Crichton
4151461ab9 Expose construction of a JsObject as a string
Start fleshing out the `JsObject` API!
2017-12-31 14:44:44 -08:00
Alex Crichton
8ba64bab68 Update to syn master 2017-12-31 14:40:57 -08:00
Alex Crichton
e03ef1c2a4 Enable wasm-bindgen -h
Closes #3
2017-12-27 07:50:43 -08:00
Alex Crichton
c0e2cb3ac8
Merge pull request #2 from fschutt/master
Remove synom
2017-12-27 09:18:42 -06:00
Felix Schütt
33679a2b02 Removed synom due to regression in c5ab8c6b9f 2017-12-27 10:27:58 +01:00
Alex Crichton
bef908a9b1 Add an option to "uglify" imports
This commit adds an option to "uglify" the wasm module's imports/exports so
those which are controlled by bindgen are renamed to a shorter (probably one
letter) names. This'll hopefully help cut down on both the wasm size slightly
and also the generated JS as the glue we're talking to wasm over won't require
such large names all the time.
2017-12-24 15:32:40 -08:00
Alex Crichton
240d3cd1a1 Rename __wasmPtr field to ptr
May as well have it be a bit shorter so minifiers can be a little smaller.
2017-12-24 09:41:57 -08:00
Alex Crichton
97be6d35ce Add get_mut to WasmRefCell 2017-12-21 12:28:30 -08:00
Alex Crichton
44a9555313 Extract null check throw to a separate function
Slightly smaller callsite!
2017-12-21 12:25:13 -08:00
Alex Crichton
6aacff6a80 Further optimize non-debug output
Remove a bunch of exception throws in favor of type casts in TypeScript and
remove some type assertions as well that TypeScript should uphold.
2017-12-20 13:24:18 -08:00
Alex Crichton
5d697c196f Only expose assertions in debug mode 2017-12-20 12:56:57 -08:00
Alex Crichton
f1d425b943 Hook up debug to the CLI 2017-12-20 12:50:10 -08:00
Alex Crichton
b548239e02 Don't generate code for dead imports 2017-12-20 11:34:53 -08:00
Alex Crichton
5e80b082a9 Allow imports to return JS objects 2017-12-20 10:44:08 -08:00
Alex Crichton
294c5e147b Support passing booleans back and forth 2017-12-20 10:22:18 -08:00
Alex Crichton
730ef1926e Enable the --declaration tsc argument 2017-12-20 08:25:45 -08:00
Alex Crichton
8d7e6f3cdd Ok, let's actually expose memory
May as well have it typed!
2017-12-20 08:22:30 -08:00
Alex Crichton
2fbd784002 Disable tslint automatically
This is generated code, no need to lint it
2017-12-20 08:21:19 -08:00
Alex Crichton
97957d98f1 Fix noUnusedParameters warning 2017-12-20 08:17:20 -08:00
Alex Crichton
5fe842e9bd Allow extra exports not part of wasm-bindgen
Currently throw them all in an interface under `extra` in the main exports
interface. May change in the future...
2017-12-20 08:11:06 -08:00
Alex Crichton
a12a8f414c Support imports outside of wasm_bindgen! 2017-12-20 07:58:41 -08:00
Alex Crichton
66ae545bff Add support for raw pointers in Rust 2017-12-20 07:35:14 -08:00
Alex Crichton
737bd8c965 Add objects to the top of the README 2017-12-19 20:00:52 -08:00
Alex Crichton
91fddfd10f Improve consistency of prefixes 2017-12-19 20:00:25 -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
5b079b8f60 Update gist output 2017-12-19 19:21:43 -08:00
Alex Crichton
85cdb51719 Generate TypeScript by default instead of JS
This is what's needed in the immediate future anyway, so let's do that!
2017-12-19 19:06:48 -08:00
Alex Crichton
34e4cfa95d Link to generated JS bindings 2017-12-19 09:33:52 -08:00
Alex Crichton
db37034d11 Add some notes about impl details of objects 2017-12-19 09:30:57 -08:00
Alex Crichton
597fd98744 Test installation on CI as well 2017-12-19 09:28:31 -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
9ec77e2b44 Add a basic README which at least attempts 2017-12-18 16:35:36 -08:00
Alex Crichton
9eb63fd0df Try to fix tests on windows again 2017-12-18 16:35:04 -08:00
Alex Crichton
9369ae9522 Try installing node on AppVeyor 2017-12-18 16:29:45 -08:00
Alex Crichton
ebc97438e7 Add a test that two mutable borrows is not ok 2017-12-18 16:24:31 -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
ac1acf55ac Fix a typo in passStringToWasm 2017-12-18 15:37:28 -08:00
Alex Crichton
d768b42a64 First pass at implementing functions for browsers 2017-12-18 15:14:13 -08:00