Commit Graph

310 Commits

Author SHA1 Message Date
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
Alex Crichton
e0c8961333 Add memory64 support to the Wasmtime CLI and C API (#3182)
Accidentally forgotten from #3153!
2021-08-12 12:33:57 -05:00
Pat Hickey
ebbe399725 wasi tutorial: make usage string consistient between rust and c programs (#3098)
closes #3093
2021-07-19 15:04:33 -05:00
Olivier Lemasle
65a902f49d [doc] Update go example (#3065) 2021-07-12 09:01:44 -05:00
Andrew Brown
a83497e0b0 [doc] Add LLDB tips and tricks 2021-07-09 15:45:28 -07:00
Andrew Brown
16379db174 [doc] Add filler text to examples landing page 2021-07-09 06:22:25 -07:00
Andrew Brown
e5d25bc216 [doc] Add some documentation for debugging
The previous documentation only covers how to enable debug info when
embedding Wasmtime. This change should cover the commonly-asked
question: how do I debug in Wasmtime?
2021-07-09 06:22:25 -07:00
Benjamin Bouvier
93b7cdd6a2 Fix a few typos in the architecture doc (#3054) 2021-07-02 13:09:58 -05:00
Alex Crichton
aa5d837428 Start a high-level architecture document for Wasmtime (#3019)
* Start a high-level architecture document for Wasmtime

This commit cleands up some existing documentation by removing a number
of "noop README files" and starting a high-level overview of the
architecture of Wasmtime. I've placed this documentation under the
contributing section of the book since it seems most useful for possible
contributors.

I've surely left some things out in this pass, and am happy to add more!

* Review comments

* More rewording

* typos
2021-07-02 09:02:26 -05:00
Tshepang Lekhonkhobe
a3e08ee535 this option is default since early 2018 (#3042)
WASI was only added in Rust about a year from then
2021-06-30 09:34:34 -05:00
Alex Crichton
7a1b7cdf92 Implement RFC 11: Redesigning Wasmtime's APIs (#2897)
Implement Wasmtime's new API as designed by RFC 11. This is quite a large commit which has had lots of discussion externally, so for more information it's best to read the RFC thread and the PR thread.
2021-06-03 09:10:53 -05:00
Till Schneidereit
3b3b126fe2 Refer to BA security policy (#2912) 2021-05-19 18:24:42 +02:00
Alex Crichton
7ec073cef1 Bring back per-thread lazy initialization (#2863)
* Bring back per-thread lazy initialization

Platforms Wasmtime supports may have per-thread initialization that
needs to run before WebAssembly. For example Unix needs to setup a
sigaltstack and macOS needs to set up mach ports. In #2757 this
per-thread setup was moved out of the invocation of a wasm function,
relying on the lack of Send for Store to initialize the thread at Store
creation time and never worry about it later.

This conflicted with [wasmtime's desired multithreading
story](https://github.com/bytecodealliance/wasmtime/pull/2812) so a new
[`Store::notify_switched_thread` was
added](https://github.com/bytecodealliance/wasmtime/pull/2822) to
explicitly indicate a Store has moved to another thread (if it unsafely
did so).

It turns out though that it's not always easy to determine when a
`Store` moves to a new thread. For example the Go bindings for Wasmtime
are generally unaware when a goroutine switches OS threads. This led to
https://github.com/bytecodealliance/wasmtime-go/issues/74 where a SIGILL
was left uncaught, making it appear that traps aren't working properly.

This commit revisits the decision in #2757 and moves per-thread
initialization back into the path of calling into WebAssembly. This is
differently from before, though, where there's still only one TLS access
on the path of calling into WebAssembly, unlike before where it was a
separate access. This allows us to get the speed benefits of #2757 as
well as the flexibility benefits of not having to explicitly move a
store between threads.

With this new ability this commit deletes the recently added
`Store::notify_switched_thread` method since it's no longer necessary.

* Fix a test compiling
2021-04-28 12:08:27 -05:00
Benjamin Bouvier
ba73b458b8 Introduce a new API that allows notifying that a Store has moved to a new thread (#2822)
* Introduce a new API that allows notifying that a Store has moved to a new thread

* Add backlink to documentation, and mention the new API in the multithreading doc;
2021-04-16 11:15:35 -05:00