c63d57f6d7
Add some more doc comments
2018-06-22 11:10:37 -07:00
5eda5504e9
Merge pull request #273 from FreeMasen/validate-ptr
...
Validate ptr
2018-06-19 16:45:31 -07:00
224d20337f
Merge pull request #274 from fitzgen/js-sys
...
Expose objects and functions from the JavaScript global scope
2018-06-19 10:42:04 -07:00
d9cac3bd90
Don't document descriptor functions
...
They aren't part of any public API, and are just an implementation detail of
wasm-bindgen.
2018-06-18 16:44:19 -07:00
132103eb06
cli-support: Ignore missing descriptor functions
...
This can happen when a nested dependency crate exports things but the root crate
doesn't use them. In these cases, it is fine to ignore the missing descriptor,
because the thing it describes was removed as dead code.
2018-06-18 16:41:01 -07:00
749ac6502f
add ptr validation
2018-06-17 20:13:56 -05:00
0938858aa8
webidl: add support for static attributes
2018-06-15 12:22:14 -07:00
fe5cde8636
webidl: add support for static methods
2018-06-15 12:09:42 -07:00
639ccd53ce
Merge pull request #269 from ohanar/webidl_constructor
...
webidl: add support for (named) constructors
2018-06-15 11:35:29 -07:00
2d7e7cd73e
Update js formatting
2018-06-15 12:55:37 -05:00
19d6cf1488
Copy doc comments from Rust to JS ( #265 )
...
* backend comments complete
* better matching
* gen comments
* Add example
* Move test bindings gen to own fn
* move build step into build fn
* add fn to read js, refactor gen_bindings/test to allow for this
* Add comments test
* Update readmes
* add comments to travis
* fix broken tests
* +x on build.sh
* fix wbg cmd in build.sh
* Address fitzgen's comments
2018-06-15 09:20:56 -07:00
cbec42e86c
webidl: add support for named constructors
2018-06-14 16:20:20 -07:00
c65cb51fba
webidl: add support for constructors
2018-06-14 16:15:25 -07:00
400015a061
webidl: refactor method/getter/getter generation
2018-06-14 14:39:04 -07:00
be0e436c03
webidl: add basic support for attributes
2018-06-11 18:45:19 -07:00
d065f4b05d
webidl: add support for typedefs
2018-06-11 18:43:45 -07:00
04907477ba
webidl: translate methods from camelCase to snake_case
2018-06-09 21:49:42 -07:00
37eaca47b4
Pretty print output on main example
2018-06-07 14:58:20 -03:00
d6ec2289fc
Remove wrong types conversion from js to rust
...
We can revisit this when we have better tests.
2018-06-07 14:57:44 -03:00
fa8961e56a
Add prototype of wasm-bindgen-typescript
2018-06-04 17:28:12 -03:00
8865e019f8
webidl: add features necessary to support Event.initEvent
...
1. Adds support for binding `DOMString` arguments to `&str`.
2. Ignore whether an argument is optional, and just always emit bindings for it.
2018-06-01 16:41:15 -07:00
cb5bd3b9c9
Merge pull request #225 from fitzgen/webidl
...
webidl: Add logging and use env_logger in the tests
2018-06-01 16:09:36 -07:00
8faebc56f2
webidl: Add logging and use env_logger in the tests
2018-06-01 16:09:15 -07:00
659583b40d
Implement PartialEq
for JsValue
( #217 )
...
Dispatch to JS's `===` operator internally
2018-06-01 16:47:45 -05:00
cb1e5cf136
Optimize JsValue::{from_bool, undefined, null} constructors ( #220 )
...
This commit optimizes constructing an instance of `JsValue` which is one of
`null`, `undefined`, `true`, or `false`. These are commonly created on the Rust
side of things and since there's only a limited set of values we can easily
prepopulate the global slab with a few entries and use hardcoded indices to
refer to these constants. This should avoid the need to travel into JS to insert
a `null` or and `undefined` into the global slab.
2018-06-01 16:46:42 -05:00
346d2fda22
Merge pull request #223 from fitzgen/webidl
...
webidl: emit methods for regular operations on interfaces
2018-06-01 14:22:11 -07:00
a4428f01b6
Update parity-wasm dependency
2018-06-01 07:48:32 -07:00
7ea0a7cc26
webidl: emit methods for regular operations
2018-05-31 22:54:40 -07:00
c7819930b4
backend::ast: rustfmt
2018-05-31 22:52:43 -07:00
ce8238cdd8
webidl: Compile and test the bindings emitted from WebIDL compilation
2018-05-31 22:52:43 -07:00
a3d91bdd7c
webidl: make writing new tests really easy
2018-05-30 15:45:01 -07:00
c773b29d6d
webidl: add compile
and compile_file
...
These will be the functions invoked by crates compiling WebIDL into wasm-bindgen
Rust sources inside `build.rs`.
2018-05-30 14:30:40 -07:00
a30ccd7c18
webidl: Use Default for pub
tokens ( #215 )
2018-05-30 15:07:20 -05:00
4a54e6fd52
Merge pull request #214 from fitzgen/webidl
...
Add a WebIDL frontend
2018-05-30 11:52:16 -07:00
6d23c8533b
Avoid deprecated constructor
2018-05-29 18:02:00 -07:00
5e94dc2b75
Update parity-wasm dependency
2018-05-29 18:00:09 -07:00
3879f6f427
Introduce the wasm-bindgen-webidl frontend
...
This is still a work in progress. Parse WebIDL source text and convert it into
wasm-bindgen AST, so that we can automatically emit bindings for the types and
functions described in the WebIDL.
2018-05-29 14:22:53 -07:00
6885ea073e
Only derive extra traits when the extra-traits
feature is enabled
2018-05-29 11:24:40 -07:00
07d5afa268
backend: All AST types should implement Eq
2018-05-25 16:33:22 -07:00
018f083402
backend: All AST types should implement Debug
2018-05-25 16:20:07 -07:00
50b8842b95
Add a feature for printing the macro's generated code ( #212 )
2018-05-25 18:17:54 -05:00
4c27c349ea
Bump to 0.2.11
2018-05-24 08:56:28 -07:00
7009c506c1
Revert "Revert "Revert "Disable the span
feature temporarily"""
...
This reverts commit b3cb44eb53
.
2018-05-24 07:16:36 -07:00
4ddd93d75d
add char support ( #206 )
...
* add char support
* add char test
* remove __wbindgen_char fns
* re-order travis script
* update serve script
* remove binds to unused char functions
* add more wide character items to chars list
* remove unused code
* add char to readme
* remove built file
2018-05-22 12:34:41 -05:00
17861a45ab
Improve the --wasm2asm
flag of wasm2es6js
...
* Don't glob import modules an instead selectively only import required items
* Be compatible with node.js and avoid the usage of `self`
2018-05-22 08:31:35 -07:00
dd76707ea1
Prevent use-after-free with vectors
...
Awhile back slices switched to being raw views into wasm memory, but this
doens't work if we free the underlying memory unconditionally! Moving around a
`Vec` is already moving a lot of data, so let's copy it onto the JS heap instead
of leaving it in the wasm heap.
2018-05-21 11:23:46 -07:00
cfe7ebd463
Disallow structs w/ lifetime/type parameters
...
These can't work currently with wasm-bindgen, but maybe one day!
Closes #200
2018-05-21 09:13:17 -07:00
b3cb44eb53
Revert "Revert "Disable the span
feature temporarily""
...
This reverts commit a10a0c8cfd
.
2018-05-21 08:08:21 -07:00
a10a0c8cfd
Revert "Disable the span
feature temporarily"
...
This reverts commit 45b68870dc
.
2018-05-21 07:30:10 -07:00
e76f5537e0
Upgrade to new versions of proc-macro2
...
Gonna get some nice spans back!
2018-05-21 07:29:34 -07:00