Commit Graph

198 Commits

Author SHA1 Message Date
Alex Crichton
f06dfd0a7d Hopefully fix up yml 2018-03-04 12:48:53 -08:00
Alex Crichton
94001c3303 Don't run servers on CI 2018-03-04 12:16:01 -08:00
Sophie Alpert
67411f519c Add workaround for hello_world running in Chrome
Fixes #50.
2018-03-03 10:46:43 -08:00
Alex Crichton
98b9bee876 Add some comments to the hello-world example 2018-03-02 20:32:48 -08:00
Alex Crichton
e7f7f7864a Run smorgasboard example on CI 2018-03-02 20:21:44 -08:00
Alex Crichton
4ebb3df330 Add a smorgasboard example 2018-03-02 20:19:39 -08:00
Alex Crichton
4aa6793b9e Rewrite the README using Webpack
Right now Webpack probably has the most mature support for loading wasm modules,
so let's show off how to do that! Additionally this commits hello world as an
example to the repository.
2018-03-02 20:12:00 -08:00
Alex Crichton
30986dacad
Merge pull request #48 from alexcrichton/no-glboal
Don't run `npm install` during tests
2018-03-02 21:29:02 -06:00
Alex Crichton
d9e1dae298 Migrate from rollup to webpack in tests
Building on the previous commit to invoke not invoke `npm install` this takes
the commit a step further (to hopefully fix some races) to use Webpack's native
bundled wasm support.

It turns out the circular dependencies between the wasm module and the module
using it wasn't quite working out so a number of imports had to be tweaked, but
otherwise it's a nice transition where we don't have to base64 encode anything
in tests any more!
2018-03-02 19:20:14 -08:00
Alex Crichton
353794417c Don't run npm install during tests
Instead add a `package.json` and use `yarn run`.
2018-03-02 15:44:28 -08:00
Alex Crichton
31853ad0ba Require version agreement between CLI and dep
One day may be able to relax this but for now its not tenable!

Closes #47
2018-03-01 19:36:59 -08:00
Alex Crichton
1c8061e675 Implement a version string
Add a `--version` and `-V` to the command to print out the version
2018-03-01 19:19:12 -08:00
Alex Crichton
36f064bed0
Merge pull request #40 from rylev/return-vec-jsvalue
Enable returning a vector of js values
2018-02-28 11:59:15 -06:00
Ryan Levick
17ca87cabb Add to README that Vec<JsValue> cannot be passed to functions 2018-02-28 17:33:16 +01:00
Ryan Levick
37da9eba14 Address feedback on commit dab6ba1 2018-02-28 17:29:40 +01:00
Ryan Levick
dab6ba1df8 Enable returning a vector of js values 2018-02-28 10:56:56 +01:00
Alex Crichton
19f88f0fd2 Update parity-wasm dep 2018-02-26 17:11:56 -08:00
Alex Crichton
90882bb06f Mention enums in the README 2018-02-26 15:32:07 -08:00
Alex Crichton
00115c6e7d No longer generates TypeScript by default
remove an errant comment from the README
2018-02-26 15:31:18 -08:00
Alex Crichton
97c021a53c
Merge pull request #36 from rylev/enums
C-Style Enums
2018-02-26 17:30:50 -06:00
Alex Crichton
6a7c9710ca
Merge pull request #38 from rylev/readme-section-test
Add section on node dependency in README
2018-02-25 04:24:33 +09:00
Ryan Levick
f1b300c8aa get rid of unnecessary mutable var 2018-02-23 19:06:23 +01:00
Ryan Levick
3ae6614738 Add test for custom values in enums 2018-02-23 17:44:48 +01:00
Ryan Levick
f783876192 Support C-Style enums with custom int values 2018-02-23 17:38:02 +01:00
Ryan Levick
71880b8a83 Enums are numbers 2018-02-23 17:34:08 +01:00
Ryan Levick
3a270b6510 Add test for enums 2018-02-23 17:30:18 +01:00
Ryan Levick
89b0b8f20a Add section on node dependency in README 2018-02-23 14:52:45 +01:00
Ryan Levick
b78343a551 Fix enum formatting issues 2018-02-22 12:11:47 +01:00
Ryan Levick
7f8316f89b Clean up warnings 2018-02-22 12:08:28 +01:00
Ryan Levick
f11121b095 Generate enum js code 2018-02-22 12:01:38 +01:00
Ryan Levick
45543c545e Pass numbers in js as enums to Rust successfully 2018-02-22 10:55:44 +01:00
Ryan Levick
01c31cb33d Create Rust wrapping code for enums 2018-02-22 00:55:11 +01:00
Alex Crichton
4d86fca327
Merge pull request #34 from rylev/ensure-memory-exposed
Ensure Memory Accesses are Exposed Before Accessing
2018-02-19 10:35:07 +09:00
Ryan Levick
0f8524da3c Ensure memory accesses are exposed before accessing 2018-02-18 23:55:34 +01:00
Alex Crichton
d66bc25749 Automatically bind float math functions
These tend to have one "pretty obvious" definition in JS anyway, so
let's paper over this deficiency in rustc for now by automatically
resolving any imports for these functions.

Closes #28
2018-02-17 16:44:31 -08:00
Alex Crichton
9e7a4e7e60 Fix a few more mistakes from slices 2018-02-16 19:19:31 -08:00
Alex Crichton
0970fa2998 Fix duplicated definition of a constant 2018-02-16 19:06:48 -08:00
Alex Crichton
3c58aa7310 Support integer/float slices/vectors
Closes #5
2018-02-16 18:58:37 -08:00
Alex Crichton
7802535948 Fix #[wasm_bindgen] on structs with no exports
It should still be usable in other types!

Closes #27
2018-02-16 13:50:14 -08:00
Alex Crichton
c148a3b6dc Emit JS with some more newlines
Hopefully helps a bit with readability!
2018-02-16 13:36:37 -08:00
Alex Crichton
9183236522 Implement getter/setter bindings 2018-02-14 13:16:02 -08:00
Alex Crichton
e72f9e176f Update DESIGN.md with import class shims 2018-02-14 12:54:37 -08:00
Alex Crichton
be368a6570 Don't look up properties in import shims
This'll match more closely what wasm eventually does natively, which is
importing these functions directly and not allowing changing them over time.

Closes #25
2018-02-14 12:51:58 -08:00
Alex Crichton
20bcc83b96
Merge pull request #20 from dflemstr/unsupported-exports
Don't panic on unsupported exports
2018-02-12 16:59:53 -06:00
David Flemström
c0f2773c4e Don't panic on unsupported exports
It's most likely safe for us to skip exports that we don't yet
support.  Doing nothing will at least not hurt in those cases.
2018-02-12 17:49:26 -05:00
Alex Crichton
f3c0fc369a Fix compatibility with LLD
Ensure the runtime library is always at least linked as it has important symbols
that we'll use later.
2018-02-10 10:06:56 -08:00
Alex Crichton
75837925e9 Find static descriptions inside data nodes
Right now this library only works if the static description is the entire data
node, but with upcoming LLD support everything will be in one data node. This
updates the logic for finding/parsing the program to search through the entire
data node and also know how big a program description is when it finds it.
2018-02-10 10:05:43 -08:00
Alex Crichton
7f94c662b9
Merge pull request #13 from froydnj/patch-1
small typo tweaks
2018-02-08 13:22:03 -06:00
Nathan Froyd
646e7c92ba
small typo tweaks 2018-02-08 14:09:36 -05:00
Alex Crichton
f49be45a92 Fix a typo for typescript bindings 2018-02-08 10:22:54 -08:00