0bd8713bd5
Dropped node support in umd -> amd
2018-04-07 13:06:36 +05:45
2b9af53030
wasm is compiled, mod in uncompiled
2018-04-06 12:59:07 +05:45
1a428d69da
{global} not referenced
2018-04-05 20:30:58 +05:45
2877d0bdb6
UMD import added
2018-04-05 19:50:26 +05:45
3a83b02de0
Added umd switch
2018-04-04 20:06:53 +05:45
9723fdd69b
Merge pull request #100 from sendilkumarn/remove-coder-func
...
Reduce the JS file size and optimizing encoder and decoder functions
2018-04-04 08:46:36 -05:00
64d7c8d082
Update lib.rs
2018-04-04 11:27:27 +02:00
9421edaab5
add missed out TextEncoder
2018-04-04 11:22:34 +02:00
6d5afbb3d2
reduce the js file generated code
...
remove node test for browser test
update usages
revert test-support changes
2018-04-04 11:22:32 +02:00
0d1759abd5
Add description to backend crate
2018-04-03 14:02:04 -07:00
de3a7e3242
Remove nodejs-checking logic from math exports
...
Instead create a temporary vector which is used to later invoke the generic
`export` function
2018-04-03 13:29:26 -07:00
62e9f580d0
Use Context::export in write_classes
...
No need to doubly check for `nodejs`
2018-04-03 13:25:10 -07:00
23f6049619
Fixup various refactoring issues
2018-04-03 13:20:56 -07:00
7f614c3c3a
Reduce node/browser duplication
...
Centralize the export of a function to one location to reduce duplication in
various other locations checking whether Node is being targeted or not.
2018-04-03 13:12:28 -07:00
cc11505dc8
Remove an unused unsafe block
2018-04-03 12:53:24 -07:00
455e86ef6d
Merge branch 'node-math' of https://github.com/ashleygwilliams/wasm-bindgen
2018-04-03 12:53:15 -07:00
1ff9ccf072
Tighten up getStringFromWasm a bit
...
no need for some extra locals here
2018-04-03 12:44:35 -07:00
978b5ada63
Tighten up passStringToWasm a bit
...
Only emit `throw` on debug mode primarily
2018-04-03 12:44:09 -07:00
f1e8e2bee0
Remove GLOBAL_ARGUMENT_CNT JS binding
...
This is easier to manage statically so no need to track it dynamically
2018-04-03 12:38:33 -07:00
a805e04a81
Track next_global at codegen time
...
No need to track it at runtime as we should statically know its value!
2018-04-03 12:24:35 -07:00
8e5f5d20fc
Remove accidental double braces
2018-04-03 12:24:19 -07:00
76cc1ca295
Fix imports of TextEncoder/TextDecoder
2018-04-03 08:09:25 -07:00
30b1964255
Bump all crates to 0.2
2018-04-03 07:10:07 -07:00
bb2e0c205f
Merge pull request #77 from dflemstr/wasm-construct-js-class
...
Add support for constructing JsValue instances generically
2018-04-03 16:08:30 +02:00
782378e7c0
Update dependencies
2018-04-03 07:07:14 -07:00
540ccfac9d
Only generate JS class constructor export if import is needed
2018-04-03 11:28:25 +02:00
03433a0ef6
Update to recent WasmBoundary abi changes
2018-04-02 09:59:08 -07:00
73619b5d15
Add support for constructing JsValue instances generically
2018-04-02 09:59:01 -07:00
e6a483f906
Hurray for fun with hygiene!
2018-03-31 14:29:47 -07:00
f2254628dd
Fix a typo
2018-03-31 14:26:00 -07:00
9bc2718943
Clean up a bit of duplication in codegen
2018-03-31 09:38:31 -07:00
7880545b3b
Finish fixing fallout in all tests
2018-03-31 09:15:39 -07:00
2880247acf
Get the imports
test passing
2018-03-31 08:26:20 -07:00
cdbb31f3a9
Start removal of vector special-casing
...
This commit starts wasm-bindgen down a path of removing the special
casing it currently has around vectors, slices, and strings. This has
long been a thorn in wasm-bindgen's side as it doesn't handle other
kinds of vectors and otherwise is very inflexible with future additions.
Additionally it leads to a lot of duplicated-ish code throughout various
portions of codegen.
The fundamental reason for this was that two arguments were required to
be passed back to wasm, and I couldn't figure out a way to shove both
those arguments into a function argument. The new strategy here is that
there is one global stack well known to both JS and Rust which arguments
*may* also be transferred between.
By default all ABI arguments pass as literal function arguments, but if
two or more arguments need to be passed then the extra ones are all
passed through this global stack. The stack is effectively temporary
scratch space when crossing the JS/Rust boundary (both ways). No long
term storage is intended here.
The `simple` test is passing as a result of this commit, using strings
internally. The `Vector` type in the AST has been removed (yay!) and the
bulk of the implementation of slices and vectors now resides in the
`wasm-bindgen` crate itself, defining how to pass all these arguments
around. The JS generator, however, still needs to know about all the
sorts of vectors so it can generate appropriate code for JS.
Future commits will continue cleanup and get the rest of the tests
working.
2018-03-31 07:57:47 -07:00
25af16c7d9
Fix an unused mut warning
2018-03-31 02:35:09 -07:00
13520e324b
Fix import TextDecoder in output for nodejs config
2018-03-30 10:50:01 -07:00
c97df46e08
Remove dummy test in backend
2018-03-29 14:51:00 -07:00
4e923445eb
Remove executable bits
2018-03-29 14:50:40 -07:00
80243acc37
Fix running node tests
2018-03-29 14:49:36 -07:00
646df20d70
Fix a typo when running commands
2018-03-29 12:26:42 -07:00
afc43174d9
Merge pull request #95 from fitzgen/backend
...
Split out the AST and codegen into the wasm-bindgen-backend crate
2018-03-29 18:31:38 +02:00
0bd54480c6
Split out the AST and codegen into the wasm-bindgen-backend crate
2018-03-29 09:14:32 -07:00
3ed363ae39
feat(enum): object.freeze the enum
2018-03-29 17:30:28 +02:00
393841779a
Rename directories to remove "wasm-bindgen-" prefix in sub-crates
2018-03-29 08:28:25 -07:00
ae51c3b6f7
feat(node): support node enums
2018-03-29 17:11:28 +02:00
256b34736e
feat(node): support node classes
2018-03-29 16:08:50 +02:00
a0bfb8103b
Generate node.js require
directives for --nodejs
2018-03-29 01:47:44 -07:00
7cc8ef58bd
Cli: Fix browser flag
2018-03-28 17:26:46 +02:00
28c3fdddf5
Remove --nodejs-runtime-detect
...
Instead use it by default and add a --browser argument to explicity
remove the shim.
Closes #79
2018-03-28 07:37:56 -07:00
930219fc53
Fix some JS == → === and != → !== occurrences
...
These are the ones my linter complained about in particular
2018-03-25 12:15:34 +02:00