Commit Graph

307 Commits

Author SHA1 Message Date
Dan Gohman
d9ca508f80 Rename wasmtime-api to wasmtime. 2019-11-08 06:43:07 -08:00
Dan Gohman
43b761ef5f Update the top-level README.md and embedding documentation. (#508)
* Update the top-level README.md and embedding documentation.

wasmtime-api is now the primary external API crate, so recommend that
instead of wasmtime-jit.

Also, enable wasmtime-api's C API by default, so that it shows up on
docs.rs, and to make it easier to use.

And, add basic embedding documentation and link to it from the
README.md. Credit to @yurydelendik for the content.

* Use the new wasm-c-api URL.

* Don't pass --features wasm-c-api, as it is now on by default.
2019-11-07 16:47:54 -08:00
Alex Crichton
bf526b62d3 Add book documentation skeleton and auto-publish from CI (#435)
This commit adds the skeleton of a new set of documentation for
`wasmtime` in the existing `docs` directory. This documentation is
organized and compiled with [mdbook] which the Rust project uses for
most of its own documentation as well. At a previous meeting we
brainstormed a rough skeleton of what the documentation in this book
would look like, and I've transcribed that here for an example of how
this is rendered and how it can be laid out. No actual documentation is
written yet.

This commit also additionally adds necessary support to auto-publish
both this book documentation and API documentation every time a commit
is pushed to the `master` branch. All HTML will be automatically pushed
to the `gh-pages` branch so long as the CI passes, and this should get
deployed to https://cranestation.github.io/wasmtime.

I've done a few dry-runs and I think this'll all work, but we'll likely
tweak a few things here and there after running this through CI to make
sure everything looks just as we'd like. My hope though is that after
this lands we can start actually filling out all the documentation and
being able to review it as well.

[mdbook]: https://crates.io/crates/mdbook
2019-10-29 15:55:51 +01:00
YAMAMOTO Yuji
d05561ff78 Fix deadlink to WASI API header (#431)
Fix documentation link to wasi-libc headers
2019-10-17 11:21:44 +02:00
Paul Jackson
ab8707223c clarify posix_fallocate vs fd_allocate in docs 2019-09-25 21:21:57 -07:00
Zack Slayton
1497825173 Updating link to Fuchsia blog post 2019-09-06 14:19:17 -07:00
Artur Jamro
17d676ecbc Allow colons in Windows host paths (#235) 2019-08-06 16:44:26 -07:00
Dan Gohman
6b7ebfdddc Rust 1.36, with wasm32-wasi support, is now stable! 2019-07-10 12:27:21 -07:00
Van der Auwermeulen Grégoire
d900a5f6ef Update WASI-tutorial.md
consistent
2019-06-19 07:13:51 -07:00
Van der Auwermeulen Grégoire
3425553dc6 Update WASI-tutorial.md
Update README based on feedback
2019-06-19 07:13:51 -07:00
Van der Auwermeulen Grégoire
15b85dc285 Update WASI-tutorial.md 2019-06-19 07:13:51 -07:00
Sendil Kumar
ab8f8ef5d8 Adds an explicit way to use the args inside the WebAssembly Module 2019-06-19 07:10:56 -07:00
Dan Gohman
61eb4738fe wasi-sysroot is now named wasi-libc. (#167) 2019-05-31 10:15:52 +02:00
Van der Auwermeulen Grégoire
658b5aabcc Update WASI-tutorial.md 2019-05-21 06:45:28 -07:00
Dan Gohman
2b5be77fa5 "wasm32-unknown-wasi" is now "wasm32-wasi". 2019-05-13 21:40:56 -07:00
Alan Foster
1c0efd03b3 Add example of compiling wat and running with wasmtime 2019-05-12 15:12:54 +02:00
Jakub Konka
e41d333878 Update WASI tutorial with Rust howto as well 2019-05-02 22:02:19 +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
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
Joel Martin
b8fbae29e1 WASI-api.md: fix fsync -> fcntl 2019-04-18 13:25:40 -07:00
Dan Gohman
a99107203e Document the preopened file descriptor range. 2019-04-16 11:00:18 -07:00
Dan Gohman
d722b354db Miscellaneous tidying in the API docs.
- Don't include an extra "*" in type of Output arguments.
 - Fix the summary of environ_sizes_get.
 - Put fs_rights_base and fs_rights_inherinting arguments on separate lines.
 - Sort fd_prestat_dirname alphabetically before fd_prestat_get.
2019-04-16 11:00:18 -07:00
Dan Gohman
9b1cd4bc7b Document __wasi_preopentype_t and __wasi_prestat_t. 2019-04-16 11:00:18 -07:00
Dan Gohman
b37ab7d13e Fix a copy+pasto in the tutorial. 2019-04-07 05:16:55 -07:00
Dan Gohman
a1c123c3dd Fix grammar in documentation. 2019-04-04 16:14:28 -07:00
Dan Gohman
a6f31a2be3 Update Rust instructions, add a link to wasi-sysroot. 2019-03-31 06:29:23 -07:00
Dan Gohman
05a05551ba Pre-opened directory resources are now supported; update the docs. 2019-03-29 11:59:13 -07:00
Dan Gohman
f53ed6d8ee Document that random_get can block. 2019-03-29 11:59:09 -07:00
Dan Gohman
ab28cd9a2c Tidy up wording in the explanation of capabilities, and link to the tutorial. 2019-03-28 10:51:07 -07:00
Dan Gohman
5adbf58482 Fix grammar. 2019-03-28 10:47:46 -07:00
Dan Gohman
4fd7c4b931 Document the constraints on path_open's returned file descriptor.
Whether the downsides in POSIX and existing application compatibility
outweigh the benefits of thread safety remains an open question.
Right now, this note is just documenting the current behavior.
2019-03-28 10:42:48 -07:00
Dan Gohman
c37f245fc8 Update URLs for things that have moved. 2019-03-28 09:20:11 -07:00
Dan Gohman
01f8c87b76 Fix broken link to wasi-software-architecture.png. 2019-03-27 11:49:07 -07:00
Dan Gohman
002a61c32b Fix a missing close paren. 2019-03-27 11:33:04 -07:00
Dan Gohman
d8242bc612 Add a blurb explaining the capability mapping support in WASI libc. 2019-03-27 11:29:19 -07:00
Dan Gohman
a4515a01e3 Add a proposed CG subgroup charter document. 2019-03-27 10:58:43 -07:00
Dan Gohman
b2fefe7714 WASI prototype design, implementation, and documentation.
This adds documents describing the WASI Core API, and an implementation in
Wasmtime.
2019-03-27 10:58:43 -07:00
Dan Gohman
d0fe50a2a8 Check in the wasmstandalone code.
This is based on the code in https://github.com/denismerigoux/cretonne/commits/wasm2cretonne
before wasmstandalone was removed, with minor updates for the new library structure.
It is not yet updated for the latest cretonne API changes.
2017-09-05 17:06:51 -07:00
Jakob Stoklund Olesen
7f3b807597 Add a calling convention to all function signatures.
A CallConv enum on every function signature makes it possible to
generate calls to functions with different calling conventions within
the same ISA / within a single function.

The calling conventions also serve as a way of customizing Cretonne's
behavior when embedded inside a VM. As an example, the SpiderWASM
calling convention is used to compile WebAssembly functions that run
inside the SpiderMonkey virtual machine.

All function signatures must have a calling convention at the end, so
this changes the textual IL syntax.

Before:

    sig1 = signature(i32, f64) -> f64

After

    sig1 = (i32, f64) -> f64 native
    sig2 = (i32) spiderwasm

When printing functions, the signature goes after the return types:

    function %r1() -> i32, f32 spiderwasm {
    ebb1:
        ...
    }

In the parser, this calling convention is optional and defaults to
"native". This is mostly to avoid updating all the existing test cases
under filetests/. When printing a function, the calling convention is
always included, including for "native" functions.
2017-08-03 11:40:24 -07:00
Jakob Stoklund Olesen
6ba604125d Add bitwise ops that invert the second operand.
ARM has all of these as scalar integer instructions. Intel has band_not
in SSE and as a scalar in BMI1.

Add the trivial legalization patterns that use a bnot instruction.
2017-07-20 11:20:06 -07:00
Jakob Stoklund Olesen
306ef2095b Begin an Intel-specific instruction group.
Add instructions representing Intel's division instructions which use a
numerator that is twice as wide as the denominator and produce both the
quotient and remainder.

Add encodings for the x86_[su]divmodx instructions.
2017-07-18 11:20:00 -07:00
Dan Gohman
89634fa645 Add documentation for immediates with type bool.
This makes the documentation for the new bconst instruction more complete.
2017-07-13 16:23:41 -07:00
Dan Gohman
3bcfb103b9 Add a bconst instruction. (#116)
* Add a bconst instruction.
2017-07-13 10:12:25 -07:00
Dan Gohman
e83e2ccf17 Documentation fixes (#103)
* Clarify that extended basic blocks are abbreviated as EBB.

* Fix typo.

* Fix a typo.

* Fix typos.

* Use the same phrase to indicate scalar-only as other places in the doc.

* Mention that `band_imm` and friends are scalar-only.

And mention that they're equivalent to their respective
non-immediate-form counterparts.
2017-06-22 12:01:32 -07:00
Jakob Stoklund Olesen
91d919c11a Track stack slot kinds.
Add a StackSlotKind enumeration to help keep track of the different
kinds of stack slots supported:

- Incoming and outgoing function arguments on the stack.
- Spill slots and locals.

Change the text format syntax for declaring a stack slot to use a kind
keyword rather than just 'stack_slot'.
2017-06-16 11:01:22 -07:00
Aleksey Kuznetsov
8b484b1c77 Binary function names (#91)
* Function names should start with %

* Create FunctionName from string

* Implement displaying of FunctionName as %nnnn with fallback to #xxxx

* Run rustfmt and fix FunctionName::with_string in parser

* Implement FunctionName::new as a generic function

* Binary function names should start with #

* Implement NameRepr for function name

* Fix examples in docs to reflect that function names start with %

* Rebase and fix filecheck tests
2017-06-10 10:30:37 -07:00
Dan Gohman
dc809628f4 Start a very simple GVN pass (#79)
* Skeleton simple_gvn pass.
* Basic testing infrastructure for simple-gvn.
* Add can_load and can_store flags to instructions.
* Move the replace_values function into the DataFlowGraph.
* Make InstructionData derive from Hash, PartialEq, and Eq.
* Make EntityList's hash and eq functions panic.
* Change Ieee32 and Ieee64 to store u32 and u64, respectively.
2017-05-18 18:18:57 -07:00
Jakob Stoklund Olesen
8cd67f08a9 Add a regmove instruction.
This will be used to locally change the register locations of values in
order to satisfy instruction constraints.
2017-05-02 11:32:12 -07:00
Jakob Stoklund Olesen
832247019b Remove the return_reg instruction.
RISC architectures that take a return address in a register can use a
special-purpose `link` return value to do so.
2017-04-19 16:08:16 -07:00