Commit Graph

2349 Commits

Author SHA1 Message Date
Dan Gohman
2b5be77fa5 "wasm32-unknown-wasi" is now "wasm32-wasi". 2019-05-13 21:40:56 -07:00
Jakub Konka
8b09f321ac Make memory fns safe wherever possible 2019-05-13 14:27:56 -07:00
Dan Gohman
251504e8a7 Merge pull request #11 from CraneStation/docs
Clean up docs; specify minimum Rust version
2019-05-13 13:28:40 -07:00
Jef
680473c50c Fix param names 2019-05-13 15:23:33 +02:00
Alan Foster
1c0efd03b3 Add example of compiling wat and running with wasmtime 2019-05-12 15:12:54 +02:00
Jakub Konka
66559e5702 Cleanup docs; specify minimum Rust version 2019-05-12 11:49:09 +02:00
Dan Gohman
a200b2133e Merge pull request #10 from CraneStation/api
Add experimental struct with views into memory and ctx
2019-05-11 08:31:59 -07:00
Jakub Konka
75ad92b0f3 Insulate API from intricacies of memory mgmt of calling runtimes 2019-05-11 16:50:52 +02:00
Zhuowei Zhang
ca8c8b3370 js-polyfill: support Safari, which doesn't have instantiateStreaming 2019-05-10 14:24:59 -07:00
Jakub Konka
751a1a1f7b Add experimental struct with views memory and ctxs
This struct is heavily taking from Lucet's Vmctx struct.
2019-05-10 22:23:35 +02:00
Jakub Konka
328b8f3d91 Merge pull request #8 from afinch7/gitignore
add .gitignore
2019-05-10 07:39:15 +02:00
Jakub Konka
6b3b3d818b Merge branch 'master' into gitignore 2019-05-10 07:34:59 +02:00
andy finch
1a478e8eff remove rustfmt file from .gitignore 2019-05-09 18:59:58 -04:00
andy finch
3001a8b078 updated .gitignore to be compatible with cargo defaults 2019-05-09 14:24:27 -04:00
Dan Gohman
15ad680e58 Merge pull request #9 from CraneStation/code-conduct
Add contributing guide and code of conduct
2019-05-09 10:15:10 -07:00
Jakub Konka
696525cf58 Add contributing guide and code of conduct 2019-05-09 19:02:32 +02:00
afinch7
2c681f3130 add .gitignore 2019-05-09 12:35:39 -04:00
Dan Gohman
574b885656 Merge pull request #7 from CraneStation/missing-hostcalls
Add stubs for unimplemented hostcalls
2019-05-09 00:34:02 -07:00
Jakub Konka
8090f8791f Add stubs for unimplemented hostcalls 2019-05-08 08:04:16 +02:00
Dan Gohman
c6db9f3dff Merge pull request #6 from kubkon/dev-ops
Set up CI, add format and test scripts.
2019-05-07 22:44:39 -07:00
Jakub Konka
19a4f00752 Set up CI, add format and test scripts.
Remove unused Cargo dependencies.
2019-05-08 07:39:54 +02:00
Jef
b67514bd11 Merge pull request #20 from tiborvass/fix-brif-typo
microwasm: fix comment typo for BrIf
2019-05-08 07:29:36 +02:00
Jakub Konka
072b2e8697 Update .rustfmt.toml 2019-05-07 13:56:04 -07:00
Jakub Konka
56824194b2 Merge pull request #5 from kubkon/comment
Update a comment to refer to WASI.
2019-05-07 22:46:00 +02:00
Jakub Konka
3e94af81df Add Rust impl of wasmtime_ssp_fd_prestat_dir_name 2019-05-07 13:20:55 -07:00
Dan Gohman
5e702fa001 Update a comment to refer to WASI. 2019-05-07 12:48:49 -07:00
Dan Gohman
aaed8c409a Merge pull request #4 from kubkon/port-wasi-types
Port WASI host types
2019-05-07 12:47:51 -07:00
Jakub Konka
2587fa0145 Port WASI host types 2019-05-07 21:44:16 +02:00
Dan Gohman
eb58f27bd5 Merge pull request #3 from kubkon/add-git-revision
Add git revision to track against lucet-wasi
2019-05-07 12:40:12 -07:00
Dan Gohman
8335484870 Update wasm32.rs to name the union fields.
The upstream wasi/core.h header switched from anonymous unions to unions
named `u`. This patch updates wasm32.rs to reflect this, as was done in
wasmtime 5b77f952.
2019-05-07 21:37:02 +02:00
Dan Gohman
7cb78efac4 Eliminate whitespace diffs with upstream LICENSE files. 2019-05-07 09:01:57 +02:00
Jakub Konka
b784ae875e Add git revision to track against lucet-wasi 2019-05-07 08:58:24 +02:00
Jef
30583954eb Add better debugging tools 2019-05-06 10:44:13 +02:00
Jakub Konka
ce6f9cb165 Changes to compile in lucet 2019-05-06 09:51:54 +02:00
Till Schneidereit
2549abd671 Merge pull request #133 from kubkon/kubkon/rust-tutorial
Update WASI tutorial with Rust howto as well
2019-05-05 15:10:05 +02:00
Jakub Konka
cd39c1dfd8 Extract common interface from lucet-wasi 2019-05-04 18:20:21 +02:00
Jakub Konka
e41d333878 Update WASI tutorial with Rust howto as well 2019-05-02 22:02:19 +02:00
Till Schneidereit
e12f797c2c Merge pull request #132 from kubkon/patch-1
Add link to Rust version of the WASI tutorial
2019-05-02 15:56:01 +02:00
Jakub Konka
5c14d1eb6f Add link to Rust version of the WASI tutorial
I thought it might be useful for future WASI users to have the WASI tutorial written not only in C but also in Rust.

I'm also happy to keep the tutorial up to date with the current state of WASI target in Rust.
2019-05-02 15:49:30 +02:00
Jakub Konka
d6b2faeeb4 Modify fd_prestat to hold C-str together with its length 2019-05-01 15:32:28 -07:00
Jakub Konka
f7245f40a1 Port host::__wasi_preopentype_t to Rust 2019-05-01 15:32:28 -07:00
Jakub Konka
5c555406ca Add Rust impl of wasmtime_ssp_fd_prestat_get
In more detail, this commit:
* makes fd_prestat_get safe
* rewrites fd_prestats_get_entry in (safe) Rust
* creates helper macros for rwlock read lock and unlock
2019-05-01 15:32:28 -07:00
Dan Gohman
b0eab7398d Don't decode the incoming events to poll_oneoff. (#113)
The events array is an output-only array, so we don't need to decode its
contents.
2019-04-30 06:42:48 -07:00
Dan Gohman
ce3c0d98d3 Don't rewrite EBUSY to EINVAL in path_rename. 2019-04-29 23:36:21 -07:00
Dan Gohman
049c926e08 Handle set-size rights correctly when truncating a file.
If a path_open call is requesting __WASI_RIGHT_FD_FILESTAT_SET_SIZE,
interpret that as a request for write privleges. If it is requesting
O_TRUNC, require __WASI_RIGHT_PATH_FILESTAT_SET_SIZE, since this is
a path operation rather than a FD operation.
2019-04-29 23:34:34 -07:00
Dan Gohman
e62607e552 When path_open fails, set the output fd to -1. 2019-04-29 23:34:13 -07:00
Jakub Konka
86b7a52009 Port host::__wasi_errno_t errors to Rust
They are now blacklisted in the bindgen.
2019-04-29 23:33:40 -07:00
Jakub Konka
a51ffb6b6d Add Rust impl of wasmtime_ssp_sched_yield
Also, add Rust implementation of errno and convert_errno.
2019-04-29 23:33:40 -07:00
Dan Gohman
26cbbaab41 Clarify that path_open's path is a relative path. 2019-04-29 07:34:28 -07:00
Dan Gohman
29c2616484 Update the documentation about C/C++ toolchain limitations.
Document that `setjmp`/`longjmp` and C++ exceptions are unsupported, and
update the documentation about the function signature mismatch bug to
reflect that it's now just a warning rather than a fatal error.
2019-04-28 16:41:58 -07:00