Skip to content

Merge with upstream#57

Merged
dhil merged 9 commits intowasmfx:mainfrom
dhil:wasmfx-merge
Nov 22, 2023
Merged

Merge with upstream#57
dhil merged 9 commits intowasmfx:mainfrom
dhil:wasmfx-merge

Conversation

@dhil
Copy link
Copy Markdown
Member

@dhil dhil commented Nov 22, 2023

No description provided.

wasmtime-publish and others added 8 commits November 20, 2023 16:11
Co-authored-by: Wasmtime Publish <wasmtime-publish@users.noreply.github.com>
Juggle around where a pointer comes from to ensure that it passes MIRI
cleanly.
)

This commit fixes a bug in initializing memory segments of 32-bit
memories where if the offset was negative when viewed as a signed
integer the offset was incorrectly sign-extended to a 64-bit value
instead of zero-extended. This commit replaces an `i32`-to-`u64` cast
with an `i32`-to-`u32` cast followed by a `u32`-to-`u64` cast which
performs the zero extend.

Closes bytecodealliance#7558
…tecodealliance#7561)

* Configure Rust lints at the workspace level

This commit adds necessary configuration knobs to have lints configured
at the workspace level in Wasmtime rather than the crate level. This
uses a feature of Cargo first released with 1.74.0 (last week) of the
`[workspace.lints]` table. This should help create a more consistent set
of lints applied across all crates in our workspace in addition to
possibly running select clippy lints on CI as well.

* Move `unused_extern_crates` to the workspace level

This commit configures a `deny` lint level for the
`unused_extern_crates` lint to the workspace level rather than the
previous configuration at the individual crate level.

* Move `trivial_numeric_casts` to workspace level

* Change workspace lint levels to `warn`

CI will ensure that these don't get checked into the codebase and
otherwise provide fewer speed bumps for in-process development.

* Move `unstable_features` lint to workspace level

* Move `unused_import_braces` lint to workspace level

* Start running Clippy on CI

This commit configures our CI to run `cargo clippy --workspace` for all
merged PRs. Historically this hasn't been all the feasible due to the
amount of configuration required to control the number of warnings on
CI, but with Cargo's new `[lint]` table it's possible to have a
one-liner to silence all lints from Clippy by default. This commit by
default sets the `all` lint in Clippy to `allow` to by-default disable
warnings from Clippy. The goal of this PR is to enable selective access
to Clippy lints for Wasmtime on CI.

* Selectively enable `clippy::cast_sign_loss`

This would have fixed bytecodealliance#7558 so try to head off future issues with that
by warning against this situation in a few crates. This lint is still
quite noisy though for Cranelift for example so it's not worthwhile at
this time to enable it for the whole workspace.

* Fix CI error

prtest:full
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
…st (bytecodealliance#7564)

* move wasmtime-wasi's unit test for stdin to a separate integration test

fork is always a terrible idea, but when we wrote this test, we couldn't
think of an alternative method. alex showed us how
`/tests/host_segfault.rs` works, which solves a similar problem for
measuring process behavior without forking.

the forking version of this test would occasionally hang in the child's
creation of a tokio runtime because std Once is not fork-safe (nor
should it be. nothing should be fork-safe. forks are an abomination).

so instead, this is now a separate integration test with `harness =
false` that will exec itself in order to run the child.

* wasmtime-wasi: add tests to package include
@dhil dhil enabled auto-merge November 22, 2023 11:55
@dhil dhil merged commit 95bc8f9 into wasmfx:main Nov 22, 2023
@dhil dhil deleted the wasmfx-merge branch November 22, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants