323 Commits

Author SHA1 Message Date
Max Große
8078404a15 docs(wasi-tut): update error message (#6261) 2023-04-21 09:37:34 +00:00
Jamey Sharp
4d5eaea6dc Update PR template and dev process docs (#6158)
Overall, I'm just trying to make these bits of documentation reflect our
process as it stands today. There are some specific changes I want to
draw attention to though.

Asking new contributors to pick a reviewer is a waste of time for two
reasons: Only people with write access to the repository are allowed to
pick reviewers, and new contributors have no idea who would be a good
reviewer for their PR anyway. So I'm deleting all mention of that. We
now auto-assign reviewers instead.

By the time someone is opening a PR, asking them to open an issue just
makes extra work for everyone. They've already picked an approach
without discussing it; we might as well look at what they did. We may
then have to ask them to take a different approach, but at that point,
asking them to open an issue won't save them any effort.

I removed mention of tests from the pull request template. There are
many things we'd like to see in a PR, and we may have to ask for them
during review if the contributor doesn't follow our development process
documentation. But I think the only crucial information for starting a
review is the two questions I'm leaving in the template: why do you want
this, and where can I find more context?

The code of conduct link still had the branch name as `master`, which is
a hint at how long it's been since anyone reviewed it.
2023-04-05 20:47:02 +00:00
Benjamin Bouvier
6f4f30c840 Add support for generating perf maps for simple perf profiling (#6030)
* Add support for generating perf maps for simple perf profiling

* add missing enum entry in C code

* bugfix: use hexa when printing the code region's length too (thanks bjorn3!)

* sanitize file name + use bufwriter

* introduce --profile CLI flag for wasmtime

* Update doc and doc comments for new --profile option

* remove redundant FromStr import

* Apply review feedback: make_line receives a Write impl, report errors

* fix tests?

* better docs
2023-03-20 16:17:36 +00:00
Alex Crichton
3782ce7333 Update security release documentation slightly (#5940)
This modernizes our process doc a bit with what I've been doing for the
last security release and the upcoming one as well.
2023-03-06 17:19:53 +00:00
Tristan de Cacqueray
87672f7059 doc: fix WASI-api link (#5912) 2023-03-02 13:22:33 +00:00
Andrew Brown
eaf4e9d3cc doc: add a page listing supported proposals (#5781)
* doc: add a page listing supported proposals

This adds a table showing Wasmtime's support for various WASI proposals,
much like the one available for WebAssembly proposals. This change is
related to [#2423], which provides guidelines for implementing WASI
proposals but was never merged.

[#2423]: https://github.com/bytecodealliance/wasmtime/pull/2423

* review: remove phase-gating sentence
2023-03-01 18:13:17 +00:00
Sven Sauleau
0e9a48afd5 add basic coredump generation (#5868)
This change adds a basic coredump generation after a WebAssembly trap
was entered. The coredump includes rudimentary stack / process debugging
information.

A new CLI argument is added to enable coredump generation:
```
wasmtime --coredump-on-trap=/path/to/coredump/file module.wasm
```

See ./docs/examples-coredump.md for a working example.

Refs https://github.com/bytecodealliance/wasmtime/issues/5732
2023-02-28 20:27:52 +00:00
Andrew Brown
121094054b doc: update Wasm threads support status (#5739) 2023-02-07 14:56:26 -08:00
Nick Fitzgerald
317cc51337 Rename VMCallerCheckedAnyfunc to VMCallerCheckedFuncRef (#5738)
At some point what is now `funcref` was called `anyfunc` and the spec changed,
but we didn't update our internal names. This does that.

Co-authored-by: Jamey Sharp <jsharp@fastly.com>
2023-02-07 22:09:02 +00:00
Konstantin Shabanov
f3418b760e Add Elixir into 'Language Support' (#5582) 2023-01-20 09:52:08 -06:00
Alexander Günsche
e3c7bf638a adding missing step of dependencies installation (#5492) 2023-01-03 09:48:24 -06:00
Jimmy Bourassa
ff995d910b Add more links to Ruby bindings (#5486)
PR #5485 added doc pages for the Ruby bindings, but didn't link to it
from the sidebar nor lang page. This commit fixes that.
2022-12-22 11:06:55 -08:00
Jimmy Bourassa
24a2f8cac6 Document wasmtime-rb (#5485)
* Document wasmtime-rb

* Fix typo in `docs/lang-ruby.md`, improve copy
2022-12-22 01:02:31 +00:00
Alex Crichton
c9527e0af6 Remove references to wasm-bindgen in documentation (#5394)
These references are really, really old and are no longer applicable. In
general the `wasm-*.md` documentation needs a lot of updates but this
applies at least a small band-aid to remove the `#[wasm_bindgen]`
references which are likely more harmful than helpful.
2022-12-07 16:41:50 -06:00
Dan King
0d27c48221 Correcting python GCD example (#5324) 2022-11-27 19:18:03 -06:00
Nick Fitzgerald
54a290cd53 Docs: Expand cross compiling section into its own page (#5284)
And fill out everything needed for all non-x64 targets supported by Wasmtime and
Cranelift.
2022-11-16 23:49:09 +00:00
Alex Crichton
b0939f6626 Remove explicit S type parameters (#5275)
* Remove explicit `S` type parameters

This commit removes the explicit `S` type parameter on `Func::typed` and
`Instance::get_typed_func`. Historical versions of Rust required that
this be a type parameter but recent rustcs support a mixture of explicit
type parameters and `impl Trait`. This removes, at callsites, a
superfluous `, _` argument which otherwise never needs specification.

* Fix mdbook examples
2022-11-16 05:04:26 +00:00
Vasili Novikov
b7b914fa0f Fix typo (#5157) 2022-10-31 05:44:19 -07:00
Alex Crichton
75cd888e23 Add release notes for 2.0.0 (#5048)
* Add release notes for 2.0.0

* Review comments
2022-10-12 15:39:39 +00:00
Bryant Luk
8b245178a5 Update Rust lang doc for 1.0.0 dependency (#4935) 2022-09-20 21:02:51 +00:00
Daniel Marin
71fd873946 Fix typo in examples-markdown.md (#4893) 2022-09-12 09:20:32 -05:00
Alex Crichton
6d6e7e0f6a Add definitions of tiers-of-support for Wasmtime (#4479)
* Add definitions of tiers-of-support for Wasmtime

This commit adds documentation of a Tiers-based system for classifying
how supported a component is within Wasmtime. This was somewhat
pioneered in the [Wasmtime 1.0 RFC][rfc] but the documentation here is
expanded to include more than just API stability but additionally other
components. Inspiration for this is drawn from Rust's definition of
[support tiers][rust] as well.

The motivation for this is to help clarify what exactly it means to live
at each tier and what is expected. For example one thing this document
clarifies is the requirements necessary for landing new major changes in
Wasmtime at all. Additionally this helps clarify what it means to have
the highest level of support vs "otherwise well supported".

[rfc]: https://github.com/bytecodealliance/rfcs/blob/main/accepted/wasmtime-one-dot-oh.md#tier-1---api-stable-production-quality
[rust]: https://doc.rust-lang.org/rustc/target-tier-policy.html

* Review comments

* Review comments
2022-07-29 15:11:16 +00:00
Frank Yang
791af15413 fix(docs): broken link wasi application-abi (#4459)
Signed-off-by: Frank Yang <yangpoan@gmail.com>
2022-07-16 09:38:02 -07:00
Jeffrey Charles
28eef73aeb [Doc] Note where to find start of memory when debugging (#4420) 2022-07-08 13:23:00 -07:00
Chris Fallin
f1b821e16f Remove meetings agendas/minutes (moved to separate repo). (#4388)
This PR removes all minutes and agendas in `meetings/`. These were
previously hosted in this repository, but we found that it makes things
somewhat more complex with respect to CI configuration and merge
permissions to have both small, CI-less changes to the text in
`meetings/` as well as changes to everything else in one repository.

The minutes and agendas have been split out into the repository at
https://github.com/bytecodealliance/meetings/, with all history
preserved. Future agenda additions and minutes contributions should go
there as PRs.

Finally, this PR adds a small note to our "Contributing" doc to note the
existence of the meetings and invite folks to ask to join if interested.
2022-07-05 16:06:20 -07:00
Jairus Tanaka
8ca3af0e37 Update and clean up AssemblyScript example (#4233)
* Update and clean up AssemblyScript example

* Remove wasm build files

* Remove wasm source files
2022-06-07 12:51:52 -05:00
Alex Crichton
88ff0247bf Update wasm proposal support docs (#4175)
* Update wasm proposal support docs

Rename `--enable` flags to simply names and additionally replace module
linking with the component model.

* Fix a typo
2022-06-01 13:34:33 -07:00
Alex Crichton
a75f383f96 Improve the wasmtime crate's README (#4174)
* Improve the `wasmtime` crate's README

This commit is me finally getting back to #2688 and improving the README
of the `wasmtime` crate. Currently we have a [pretty drab README][drab]
that doesn't really convey what we want about Wasmtime.

While I was doing this I opted to update the feature list of Wasmtime as
well in the main README (which is mirrored into the crate readme),
namely adding a bullet point for "secure" which I felt was missing
relative to how we think about Wasmtime.

Naturally there's a lot of ways to paint this shed, so feedback is of
course welcome on this! (I'm not the best writer myself)

[drab]: https://crates.io/crates/wasmtime/0.37.0

* Expand the "Fast" bullet a bit more

* Reference the book from the wasmtime crate

* Update more security docs

Also merge the sandboxing security page with the main security page to
avoid the empty security page.
2022-05-20 15:33:00 -05:00
Piotr Sikora
b9de8eb3e2 docs: SIMD proposal is enabled by default. (#4050)
Missed in #3601.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2022-04-19 06:47:14 -07:00
Alex Crichton
35377bd33f Fixup release documentation (#3988)
* Fill out some missing comments on the workflow itself
* Fix some formatting in the book to properly render sub-bullets
2022-04-05 14:14:44 -05:00
Alex Crichton
7b5176baea Upgrade all crates to the Rust 2021 edition (#3991)
* Upgrade all crates to the Rust 2021 edition

I've personally started using the new format strings for things like
`panic!("some message {foo}")` or similar and have been upgrading crates
on a case-by-case basis, but I think it probably makes more sense to go
ahead and blanket upgrade everything so 2021 features are always
available.

* Fix compile of the C API

* Fix a warning

* Fix another warning
2022-04-04 12:27:12 -05:00
Kk Shinkai
e6f110dc2f Fix document formatting (#3990) 2022-04-04 09:05:40 -05:00
Alex Crichton
c89dc55108 Add a two-week delay to Wasmtime's release process (#3955)
* Bump to 0.36.0

* Add a two-week delay to Wasmtime's release process

This commit is a proposal to update Wasmtime's release process with a
two-week delay from branching a release until it's actually officially
released. We've had two issues lately that came up which led to this proposal:

* In #3915 it was realized that changes just before the 0.35.0 release
  weren't enough for an embedding use case, but the PR didn't meet the
  expectations for a full patch release.

* At Fastly we were about to start rolling out a new version of Wasmtime
  when over the weekend the fuzz bug #3951 was found. This led to the
  desire internally to have a "must have been fuzzed for this long"
  period of time for Wasmtime changes which we felt were better
  reflected in the release process itself rather than something about
  Fastly's own integration with Wasmtime.

This commit updates the automation for releases to unconditionally
create a `release-X.Y.Z` branch on the 5th of every month. The actual
release from this branch is then performed on the 20th of every month,
roughly two weeks later. This should provide a period of time to ensure
that all changes in a release are fuzzed for at least two weeks and
avoid any further surprises. This should also help with any last-minute
changes made just before a release if they need tweaking since
backporting to a not-yet-released branch is much easier.

Overall there are some new properties about Wasmtime with this proposal
as well:

* The `main` branch will always have a section in `RELEASES.md` which is
  listed as "Unreleased" for us to fill out.
* The `main` branch will always be a version ahead of the latest
  release. For example it will be bump pre-emptively as part of the
  release process on the 5th where if `release-2.0.0` was created then
  the `main` branch will have 3.0.0 Wasmtime.
* Dates for major versions are automatically updated in the
  `RELEASES.md` notes.

The associated documentation for our release process is updated and the
various scripts should all be updated now as well with this commit.

* Add notes on a security patch

* Clarify security fixes shouldn't be previewed early on CI
2022-04-01 13:11:10 -05:00
Alex Crichton
5f53fd5ca2 Clarify patch release criteria (#3940)
In today's Wasmtime meeting we discussed the acceptance criteria for
patch releases for Wasmtime and Cranelift. The criteria we came up with
were:

* Cranelift will get a patch release for any miscompilation, whether or
  not it affects Wasmtime.
* Wasmtime will get a patch release for security issues and bugs which
  seriously hinder usability.

The consensus at the time was that due to Wasmtime's monthly release
schedule we want to be pretty strict about what generates a patch
release, hence the threshold being at serious bugs as opposed to any
bugs found.

This commit attempts to update the `stability-release.md` document with
our documented release process. The release cadence section is brought
up to date, the Wasmtime section was edited slightly (it largely already
said this which I only just realized), and a Cranelift section was
added.
2022-03-18 09:09:50 -05:00
Andrew Brown
6b4e84f2e3 doc: improve VTune documentation (#3907)
This change removes the Linux-specific wording of the VTune
documentation as well as fixing a link.
2022-03-09 15:51:20 -06:00
Andrew Brown
c183e93b80 x64: enable VTune support by default (#3821)
* x64: enable VTune support by default

After significant work in the `ittapi-rs` crate, this dependency should
build without issue on Wasmtime's supported operating systems: Windows,
Linux, and macOS. The difference in the release binary is <20KB, so this
change makes `vtune` a default build feature. This change upgrades
`ittapi-rs` to v0.2.0 and updates the documentation.

* review: add configuration for defaults in more places

* review: remove OS conditional compilation, add architecture

* review: do not default vtune feature in wasmtime-jit
2022-02-22 08:32:09 -08:00
Kyle Brown
5ff1ddee5b Mention --invoke on "CLI Options for wasmtime" page (#3828)
* Document the invoke argument of the run command.

* Update docs/cli-options.md

Co-authored-by: Kyle Brown <kyleb@liquidrocketry.com>
Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
2022-02-17 14:55:11 -06:00
Tim Park
198d4d64b0 Make examples compile without warnings (#3716) 2022-01-24 09:26:11 -06:00
Andrew Brown
24bc4d6055 docs: replace 'amplxe-cl' with 'vtune' (#3622)
The name of the VTune collector CLI has [now
changed](https://github.com/intel/ittapi/pull/32#discussion_r771417365)
to `vtune`; `amplxe-cl` is deprecated.
2021-12-17 16:59:47 -08:00
Andrew Brown
99b00cd973 docs: update VTune documentation (#3604)
While using VTune, it seemed a good idea to check that the VTune
documentation for Wasmtime was still correct. It is and VTune support
still works (improvements: click-through to x86 assembly is not
available). These changes simply re-organize the documentation and add a
section for running VTune from a GUI.
2021-12-17 15:47:09 -08:00
Alex Crichton
00feefe9a7 Change the bump-version workflow's schedule (#3512)
* Change the bump-version workflow's schedule

Either I don't understand cron or GitHub doesn't understand cron. It's
not clear which. I think that
https://github.com/bytecodealliance/wasmtime/pull/3511 may have fallen
within our schedule but it was supposed to be on a weekday. Otherwise
https://github.com/bytecodealliance/wasmtime/pull/3499 was certainly
spurious. This commit moves to a simpler "just do it on the same day
each month" and we can manually figure out weekdays and such. Hopefully
this should reduce the number of spurious PRs we're getting to bump
versions.

This also removes the script to force a version bump since I found a
button on the GitHub UI to do the same thing. Additionally I've updated
the patch-release documentation to use this button. Note that this
button takes inputs as well which means we can further automate patch
releases to look even more like normal release process, differing only
in one part of the argument used to trigger the workflow.

* Fix a typo
2021-11-08 10:37:53 -06:00
Alex Crichton
807b528bfb Automate more of Wasmtime's release process (#3422)
* Automate more of Wasmtime's release process

This change revamps the release process for Wasmtime and intends to make
it nearly 100% automated for major release and hopefully still pretty
simple for patch releases. New workflows are introduced as part of
this commit:

* Once a month a PR is created with major version bumps
* Specifically hinted commit messages to the `main` branch will get
  tagged and pushed to the main repository.
* On tags we'll now not only build releases after running CI but
  additionally crates will be published to crates.io.

In conjunction with other changes this means that the release process
for a new major version of Wasmtime is simply merging a PR. Patch
releases will involve running some steps locally but most of the
nitty-gritty should be simply merging the PR that's generated.

* Use an anchor in a regex
2021-10-26 10:25:40 -05:00
Alex Crichton
b553d84362 Change how security advisories work on CI (#3461)
Before this commit we actually have two builders checking for security
advisories on CI, one is `cargo audit` and one is `cargo deny`. The
`cargo deny` builder is slightly different in that it checks a few other
things about our dependency tree such as licenses, duplicates, etc. This
commit removes the advisory check from `cargo deny` on CI and then moves
the `cargo audit` check to a separate workflow.

The `cargo audit` check will now run nightly and will open an issue on
the Wasmtime repository when an advisory is found. This should help make
it such that our CI is never broken by the publication of an advisory
but we're still promptly notified whenever an advisory is made. I've
updated the release process notes to indicate that the open issues
should be double-checked to ensure that there are no open advisories
that we need to take care of.
2021-10-19 10:12:36 -05:00
Nathan Froyd
35cdd53989 fix typo in stability-platform-support.md 2021-10-14 12:19:29 -04:00
Shinobu Hayashi
59a9bd6285 Chore fix typo in docs/contributing-architecture.md (#3449) 2021-10-13 09:56:56 -05:00
Alex Crichton
1ee2af0098 Remove the lightbeam backend (#3390)
This commit removes the Lightbeam backend from Wasmtime as per [RFC 14].
This backend hasn't received maintenance in quite some time, and as [RFC
14] indicates this doesn't meet the threshold for keeping the code
in-tree, so this commit removes it.

A fast "baseline" compiler may still be added in the future. The
addition of such a backend should be in line with [RFC 14], though, with
the principles we now have for stable releases of Wasmtime. I'll close
out Lightbeam-related issues once this is merged.

[RFC 14]: https://github.com/bytecodealliance/rfcs/pull/14
2021-09-27 12:27:19 -05:00
Alex Crichton
8ebaaf928d Remove the wasmtime wasm2obj command (#3301)
* Remove the `wasmtime wasm2obj` command

This commit removes the `wasm2obj` subcommand of the `wasmtime` CLI.
This subcommand has a very long history and dates back quite far. While
it's existed, however, it's never been documented in terms of the output
it's produced. AFAIK it's only ever been used for debugging to see the
machine code output of Wasmtime on some modules. With recent changes to
the module serialization output the output of `wasmtime compile`, the
`*.cwasm` file, is now a native ELF file which can be fed to standard
tools like `objdump`. Consequently I dont think there's any remaining
need to keep `wasm2obj` around itself, so this commit removes the
subcommand.

* More code to delete

* Try to fix debuginfo tests
2021-09-08 10:40:58 -05:00
Aaron Turner
191051b644 Docs: Created the Wasmtime Markdown Parser Example (#3193)
* Finished the Markdown Parser Example for Wasmtime

* Made requested changes

* Tiny change to explanation of `--dir` CLI arg

* Add `bash` annotations to shell script code blocks

* Trying to fix the markdown example bug

* Figured out rustdoc, and what needed to be done

* Made requested changes

Co-authored-by: Till Schneidereit <till@tillschneidereit.net>
2021-09-01 12:25:36 -05:00
Aaron Turner
331b0dee30 Updated the AssemblyScript example (#3185) 2021-08-19 09:20:04 -05:00
Aaron Turner
fb32e49ed7 Docs: Removed the extra markdown example from the Summary (#3194) 2021-08-17 11:22:08 +02:00