Skip to content

Update documentation and example for no_std - #8555

Merged
alexcrichton merged 6 commits into
bytecodealliance:mainfrom
alexcrichton:embedding-example-no-std
May 6, 2024
Merged

alexcrichton merged 6 commits into
bytecodealliance:mainfrom
alexcrichton:embedding-example-no-std

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This commit has a few sub-parts aimed at improving and updating the documentation/examples around Wasmtime's support for no_std now that the implementation is landed in #8533. Namely this includes:

  • Updating our tier-related documentation with developments in the last year or so
  • Updating platform-support documentation with references to tiers and rewriting the no_std section
  • Updating the min-platform example to build on no_std
  • Adding wasmtime-platform.h as a release artifact.

@alexcrichton
alexcrichton requested review from a team as code owners May 5, 2024 18:19
@alexcrichton
alexcrichton requested review from elliottt and removed request for a team May 5, 2024 18:19
@github-actions github-actions Bot added the wasmtime:docs Issues related to Wasmtime's documentation label May 5, 2024
Move some items between tiers and add a few misc items here and there.
Re-word lots of this since it was originally written, link to the tiers
of support page, and rewrite the section on `no_std`.
This commit updates the preexisting `min-platform` example to no longer
require Nightly Rust and instead use the `no_std` support now added to
Wasmtime. This involved:

* Change the build process to produce a staticlib which is then manually
  converted via `cc` into a shared library for the native Linux platform.
* Compile the modules outside of the embedding and only `deserialize`
  within the embedding.
* Update the `indexmap` dependency to pick up a bug fix required in
  `no_std` mode (apparently, it fails on indexmap@2.0.0 and passes at
  2.2.6, I didn't dig much further).

This commit additionally makes the `wasmtime-platform.h` header file
generated by the example a release artifact for Wasmtime itself. The
header itself is touched up a bit by configuring some more `cbindgen`
options as well.
prtest:full
@alexcrichton
alexcrichton force-pushed the embedding-example-no-std branch from 3b79a68 to 23310a4 Compare May 6, 2024 15:58

@elliottt elliottt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

@pchickey pchickey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Comment thread docs/stability-tiers.md Outdated
Comment thread examples/min-platform/embedding/src/lib.rs Outdated
@alexcrichton
alexcrichton enabled auto-merge May 6, 2024 19:01
@alexcrichton
alexcrichton added this pull request to the merge queue May 6, 2024
Merged via the queue into bytecodealliance:main with commit 5054d40 May 6, 2024
@alexcrichton
alexcrichton deleted the embedding-example-no-std branch May 6, 2024 19:47
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 6, 2024
* Update Wasmtime's tier stability documentation

Move some items between tiers and add a few misc items here and there.

* Update platform support documentation

Re-word lots of this since it was originally written, link to the tiers
of support page, and rewrite the section on `no_std`.

* Update the `min-platform` example with no_std

This commit updates the preexisting `min-platform` example to no longer
require Nightly Rust and instead use the `no_std` support now added to
Wasmtime. This involved:

* Change the build process to produce a staticlib which is then manually
  converted via `cc` into a shared library for the native Linux platform.
* Compile the modules outside of the embedding and only `deserialize`
  within the embedding.
* Update the `indexmap` dependency to pick up a bug fix required in
  `no_std` mode (apparently, it fails on indexmap@2.0.0 and passes at
  2.2.6, I didn't dig much further).

This commit additionally makes the `wasmtime-platform.h` header file
generated by the example a release artifact for Wasmtime itself. The
header itself is touched up a bit by configuring some more `cbindgen`
options as well.

* Fix clippy build

prtest:full

* Review comments

* Pass gc-sections to linking the library
alexcrichton added a commit that referenced this pull request May 6, 2024
* Update documentation and example for no_std (#8555)

* Update Wasmtime's tier stability documentation

Move some items between tiers and add a few misc items here and there.

* Update platform support documentation

Re-word lots of this since it was originally written, link to the tiers
of support page, and rewrite the section on `no_std`.

* Update the `min-platform` example with no_std

This commit updates the preexisting `min-platform` example to no longer
require Nightly Rust and instead use the `no_std` support now added to
Wasmtime. This involved:

* Change the build process to produce a staticlib which is then manually
  converted via `cc` into a shared library for the native Linux platform.
* Compile the modules outside of the embedding and only `deserialize`
  within the embedding.
* Update the `indexmap` dependency to pick up a bug fix required in
  `no_std` mode (apparently, it fails on indexmap@2.0.0 and passes at
  2.2.6, I didn't dig much further).

This commit additionally makes the `wasmtime-platform.h` header file
generated by the example a release artifact for Wasmtime itself. The
header itself is touched up a bit by configuring some more `cbindgen`
options as well.

* Fix clippy build

prtest:full

* Review comments

* Pass gc-sections to linking the library

* Add release notes for 21.0.0 (#8559)
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 17, 2024
This fixes a bug from bytecodealliance#8555 where the header was uploaded to CI but
didn't make its way to the release itself.
github-merge-queue Bot pushed a commit that referenced this pull request May 17, 2024
This fixes a bug from #8555 where the header was uploaded to CI but
didn't make its way to the release itself.
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 20, 2024
This fixes a bug from bytecodealliance#8555 where the header was uploaded to CI but
didn't make its way to the release itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:docs Issues related to Wasmtime's documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants