commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
8a32f7dfe84f998eb126e28df7eac86cefe7dcf3 | Pat Hickey | 2023-04-07T00:04:49 | File: we need to have the DescriptorType around to handle certain corner cases | diff --git a/src/descriptors.rs b/src/descriptors.rs
index 288a20992..036fd88ab 100644
--- a/src/descriptors.rs
+++ b/src/descriptors.rs
@@ -175,6 +175,8 @@ impl Descriptors {
output: Cell::new(None),
type_: StreamType::File(File {
fd: preopen.descriptor,
+ ... | 2 | 9 | 0 |
8f80add40f9db274a437db057f37cd627c6f07b7 | Pat Hickey | 2023-04-07T00:05:23 | size assertion: refactor to de-duplicate MAX_DESCRIPTORS definition | diff --git a/src/lib.rs b/src/lib.rs
index c3eae765d..de39e3e14 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2015,8 +2015,6 @@ const PAGE_SIZE: usize = 65536;
/// polyfill.
const PATH_MAX: usize = 4096;
-const MAX_DESCRIPTORS: usize = 128;
-
/// Maximum number of bytes to cache for a `wasi::Dirent` plus its path n... | 1 | 2 | 4 |
0042b6f4e31754d434ab61a97156d32343509f94 | Pat Hickey | 2023-04-07T00:04:11 | NFC: pull eventtype const definitions out to be reused further down | diff --git a/src/lib.rs b/src/lib.rs
index 630227bb7..c3eae765d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1547,6 +1547,10 @@ pub unsafe extern "C" fn poll_oneoff(
}
State::with(|state| {
+ const EVENTTYPE_CLOCK: u8 = wasi::EVENTTYPE_CLOCK.raw();
+ const EVENTTYPE_FD_READ: u8 = wasi::EVENTTY... | 1 | 10 | 9 |
f22652b5ab80a73636d22dffd65896588708b284 | Pat Hickey | 2023-04-06T22:10:36 | fix wasi renumber test: return an error in adapter if closing a closed fd | diff --git a/host/tests/command.rs b/host/tests/command.rs
index 9788c0249..e8ce255fc 100644
--- a/host/tests/command.rs
+++ b/host/tests/command.rs
@@ -493,7 +493,7 @@ async fn run_remove_nonempty_directory(store: Store<WasiCtx>, wasi: Command) ->
}
async fn run_renumber(store: Store<WasiCtx>, wasi: Command) -> Re... | 1 | 1 | 1 |
77845fcf38bfb37a4e48fcb17098c6cbb55789bf | Pat Hickey | 2023-04-06T22:10:36 | fix wasi renumber test: return an error in adapter if closing a closed fd | diff --git a/src/descriptors.rs b/src/descriptors.rs
index 288a20992..f05ba82e5 100644
--- a/src/descriptors.rs
+++ b/src/descriptors.rs
@@ -258,6 +258,11 @@ impl Descriptors {
// Internal: close a fd, returning the descriptor.
fn close_(&mut self, fd: Fd) -> Result<Descriptor, Errno> {
+ // Throw an... | 1 | 5 | 0 |
4053ae9e08fc9d2d26bb98242d12ecf2e0255a53 | kevaundray | 2023-04-10T19:39:25 | Minir typo/Grammar fixes (#6187)
* fix typo
* add test to check that Option<EntityRef> is twice as large as EntityRef
* grammar
* grammar
* reverse snakecase -- Not sure if folks want this type of change | diff --git a/cranelift/codegen/src/ir/dfg.rs b/cranelift/codegen/src/ir/dfg.rs
index 5784812cf..507881c77 100644
--- a/cranelift/codegen/src/ir/dfg.rs
+++ b/cranelift/codegen/src/ir/dfg.rs
@@ -138,10 +138,10 @@ pub struct DataFlowGraph {
/// Saves Value labels.
pub values_labels: Option<BTreeMap<Value, ValueL... | 6 | 17 | 9 |
b9fb31e9a7067978db2418e630cade977d1c45dc | bjorn3 | 2023-04-10T16:49:43 | Re-export cranelift-control from cranelift-codegen (#6173)
This makes it easier to keep the versions of both in sync and avoids
having to specify another dependency for a single type. | diff --git a/cranelift/codegen/src/lib.rs b/cranelift/codegen/src/lib.rs
index d9f917cc5..899270a9e 100644
--- a/cranelift/codegen/src/lib.rs
+++ b/cranelift/codegen/src/lib.rs
@@ -64,6 +64,7 @@ pub use crate::verifier::verify_function;
pub use crate::write::write_function;
pub use cranelift_bforest as bforest;
+pu... | 1 | 1 | 0 |
83a8ca77cd291acfa9beeea81930a365899b13d8 | Alex Crichton | 2023-04-10T16:27:13 | Mirror default-owned change for guests in `wit-bindgen` (#6189)
This commit is a mirror of bytecodealliance/wit-bindgen#547 into the
`bindgen!` macro for Wasmtime. The new default is to generate only one
Rust type per WIT type input, regardless of if the representation can be
slightly more optimal in niche cases with ... | diff --git a/crates/component-macro/src/bindgen.rs b/crates/component-macro/src/bindgen.rs
index bb82b1750..76e06c80d 100644
--- a/crates/component-macro/src/bindgen.rs
+++ b/crates/component-macro/src/bindgen.rs
@@ -76,6 +76,7 @@ impl Parse for Config {
Opt::Tracing(val) => opts.tracing = val,
... | 4 | 72 | 8 |
2d1dbb17af2bd3d93ba3e02eb7a07b4b7dd13892 | kevaundray | 2023-04-10T14:23:49 | fix doc comment (#6183) | diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs
index 8c320d23a..ecef10ba7 100644
--- a/cranelift/frontend/src/frontend.rs
+++ b/cranelift/frontend/src/frontend.rs
@@ -379,8 +379,8 @@ impl<'a> FunctionBuilder<'a> {
}
/// Declares the type of a variable, so that it can be... | 1 | 2 | 2 |
a97e82c6e2f968b6afc5121d791bcc4a0f689eee | Chris Dickinson | 2023-04-09T21:14:19 | doc: fix StackSlot reference to FunctionBuilder (#6182)
`FunctionBuilder::create_stackslot` was split into `create_sized_stack_slot`
and `create_dynamic_stack_slot`. This updates the doc in the `StackBuilder`
docstring to refer to the new methods.
Fixes #5838. | diff --git a/cranelift/codegen/src/ir/entities.rs b/cranelift/codegen/src/ir/entities.rs
index 51c763320..576268be1 100644
--- a/cranelift/codegen/src/ir/entities.rs
+++ b/cranelift/codegen/src/ir/entities.rs
@@ -106,7 +106,9 @@ entity_impl!(Inst, "inst");
/// [call stack](https://en.wikipedia.org/wiki/Call_stack).
/... | 1 | 3 | 1 |
71d3b638f315ccaaff5fc7b49ba2064f67f295db | Alexa VanHattum | 2023-04-09T20:01:49 | Clarify instructions.rs documentation for ushr/ashr (narrow values) (#6186) | diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs
index 36c76a612..21ff5ad34 100755
--- a/cranelift/codegen/meta/src/shared/instructions.rs
+++ b/cranelift/codegen/meta/src/shared/instructions.rs
@@ -2415,7 +2415,7 @@ pub(crate) fn define(
places... | 1 | 4 | 4 |
e3dbad9cc20ca3464b9a5d8848c01a9005d4b4bf | kevaundray | 2023-04-09T19:55:15 | add result type assertion (#6184) | diff --git a/cranelift/codegen/src/ir/instructions.rs b/cranelift/codegen/src/ir/instructions.rs
index 085f20363..e90488d22 100644
--- a/cranelift/codegen/src/ir/instructions.rs
+++ b/cranelift/codegen/src/ir/instructions.rs
@@ -933,6 +933,7 @@ mod tests {
assert!(cmp.requires_typevar_operand());
asse... | 1 | 1 | 0 |
e84305b4451f7cfcd3ffb842cc6584ff12c5c30f | Dan Gohman | 2023-04-08T06:13:50 | Add a WASI test for a creating an absolute-path symlink. (#6166)
Wasmtime disallows guests from using `path_symlink` to create
absolute-path symlinks, as they could confuse other code into
accessing resources on the host that the guest otherwise doesn't
have access to.
This patch adds a test for this behavior. | diff --git a/crates/test-programs/wasi-tests/src/bin/symlink_create.rs b/crates/test-programs/wasi-tests/src/bin/symlink_create.rs
index 422da184c..2553f34fc 100644
--- a/crates/test-programs/wasi-tests/src/bin/symlink_create.rs
+++ b/crates/test-programs/wasi-tests/src/bin/symlink_create.rs
@@ -62,6 +62,11 @@ unsafe f... | 1 | 6 | 0 |
bada17beabd7b266a21c6f6c03c89e24e599a773 | bjorn3 | 2023-04-07T15:22:13 | Various cranelift interpreter improvements (#6176)
* Remove the validate_address State trait method
It isn't used anywhere
* Expose the inner Function of a Frame
This is necessary to create your own interpreter that reuses most of
cranelift-interpreter. For example to use a different State
implementation.
* Suppor... | diff --git a/cranelift/interpreter/src/frame.rs b/cranelift/interpreter/src/frame.rs
index 4270225af..c67516823 100644
--- a/cranelift/interpreter/src/frame.rs
+++ b/cranelift/interpreter/src/frame.rs
@@ -12,7 +12,7 @@ pub(crate) type Entries = Vec<Option<DataValue>>;
#[derive(Debug)]
pub struct Frame<'a> {
/// ... | 4 | 16 | 38 |
e1777710b1b40fb6e4804e9a81253a9d30228bc4 | bjorn3 | 2023-04-06T18:44:12 | Don't override declare_*_in_func in cranelift-jit (#6169)
Instead remove the colocated flag for hotplug mode in define_function.
This prevents issues if declare_*_in_func wasn't used due to eg the
function being from a previously serialized module and now deserialized
into JITModule. | diff --git a/cranelift/jit/src/backend.rs b/cranelift/jit/src/backend.rs
index 79e5db86a..7defa0de7 100644
--- a/cranelift/jit/src/backend.rs
+++ b/cranelift/jit/src/backend.rs
@@ -642,43 +642,6 @@ impl Module for JITModule {
Ok(id)
}
- /// Use this when you're building the IR of a function to refere... | 1 | 15 | 37 |
67c85b883ed63c07217a40016f171eca9284497a | bjorn3 | 2023-04-06T17:13:55 | Remove the DataContext wrapper around DataDescription (#6170)
* Remove the DataContext wrapper around DataDescription
It doesn't have much of a purpose while making it harder to for example
rewrite the function and data object declarations within it as is
necessary for deserializing a serialized module.
* Derive Deb... | diff --git a/cranelift/jit/src/backend.rs b/cranelift/jit/src/backend.rs
index 04e4d4c72..79e5db86a 100644
--- a/cranelift/jit/src/backend.rs
+++ b/cranelift/jit/src/backend.rs
@@ -8,7 +8,7 @@ use cranelift_codegen::{binemit::Reloc, CodegenError};
use cranelift_control::ControlPlane;
use cranelift_entity::SecondaryMa... | 5 | 119 | 151 |
e1812b611bbac91ace029b413db9cbec8086851d | bjorn3 | 2023-04-06T16:14:13 | Rename define_function to define_function_with_control_plane (#6165)
And add a define_function convenience function which uses a default
control plane. | diff --git a/cranelift/filetests/src/function_runner.rs b/cranelift/filetests/src/function_runner.rs
index 945e0ee33..a78650643 100644
--- a/cranelift/filetests/src/function_runner.rs
+++ b/cranelift/filetests/src/function_runner.rs
@@ -234,8 +234,11 @@ impl TestFileCompiler {
.ok_or(anyhow!("Undeclared fu... | 8 | 48 | 28 |
a9cda5af19ee0dc8fda2debe5ab0e1fe11caca0b | Afonso Bordado | 2023-04-05T22:33:10 | cranelift: Implement PartialEq in `Function` (#6157) | diff --git a/cranelift/codegen/src/ir/function.rs b/cranelift/codegen/src/ir/function.rs
index e277aa46d..f9dd4b7d1 100644
--- a/cranelift/codegen/src/ir/function.rs
+++ b/cranelift/codegen/src/ir/function.rs
@@ -64,7 +64,7 @@ impl<'de> Deserialize<'de> for VersionMarker {
/// Function parameters used when creating ... | 3 | 75 | 94 |
ccfd132589cb0fb3987c064f80aae868203c96aa | Dan Gohman | 2023-04-05T20:22:11 | Rename the command entrypoint from `run` back to `main`. (#131)
LLVM has special handling for functions named `main`, which we need to
avoid because we're creating the component-level `main` rather than the
C-level `main`. To do this, write the `main` function in assembly, which
is fortunately very simple now. | diff --git a/host/src/main.rs b/host/src/main.rs
index a27778efe..7cc453da9 100644
--- a/host/src/main.rs
+++ b/host/src/main.rs
@@ -68,7 +68,7 @@ async fn run_command(
let (wasi, _instance) = Command::instantiate_async(&mut store, component, linker).await?;
- let result: Result<(), ()> = wasi.call_run(&mut... | 2 | 21 | 21 |
064968b01de111916d072c22131d2b1535fd2f7d | Afonso Bordado | 2023-04-05T19:09:48 | cranelift-interpreter: Propagate traps across calls (#6156)
* cranelift-interpreter: Propagate traps from call's
* cranelift-interpreter: Make `unwrap_return` only available in tests
This is a footgun for normal use in the interpreter (#6156) but it
still has uses in the tests, so enable it only there. | diff --git a/cranelift/interpreter/src/interpreter.rs b/cranelift/interpreter/src/interpreter.rs
index eeab50f51..c5c6d8b50 100644
--- a/cranelift/interpreter/src/interpreter.rs
+++ b/cranelift/interpreter/src/interpreter.rs
@@ -118,17 +118,29 @@ impl<'a> Interpreter<'a> {
maybe_inst = layout.first... | 2 | 66 | 8 |
52e90532e0050bbb271813321727588e6a1c25ab | Alex Crichton | 2023-04-05T17:26:36 | Add a limits and trap-on-OOM options to the CLI (#6149)
* Add a limits and trap-on-OOM options to the CLI
This commit adds new options to the `wasmtime` CLI to control the
`Store::limiter` behavior at runtime. This enables artificially
restriction the memory usage of the wasm instance, for example.
Additionally a new... | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index b656dc2ea..6c10de3db 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -97,13 +97,18 @@ impl StoreLimits {
}
impl ResourceLimiter for StoreLimits {
- fn memory_growing(&mut self, current: usize, desir... | 8 | 310 | 83 |
51e8eafff2b0bb2a10efb1452a23c4c9feff4261 | Alex Crichton | 2023-04-05T16:25:38 | Default to the native host for `wasmtime compile` (#6152)
This commit updates the implementation of the `wasmtime compile` to use
the native host as the default targeted output. Previously the string
for the native host's target was used as the default target, but this
notably disables CPU feature inference meaning th... | diff --git a/src/commands/compile.rs b/src/commands/compile.rs
index 2ee93eb03..bf6c30801 100644
--- a/src/commands/compile.rs
+++ b/src/commands/compile.rs
@@ -5,7 +5,6 @@ use clap::Parser;
use once_cell::sync::Lazy;
use std::fs;
use std::path::PathBuf;
-use target_lexicon::Triple;
use wasmtime::Engine;
use wasmt... | 1 | 1 | 7 |
34c282ac2ec6934c7e431bb4ae099994b759ee63 | Jamey Sharp | 2023-04-05T16:22:31 | ISLE: pattern type is always known (#6144)
While type-checking the AST for a pattern, ISLE was passing in an
`Option<TypeId>` for the expected result type of the pattern. However,
at every call we either passed `Some` type explicitly, or passed the
parent's expected type in a self-recursive call.
Therefore, by induct... | diff --git a/cranelift/isle/isle/src/sema.rs b/cranelift/isle/isle/src/sema.rs
index 2a4fdb763..bee3891bf 100644
--- a/cranelift/isle/isle/src/sema.rs
+++ b/cranelift/isle/isle/src/sema.rs
@@ -1852,32 +1852,26 @@ impl TermEnv {
&self,
tyenv: &mut TypeEnv,
pat: &ast::Pattern,
- expected... | 1 | 75 | 113 |
3275c45993a3a3e9a2305795c5064c7a00db0123 | Alex Crichton | 2023-04-05T15:28:18 | Use an unaligned write for resolving libcall relocations (#6147)
This commit changes resolution of libcall relocations from writing a
`usize` into a raw pointer to specifically performing an unaligned
write. The addresses of libcalls to write to are not guaranteed to be
aligned, so this could technically have caused i... | diff --git a/crates/jit/src/code_memory.rs b/crates/jit/src/code_memory.rs
index 128c3acec..b2272195f 100644
--- a/crates/jit/src/code_memory.rs
+++ b/crates/jit/src/code_memory.rs
@@ -299,7 +299,11 @@ impl CodeMemory {
obj::LibCall::FmaF32 => libcalls::relocs::fmaf32 as usize,
obj::Li... | 1 | 5 | 1 |
146f5768da65334ade68e42a5882e15e5a8a496e | Pat Hickey | 2023-04-04T22:40:39 | Remove resource abstraction from clocks (#129)
* wit: remove resource index from monotonic-clocks and wall-clocks, delete instance-*-clock interfaces
At this time, we don't have use cases for providing multiple wall clocks
or multiple monotonic clocks to the same component. So, according to the
principle of follo... | diff --git a/host/src/clocks.rs b/host/src/clocks.rs
index f71473e44..b2d4c05ff 100644
--- a/host/src/clocks.rs
+++ b/host/src/clocks.rs
@@ -1,16 +1,14 @@
#![allow(unused_variables)]
use crate::command::wasi::{
- instance_monotonic_clock, instance_wall_clock,
- monotonic_clock::{self, Instant, MonotonicClock}... | 6 | 24 | 169 |
e5b6452f81b400827330f15d12b0f65c8cb0d324 | Pat Hickey | 2023-04-04T22:40:39 | Remove resource abstraction from clocks (#129)
* wit: remove resource index from monotonic-clocks and wall-clocks, delete instance-*-clock interfaces
At this time, we don't have use cases for providing multiple wall clocks
or multiple monotonic clocks to the same component. So, according to the
principle of follo... | diff --git a/src/lib.rs b/src/lib.rs
index afd7bddc2..7212f5b88 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,8 +1,7 @@
#![allow(unused_variables)] // TODO: remove this when more things are implemented
use crate::bindings::{
- exit, filesystem, instance_monotonic_clock, instance_wall_clock, monotonic_clock, net... | 1 | 11 | 62 |
e3f999fe261a917e334e12cb580c2b561ec3f488 | Joel Dice | 2023-04-04T20:29:08 | add `trappable_error_type` for `streams::stream-error`
This allows us to easily pass errors to the guest instead of trapping.
Signed-off-by: Joel Dice <joel.dice@fermyon.com> | diff --git a/host/src/command.rs b/host/src/command.rs
index b3d4b769a..5f2c80e06 100644
--- a/host/src/command.rs
+++ b/host/src/command.rs
@@ -6,7 +6,10 @@ pub mod wasi {
world: "command",
tracing: true,
async: true,
- trappable_error_type: { "filesystem"::"error-code": Error }
+ ... | 4 | 97 | 114 |
c35c047fc3da7adcf32fbcb7541faf21ee464310 | Jimmy Bourassa | 2023-04-04T16:49:00 | Derive `Copy` on `wasmtime::ValType` (#6138)
`ValType` is small enough that it can be copiable. Doing so means
Copy types can embed a `ValType` in them.
The need for this came up in this Wasmtime Ruby PR:
https://github.com/bytecodealliance/wasmtime-rb/pull/158 | diff --git a/crates/wasmtime/src/types.rs b/crates/wasmtime/src/types.rs
index 7286eb819..3bcb28899 100644
--- a/crates/wasmtime/src/types.rs
+++ b/crates/wasmtime/src/types.rs
@@ -19,7 +19,7 @@ pub enum Mutability {
// Value Types
/// A list of all possible value types in WebAssembly.
-#[derive(Debug, Clone, Hash,... | 1 | 1 | 1 |
94f2ff09215af0d312ad4d88e068bc52ee2b3ef8 | Yoni L | 2023-03-30T00:46:14 | cranelift::codegen::Context::optimize(): reduce verbosity of "egraph stats" traces (#6122) | diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs
index bd8ae3b64..db0ff0434 100644
--- a/cranelift/codegen/src/context.rs
+++ b/cranelift/codegen/src/context.rs
@@ -393,7 +393,7 @@ impl Context {
&mut alias_analysis,
);
pass.run();
- log::info!("egra... | 1 | 1 | 1 |
c10e804617a0fa684a91aef49e05b526d5e08ff2 | Roman Volosatovs | 2023-03-29T18:30:54 | feat(wit-bindgen): relax `Sized` bound on `Host` traits (#6117)
This allows to use implementations as trait objects
(e.g. `Box<dyn myiface::Host>`)
Signed-off-by: Roman Volosatovs <roman@profian.com> | diff --git a/crates/wit-bindgen/src/lib.rs b/crates/wit-bindgen/src/lib.rs
index a741e3e22..426c0a58f 100644
--- a/crates/wit-bindgen/src/lib.rs
+++ b/crates/wit-bindgen/src/lib.rs
@@ -992,7 +992,7 @@ impl<'a> InterfaceGenerator<'a> {
}
// Generate the `pub trait` which represents the host functionali... | 1 | 1 | 1 |
97d9f77d949cff1e9cc4fe2476928544e796a9b2 | Karl Meakin | 2023-03-28T22:32:04 | Add `precise_output` argument to `test optimize`. (#6111)
* Add `precise_output` argument to `test optimise`.
Also allow optimise tests to be updated by `CRANELIFT_TEST_BLESS=1`
* Move `check_precise_output` and `update_test` to `subtest` | diff --git a/cranelift/filetests/src/subtest.rs b/cranelift/filetests/src/subtest.rs
index b34292917..5b4776700 100644
--- a/cranelift/filetests/src/subtest.rs
+++ b/cranelift/filetests/src/subtest.rs
@@ -2,13 +2,16 @@
use crate::runone::FileUpdate;
use anyhow::Context as _;
+use anyhow::{bail, Result};
use cranel... | 3 | 114 | 101 |
5e3dd7882637028ff6482bf07517886b172719e0 | Eduardo Rodrigues | 2023-03-27T19:10:54 | chore: remove outgoing http from command linker | diff --git a/host/src/command.rs b/host/src/command.rs
index 1634c4f5a..b3d4b769a 100644
--- a/host/src/command.rs
+++ b/host/src/command.rs
@@ -33,7 +33,5 @@ pub fn add_to_linker<T: Send>(
wasi::exit::add_to_linker(l, f)?;
wasi::environment::add_to_linker(l, f)?;
wasi::preopens::add_to_linker(l, f)?;
- ... | 1 | 0 | 2 |
8696d83393aab3dd09320045a34301527be0ad70 | Eduardo Rodrigues | 2023-03-27T18:17:32 | Revert "chore: include command host implementation for http"
This reverts commit 9eea9cebd143914b192fcf12c7c185fe199379b6. | diff --git a/host/src/default_outgoing_http.rs b/host/src/default_outgoing_http.rs
index 1ceceec02..ec16c8289 100644
--- a/host/src/default_outgoing_http.rs
+++ b/host/src/default_outgoing_http.rs
@@ -1,27 +1,18 @@
use crate::{
- command, proxy,
- proxy::wasi::types::{FutureIncomingResponse, OutgoingRequest, Req... | 2 | 9 | 211 |
566da91239cf2df19626bce28e4a5d65e7b654c4 | Pat Hickey | 2023-03-24T19:28:54 | rename command's `main` to `run` (unfortunately)
this is an unfortunate problem with building the adapter: for some
reason, wasm-ld will modify an export named `main` with no parameters
by renaming it __original_main, and exporting a `main` with two i32
parameters.
we should see if this behavior is fixable, this is h... | diff --git a/src/lib.rs b/src/lib.rs
index 4ca3a2d69..afd7bddc2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -32,7 +32,7 @@ pub mod bindings {
raw_strings,
// The generated definition of command will pull in std, so we are defining it
// manually below instead
- skip: ["main", "get-dire... | 1 | 2 | 2 |
3db2a44a9d0c36e2125c33c54da692ffda4ab1a6 | Pat Hickey | 2023-03-24T19:28:54 | rename command's `main` to `run` (unfortunately)
this is an unfortunate problem with building the adapter: for some
reason, wasm-ld will modify an export named `main` with no parameters
by renaming it __original_main, and exporting a `main` with two i32
parameters.
we should see if this behavior is fixable, this is h... | diff --git a/host/src/main.rs b/host/src/main.rs
index 7cc453da9..a27778efe 100644
--- a/host/src/main.rs
+++ b/host/src/main.rs
@@ -68,7 +68,7 @@ async fn run_command(
let (wasi, _instance) = Command::instantiate_async(&mut store, component, linker).await?;
- let result: Result<(), ()> = wasi.call_main(&mu... | 2 | 21 | 21 |
f336265782d144485239504a0abb5309db7208c3 | Pat Hickey | 2023-03-24T18:39:30 | adapter: arguments are lazily initialized in State instead of passed to main | diff --git a/src/lib.rs b/src/lib.rs
index e36f27e90..4ca3a2d69 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -46,12 +46,7 @@ pub mod bindings {
#[no_mangle]
#[cfg(feature = "command")]
-pub unsafe extern "C" fn main(args_ptr: *const WasmStr, args_len: usize) -> u32 {
- State::with_mut(|state| {
- state.arg... | 1 | 53 | 36 |
985710d8d3e32a20547e0e383b631bfcfc0191bc | Pat Hickey | 2023-03-24T18:39:13 | host: get-arguments available from environment::get_arguments | diff --git a/host/src/env.rs b/host/src/env.rs
index 46c7c1257..3c50191c5 100644
--- a/host/src/env.rs
+++ b/host/src/env.rs
@@ -6,6 +6,9 @@ impl wasi::environment::Host for WasiCtx {
async fn get_environment(&mut self) -> anyhow::Result<Vec<(String, String)>> {
Ok(self.env.clone())
}
+ async fn g... | 3 | 52 | 44 |
960a1840fcdfe35455ee93fa5310ad67d95eb4d0 | Pat Hickey | 2023-03-24T18:38:56 | wasi-common: args are back to being part of WasiCtx | diff --git a/wasi-common/cap-std-sync/src/lib.rs b/wasi-common/cap-std-sync/src/lib.rs
index a18726cf7..f5a64899d 100644
--- a/wasi-common/cap-std-sync/src/lib.rs
+++ b/wasi-common/cap-std-sync/src/lib.rs
@@ -113,6 +113,10 @@ impl WasiCtxBuilder {
self.0.insert_listener(fd, listener);
self
}
+ ... | 2 | 17 | 0 |
fdd91a99dafdb4ee3d42ee9b92a647734853041a | Pat Hickey | 2023-03-23T22:17:00 | Descriptors is initialized on creation, use refcell<option<descriptors>> to represent uninit | diff --git a/src/descriptors.rs b/src/descriptors.rs
index 2937d5acd..288a20992 100644
--- a/src/descriptors.rs
+++ b/src/descriptors.rs
@@ -120,38 +120,30 @@ pub struct Descriptors {
}
impl Descriptors {
- pub fn new() -> Self {
- Descriptors {
+ pub fn new(import_alloc: &ImportAlloc, arena: &BumpAren... | 2 | 98 | 86 |
6370d3b6deb59e737facba9da932e95524aa2e7f | Pat Hickey | 2023-03-23T22:17:58 | fix warnings | diff --git a/host/tests/command.rs b/host/tests/command.rs
index 0b5df1fcd..8f3507b8c 100644
--- a/host/tests/command.rs
+++ b/host/tests/command.rs
@@ -1,8 +1,6 @@
use anyhow::Result;
use cap_rand::RngCore;
use cap_std::{ambient_authority, fs::Dir, time::Duration};
-use host::command::wasi::filesystem::Descriptor;
... | 1 | 0 | 2 |
378537c5a601c29eac132294fa53cff84dfa7d33 | Pat Hickey | 2023-03-23T21:48:04 | Update build.rs
Co-authored-by: Joel Dice <joel.dice@fermyon.com> | diff --git a/build.rs b/build.rs
index 26ed1b1eb..fcd7b7c6d 100644
--- a/build.rs
+++ b/build.rs
@@ -230,7 +230,7 @@ fn build_raw_intrinsics() -> Vec<u8> {
{
let mut reloc = Vec::new();
3u32.encode(&mut reloc); // target section (code is the 4th section, 3 when 0-indexed)
- 6u32.encode(&mu... | 1 | 1 | 1 |
9eea9cebd143914b192fcf12c7c185fe199379b6 | Eduardo Rodrigues | 2023-03-23T21:24:57 | chore: include command host implementation for http | diff --git a/host/src/default_outgoing_http.rs b/host/src/default_outgoing_http.rs
index ec16c8289..1ceceec02 100644
--- a/host/src/default_outgoing_http.rs
+++ b/host/src/default_outgoing_http.rs
@@ -1,18 +1,27 @@
use crate::{
- proxy::wasi,
- proxy::wasi::types::{
- FutureIncomingResponse as Response, O... | 2 | 211 | 9 |
3546ccf7d1f54a1826ae3122301c58cb8e4ed0f3 | Afonso Bordado | 2023-03-23T21:08:38 | riscv64: Cleanup unused `lower_float_unordered` (#6096) | diff --git a/cranelift/codegen/src/isa/riscv64/inst/emit.rs b/cranelift/codegen/src/isa/riscv64/inst/emit.rs
index d44d2d306..3d2585930 100644
--- a/cranelift/codegen/src/isa/riscv64/inst/emit.rs
+++ b/cranelift/codegen/src/isa/riscv64/inst/emit.rs
@@ -370,68 +370,6 @@ impl Inst {
}
insts
}
-
- ... | 1 | 0 | 62 |
bba17a8fc2a70b131916decead8114a3b02554a8 | Pat Hickey | 2023-03-23T18:04:06 | cap-std-sync: trap, instead of panic, in poll_oneoff | diff --git a/wasi-common/cap-std-sync/src/sched.rs b/wasi-common/cap-std-sync/src/sched.rs
index 63b3febc3..735849248 100644
--- a/wasi-common/cap-std-sync/src/sched.rs
+++ b/wasi-common/cap-std-sync/src/sched.rs
@@ -60,7 +60,9 @@ pub async fn poll_oneoff<'a>(poll: &mut Poll<'a>) -> Result<(), Error> {
... | 1 | 3 | 1 |
77e9b9d6d2708bc745ca004f593ac966b1beec83 | Pat Hickey | 2023-03-23T17:03:34 | apparently poll_oneoff_stdio is hosed on windows but thats fine i guess | diff --git a/host/tests/command.rs b/host/tests/command.rs
index 9e72559cf..0b5df1fcd 100644
--- a/host/tests/command.rs
+++ b/host/tests/command.rs
@@ -489,7 +489,11 @@ async fn run_poll_oneoff_files(store: Store<WasiCtx>, wasi: Command) -> Result<(
}
async fn run_poll_oneoff_stdio(store: Store<WasiCtx>, wasi: Com... | 1 | 5 | 1 |
a6925c21c5c4453c5f05cca92159ef9c1bd273a6 | Saúl Cabrera | 2023-03-23T14:39:36 | wasmtime: Make `StoreContextMut` accessible in epoch deadline callback (#6075)
This commit changes the signature of the `Store::epoch_deadline_callback` to
take in `StoreContextMut` instead of a mutable reference to the store's data.
This is useful in cases in which the callback definition needs access to the
Store t... | diff --git a/crates/wasmtime/src/store.rs b/crates/wasmtime/src/store.rs
index 9a322fd6a..8b7f5f3e6 100644
--- a/crates/wasmtime/src/store.rs
+++ b/crates/wasmtime/src/store.rs
@@ -425,11 +425,13 @@ enum OutOfGas {
/// What to do when the engine epoch reaches the deadline for a Store
/// during execution of a funct... | 2 | 17 | 7 |
ae174ce092a23817a0251c4cdfe346b9776430b3 | Eduardo Rodrigues | 2023-03-23T09:37:58 | chore: add relevant linker | diff --git a/host/src/command.rs b/host/src/command.rs
index 0bdfea029..6833d6803 100644
--- a/host/src/command.rs
+++ b/host/src/command.rs
@@ -31,5 +31,7 @@ pub fn add_to_linker<T: Send>(
wasi::exit::add_to_linker(l, f)?;
wasi::environment::add_to_linker(l, f)?;
wasi::environment_preopens::add_to_linke... | 1 | 2 | 0 |
c5ca3f1eb30051316c06343de28742ad5f26416b | Pat Hickey | 2023-03-23T02:36:29 | poll_oneoff: use import allocator solely on the import func call
this is required because calling `state.descriptors()` could end up
initializing the descriptor table, which also uses the import allocator.
this is a huge whitespace change, but effectively its just a much
smaller body in the closure. | diff --git a/src/lib.rs b/src/lib.rs
index 4fd7eced6..43579cb39 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1548,255 +1548,247 @@ pub unsafe extern "C" fn poll_oneoff(
}
State::with(|state| {
- state.import_alloc.with_buffer(
- results,
- nsubscriptions
- .checke... | 1 | 216 | 224 |
a9ddff85f0fbf297d3dbcb0d10e01a8ea02506a8 | Pat Hickey | 2023-03-23T02:36:05 | renumber: allow overwriting. note it may invalidate preopen table | diff --git a/src/descriptors.rs b/src/descriptors.rs
index 715308f39..2937d5acd 100644
--- a/src/descriptors.rs
+++ b/src/descriptors.rs
@@ -302,16 +302,13 @@ impl Descriptors {
pub fn renumber(&mut self, from_fd: Fd, to_fd: Fd) -> Result<(), Errno> {
// First, ensure from_fd is in bounds:
drop(s... | 1 | 1 | 4 |
e199109a0bfa90845f99b44659b9b59a37903dbc | Pat Hickey | 2023-03-23T00:05:42 | fix macros | diff --git a/src/lib.rs b/src/lib.rs
index 881235ca0..4fd7eced6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -4,7 +4,6 @@ use crate::bindings::{
exit, filesystem, instance_monotonic_clock, instance_wall_clock, monotonic_clock, network,
poll, random, streams, wall_clock,
};
-use core::arch::wasm32;
use core::... | 2 | 13 | 5 |
1af3c418532a89b224bf858f0f66d75622dbc3ac | Pat Hickey | 2023-03-22T23:43:28 | factor descriptors out into a separate module
i didnt run verify step-by-step during this so i accidentally got panick
machinery in here. thats what i get | diff --git a/src/descriptors.rs b/src/descriptors.rs
new file mode 100644
index 000000000..cebb5994e
--- /dev/null
+++ b/src/descriptors.rs
@@ -0,0 +1,390 @@
+use crate::bindings::streams::{self, InputStream, OutputStream};
+use crate::bindings::{filesystem, tcp};
+use crate::{set_stderr_stream, BumpArena, File, Import... | 2 | 459 | 397 |
fd9e0a5dfedb5e1daa7c4e69d114c2c9e410ceed | Joel Dice | 2023-03-22T20:29:41 | fix nanosecond->millisecond conversion in `poll_oneoff`
Signed-off-by: Joel Dice <joel.dice@fermyon.com> | diff --git a/wasi-common/cap-std-sync/src/sched.rs b/wasi-common/cap-std-sync/src/sched.rs
index 20e262d94..63b3febc3 100644
--- a/wasi-common/cap-std-sync/src/sched.rs
+++ b/wasi-common/cap-std-sync/src/sched.rs
@@ -81,7 +81,7 @@ pub async fn poll_oneoff<'a>(poll: &mut Poll<'a>) -> Result<(), Error> {
... | 1 | 1 | 1 |
017f85e7bf3a9f7741ec7452a6ee70be3a7f81d0 | Joel Dice | 2023-03-22T19:00:20 | add `ReadOnlyDir` and `ReadOnlyFile`
These are useful for giving guests read-only access to a directory and
its contents.
Signed-off-by: Joel Dice <joel.dice@fermyon.com> | diff --git a/host/tests/command.rs b/host/tests/command.rs
index 2d1858e0a..36606a432 100644
--- a/host/tests/command.rs
+++ b/host/tests/command.rs
@@ -11,6 +11,7 @@ use std::{
use wasi_cap_std_sync::WasiCtxBuilder;
use wasi_common::{
clocks::{WasiMonotonicClock, WasiWallClock},
+ dir::ReadOnlyDir,
pipe... | 4 | 304 | 1 |
ffa75f0f0dded737572a7d29f292922a46960d70 | Pat Hickey | 2023-03-22T16:41:18 | get rid of arg_preopens from state, env_preopens are just preopens | diff --git a/src/lib.rs b/src/lib.rs
index 34a1d0e8c..05d2c557e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2226,13 +2226,9 @@ struct State {
/// to take care of initialization.
env_vars: Cell<Option<&'static [StrTuple]>>,
- /// Preopened directories passed along with `main` args. Access with
- /// `... | 1 | 28 | 47 |
a1072007b87e05ba6c7867c53526b4fa31e0ae7d | Afonso Bordado | 2023-03-22T11:24:53 | fuzzgen: Generate `call_indirect` instructions (#6077)
* fuzzgen: Add `call_indirect`
* fuzzgen: Assign `call` results to variables | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index 7679c5df3..52f89db23 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -9,7 +9,7 @@ use cranelift::codegen::ir::stackslot::StackSize;
use cranelift:... | 1 | 25 | 8 |
3957d577b71560a14592e110887b48df46057b5a | Afonso Bordado | 2023-03-22T11:09:00 | fuzzgen: Fuzz ISA flags (#6001) | diff --git a/cranelift/fuzzgen/src/lib.rs b/cranelift/fuzzgen/src/lib.rs
index 26cca8363..e8e649314 100644
--- a/cranelift/fuzzgen/src/lib.rs
+++ b/cranelift/fuzzgen/src/lib.rs
@@ -6,7 +6,9 @@ use arbitrary::{Arbitrary, Unstructured};
use cranelift::codegen::data_value::DataValue;
use cranelift::codegen::ir::{types::... | 4 | 102 | 4 |
9d23a6c0c1695c9989fd9cbf7a55ce2a4b29f2f9 | Pat Hickey | 2023-03-21T23:48:16 | host and adapter: provide stdio via preopens, dont pass stdio or arg preopens to main
stdio never gets initialized for the reactor, tha | diff --git a/src/lib.rs b/src/lib.rs
index 7ef24453d..34a1d0e8c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -44,48 +44,32 @@ mod bindings {
#[no_mangle]
#[cfg(feature = "command")]
-pub unsafe extern "C" fn main(
- stdin: InputStream,
- stdout: OutputStream,
- stderr: OutputStream,
- args_ptr: *const Wa... | 1 | 44 | 109 |
59d46c2fecf891b5479b91b96ba315042831dc8a | uint256_t | 2023-03-21T18:59:54 | cranelift-entity: improve `EntitySet::cardinality()` implementation (#6066)
* Simplify 'EntitySet::cardinality()'
* Fix test | diff --git a/cranelift/entity/src/set.rs b/cranelift/entity/src/set.rs
index a5c8b7b29..60578d6e4 100644
--- a/cranelift/entity/src/set.rs
+++ b/cranelift/entity/src/set.rs
@@ -69,20 +69,14 @@ where
}
}
- /// Returns the cardinality of the set. More precisely, it returns the number of calls to
+ ... | 1 | 44 | 11 |
549bc5e5f921ce68c193d9a9dc04c0a24eff637d | Pat Hickey | 2023-03-09T01:53:59 | command tests: inherit stdout and stderr | diff --git a/host/tests/command.rs b/host/tests/command.rs
index 2d1858e0a..c45fd0c33 100644
--- a/host/tests/command.rs
+++ b/host/tests/command.rs
@@ -44,7 +44,13 @@ async fn instantiate(path: &str) -> Result<(Store<WasiCtx>, Command)> {
let mut linker = Linker::new(&engine);
add_to_linker(&mut linker, |x| ... | 1 | 7 | 1 |
f8068634ba455c3934adc6723db0f27864b625cc | Pat Hickey | 2023-03-09T01:54:08 | adapter: make it a little clearer where unreachable is coming from | diff --git a/src/macros.rs b/src/macros.rs
index 0a4c6114f..ad99834cd 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -50,14 +50,14 @@ pub(crate) fn eprint_u32(x: u32) {
/// A minimal `unreachable`.
macro_rules! unreachable {
() => {{
- eprint!("unreachable executed at line ");
+ eprint!("unreach... | 1 | 2 | 2 |
777dd77f651cd573f03219da15733de885773bcf | Pat Hickey | 2023-03-08T23:04:27 | wire up adapter macros to stderr stream print | diff --git a/src/lib.rs b/src/lib.rs
index a8919b73c..7ef24453d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -52,6 +52,7 @@ pub unsafe extern "C" fn main(
args_len: usize,
preopens: PreopenList,
) -> u32 {
+ set_stderr_stream(stderr);
State::with_mut(|state| {
// Initialization of `State` aut... | 2 | 4 | 3 |
b5f6a9c5b703541e349560327dad427d1cd32acb | Pat Hickey | 2023-03-08T23:00:49 | intrinsics: add stderr stream to globals, plus getter/setter funcs | diff --git a/build.rs b/build.rs
index d6766ac7e..26ed1b1eb 100644
--- a/build.rs
+++ b/build.rs
@@ -84,6 +84,8 @@ fn build_raw_intrinsics() -> Vec<u8> {
funcs.function(1);
funcs.function(0);
funcs.function(1);
+ funcs.function(0);
+ funcs.function(1);
module.section(&funcs);
// Declare... | 1 | 42 | 7 |
788e3d251bfb055eb468c37a88d92d4ebaedbe02 | Pat Hickey | 2023-03-08T22:47:07 | intrinsics: just abstract the archive syms a little bit | diff --git a/build.rs b/build.rs
index 6b0dc9652..d6766ac7e 100644
--- a/build.rs
+++ b/build.rs
@@ -253,16 +253,23 @@ fn build_archive(wasm: &[u8]) -> Vec<u8> {
// Here we're building an archive with just a few symbols so it's a bit
// easier. Note though we don't know the offset of our `intrinsics.o` up
... | 1 | 16 | 8 |
148ff72f7440d316664a01f1f11b07f6c01947f6 | Alex Crichton | 2023-03-21T15:25:54 | Update to Wasmtime 7 | diff --git a/host/Cargo.toml b/host/Cargo.toml
index e7bcd4a6f..0bde58183 100644
--- a/host/Cargo.toml
+++ b/host/Cargo.toml
@@ -11,7 +11,7 @@ cap-std = { workspace = true }
cap-rand = { workspace = true }
tokio = { version = "1.22.0", features = [ "rt", "macros" ] }
tracing = { workspace = true }
-wasmtime = { git ... | 1 | 1 | 1 |
76d01f82989bdc917ea2897dbe25f73801596bc3 | Pat Hickey | 2023-03-20T22:49:55 | fix warning from rebase | diff --git a/host/src/filesystem.rs b/host/src/filesystem.rs
index 87915f277..9a39424e8 100644
--- a/host/src/filesystem.rs
+++ b/host/src/filesystem.rs
@@ -2,7 +2,7 @@
use crate::command::wasi;
use crate::command::wasi::streams::{InputStream, OutputStream};
-use crate::{HostResult, WasiCtx};
+use crate::WasiCtx;
... | 1 | 1 | 1 |
31c84f87459ff47b51dd05c4504c0670a7404025 | Pat Hickey | 2023-03-17T18:35:11 | these 6 tests still fail on windows | diff --git a/host/tests/command.rs b/host/tests/command.rs
index d0a61cdbd..2d1858e0a 100644
--- a/host/tests/command.rs
+++ b/host/tests/command.rs
@@ -507,7 +507,11 @@ async fn run_dangling_fd(store: Store<WasiCtx>, wasi: Command) -> Result<()> {
}
async fn run_dangling_symlink(store: Store<WasiCtx>, wasi: Comman... | 1 | 30 | 6 |
9f4984501af1e656fa02a6ea2d3ee13c197f1f7f | Pat Hickey | 2023-03-17T00:45:42 | look at all these new tests that pass!!! | diff --git a/host/tests/command.rs b/host/tests/command.rs
index 0711eeebe..d0a61cdbd 100644
--- a/host/tests/command.rs
+++ b/host/tests/command.rs
@@ -507,7 +507,7 @@ async fn run_dangling_fd(store: Store<WasiCtx>, wasi: Command) -> Result<()> {
}
async fn run_dangling_symlink(store: Store<WasiCtx>, wasi: Command... | 1 | 11 | 11 |
90e85546856b06fd59511d5d7e54822c3c4ad51f | Pat Hickey | 2023-03-17T00:38:38 | trappable errors in wasi filesystem | diff --git a/host/src/command.rs b/host/src/command.rs
index b4958944c..63d613230 100644
--- a/host/src/command.rs
+++ b/host/src/command.rs
@@ -6,6 +6,7 @@ pub mod wasi {
world: "command",
tracing: true,
async: true,
+ trappable_error_type: { "filesystem"::"error-code": Error }
}... | 2 | 167 | 255 |
1b6c33a1f9af12c22cdd4db23f5a85c536b0dbe9 | Dan Gohman | 2023-03-20T21:03:38 | Initial TCP socket host implementation. (#113)
* Initial TCP socket host implementation.
Initial TCP socket host implementation. This is not yet usable, as it
doesn't yet populate the network resource with any networks, but it's
a start with the major TCP socket functions implemented.
* Update dependencies.
... | diff --git a/host/Cargo.toml b/host/Cargo.toml
index 382397521..e7bcd4a6f 100644
--- a/host/Cargo.toml
+++ b/host/Cargo.toml
@@ -11,7 +11,7 @@ cap-std = { workspace = true }
cap-rand = { workspace = true }
tokio = { version = "1.22.0", features = [ "rt", "macros" ] }
tracing = { workspace = true }
-wasmtime = { git ... | 19 | 557 | 121 |
49bab6db7f7d32456e79c8b865bccf6481bf9e57 | bjorn3 | 2023-03-20T19:20:00 | Ensure the sequence number doesn't leak out of Layout (#6061)
Previously it could affect the PartialEq and Hash impls. Ignoring the
sequence number in PartialEq and Hash allows us to not renumber all
blocks in the incremental cache. | diff --git a/cranelift/codegen/src/incremental_cache.rs b/cranelift/codegen/src/incremental_cache.rs
index 8e72d5e76..fdd7ca161 100644
--- a/cranelift/codegen/src/incremental_cache.rs
+++ b/cranelift/codegen/src/incremental_cache.rs
@@ -44,7 +44,7 @@ impl Context {
let cache_key_hash = {
let _tt =... | 3 | 25 | 19 |
fc3c5d241499e1281e8c3693dcbad0589816a42b | bjorn3 | 2023-03-20T19:18:51 | Properly use the VersionMarker in CachedFunc (#6062) | diff --git a/cranelift/codegen/src/incremental_cache.rs b/cranelift/codegen/src/incremental_cache.rs
index fe41eb57d..8e72d5e76 100644
--- a/cranelift/codegen/src/incremental_cache.rs
+++ b/cranelift/codegen/src/incremental_cache.rs
@@ -116,8 +116,10 @@ impl std::fmt::Display for CacheKeyHash {
#[derive(serde::Seria... | 1 | 4 | 2 |
d72010b749f296bb3bd4e707cd3027c3b156417a | Trevor Elliott | 2023-03-18T18:27:35 | Validate the OPCODE_SIGNATURES table (#6047)
* Add a program for checking the function_generator opcode signatures
* Rework as a test in function_generator instead
* Fix some invalid opcode signatures in the function generator
* Fix bnot exclusions | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index d51f008f9..eb0425688 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -430,11 +430,11 @@ fn valid_for_target(triple: &Triple, op: Opcode, args: &[Type... | 1 | 207 | 26 |
02089b9b3cd9f392716b5e699f2d0bf09cfe9046 | yuyang | 2023-03-17T22:23:01 | fix `ISLE`,`Pos`'`col`, looks like a bug to me. (#6041)
* fix col
* fix test failure | diff --git a/cranelift/isle/isle/src/lexer.rs b/cranelift/isle/isle/src/lexer.rs
index a69894449..f59d9b9d3 100644
--- a/cranelift/isle/isle/src/lexer.rs
+++ b/cranelift/isle/isle/src/lexer.rs
@@ -137,7 +137,7 @@ impl<'a> Lexer<'a> {
file: self.pos.file,
offset: self.pos.offset - self.file_sta... | 2 | 3 | 3 |
78dbe93f2193911ca3664f8c893c920a94714060 | Trevor Elliott | 2023-03-17T21:11:24 | Rename `as_bool` to `as_truthy`, and fix TypeSet::as_bool (#6027) | diff --git a/cranelift/codegen/meta/src/cdsl/typevar.rs b/cranelift/codegen/meta/src/cdsl/typevar.rs
index 7b1381f17..1d02d8bf7 100644
--- a/cranelift/codegen/meta/src/cdsl/typevar.rs
+++ b/cranelift/codegen/meta/src/cdsl/typevar.rs
@@ -228,7 +228,7 @@ impl TypeVar {
"The `wider` constraint only ap... | 6 | 49 | 33 |
2c40c267d49cb421573e93edb71f79523fe68bb8 | bjorn3 | 2023-03-17T20:53:21 | Make sequence numbers local to instructions (#6043)
* Only allow pp_cmp within a single block
Block order shouldn't matter for codegen and restricting pp_cmp to a
single block will allow making instruction sequence numbers local to a
block.
* Make sequence numbers local to instructions
This allows renumbering to be... | diff --git a/cranelift/codegen/src/dominator_tree.rs b/cranelift/codegen/src/dominator_tree.rs
index 135697497..c549e6ab0 100644
--- a/cranelift/codegen/src/dominator_tree.rs
+++ b/cranelift/codegen/src/dominator_tree.rs
@@ -106,7 +106,7 @@ impl DominatorTree {
let a = a.into();
let b = b.into();
... | 3 | 48 | 154 |
cd1b19a289f066c7fc63c5a58fc6f08407688e67 | Lann | 2023-03-17T20:27:04 | Remove reference to `store` in `Linker::instantiate_pre` (#6057)
The `store` param was removed in #5683 | diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs
index 70cc04a39..6280e9c58 100644
--- a/crates/wasmtime/src/linker.rs
+++ b/crates/wasmtime/src/linker.rs
@@ -1125,13 +1125,6 @@ impl<T> Linker<T> {
/// Returns an error which may be downcast to an [`UnknownImportError`] if
/// the mod... | 1 | 0 | 7 |
04372df1136bfa3d053e4f31a82315053e8db006 | Dan Gohman | 2023-03-17T18:54:16 | Add the proxy world, and remove HTTP from command. (#116)
* Add the proxy world, and remove HTTP from command.
Add the proxy world, from the wasi-http repository, and add a
`--world` flag to the `host` command for selecting which world to run
them in. Current options are `command` and `proxy`.
Also, remove HTT... | diff --git a/host/Cargo.toml b/host/Cargo.toml
index baa4043f3..382397521 100644
--- a/host/Cargo.toml
+++ b/host/Cargo.toml
@@ -14,6 +14,7 @@ tracing = { workspace = true }
wasmtime = { git = "https://github.com/bytecodealliance/wasmtime", rev = "8d3a881b524d56498dfc71b65818b2abbeb1da44", features = ["component-model... | 23 | 642 | 257 |
a81c2068705fb565cdb469296f8201ce47dddd42 | bjorn3 | 2023-03-17T18:46:34 | Various cleanups to Layout (#6042)
* Use inst_block instead of pp_block where possible
* Remove unused is_block_gap method
* Remove ProgramOrder trait
It only has a single implementation
* Rename Layout::cmp to pp_cmp to distinguish it from Ord::cmp
* Make pp_block non-generic
* Use rpo_cmp_block instead of rpo_... | diff --git a/cranelift/codegen/src/dominator_tree.rs b/cranelift/codegen/src/dominator_tree.rs
index a4985261a..135697497 100644
--- a/cranelift/codegen/src/dominator_tree.rs
+++ b/cranelift/codegen/src/dominator_tree.rs
@@ -2,7 +2,7 @@
use crate::entity::SecondaryMap;
use crate::flowgraph::{BlockPredecessor, Contr... | 7 | 65 | 176 |
70bf465a881ac5df69a3a69148dfa5a34eb1f605 | Pat Hickey | 2023-03-17T18:38:36 | NFC: switch to flags .contains as a method (#115)
rather than the freestanding function which existed before we added that
to the code generator in wasmtime#5589 | diff --git a/host/src/filesystem.rs b/host/src/filesystem.rs
index 399315d70..f040d8e37 100644
--- a/host/src/filesystem.rs
+++ b/host/src/filesystem.rs
@@ -5,7 +5,7 @@ use crate::wasi::streams::{InputStream, OutputStream};
use crate::{HostResult, WasiCtx};
use std::{
io::{IoSlice, IoSliceMut},
- ops::{BitAnd... | 1 | 23 | 37 |
411a3eff3ef2b55247a5b562a3c7815679f907fe | Trevor Elliott | 2023-03-17T17:38:28 | cranelift: Emit a table of opcodes in gen_inst (#6046)
* Emit a table of opcodes in gen_inst
* Remove accidental export of OPCODE_SIGNATURES
* Generate `Opcode::all` instead of a table | diff --git a/cranelift/codegen/meta/src/gen_inst.rs b/cranelift/codegen/meta/src/gen_inst.rs
index 488296999..f3de73b57 100644
--- a/cranelift/codegen/meta/src/gen_inst.rs
+++ b/cranelift/codegen/meta/src/gen_inst.rs
@@ -602,7 +602,22 @@ fn gen_opcodes(all_inst: &AllInstructions, fmt: &mut Formatter) {
"si... | 1 | 16 | 1 |
88e5b94f780222c1ef56bf705b501da7da338556 | Dan Gohman | 2023-03-17T16:52:37 | Use the pinned nightly in test-programs/macros/build.rs too. | diff --git a/test-programs/macros/build.rs b/test-programs/macros/build.rs
index 726d56850..201cebfb9 100644
--- a/test-programs/macros/build.rs
+++ b/test-programs/macros/build.rs
@@ -44,7 +44,7 @@ fn main() {
println!("cargo:rerun-if-changed=..");
let mut cmd = Command::new("rustup");
cmd.arg("run")
- ... | 1 | 1 | 1 |
76c6ee7363f9042a2f8ca9f9d014bdaf80499a2c | bjorn3 | 2023-03-17T16:29:39 | Remove split_blocks_created field (#6044)
This has been unused since #5731 | diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs
index a6b32f661..8c320d23a 100644
--- a/cranelift/frontend/src/frontend.rs
+++ b/cranelift/frontend/src/frontend.rs
@@ -1095,9 +1095,6 @@ impl<'a> FunctionBuilder<'a> {
}
fn handle_ssa_side_effects(&mut self, side_effects: ... | 2 | 1 | 7 |
d939bdbd071e06d34590dc1799b905c6196b0b3e | Afonso Bordado | 2023-03-17T15:24:23 | fuzzgen: Add a few SIMD arithmetic ops (#5994) | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index e48301b27..d51f008f9 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -415,6 +415,7 @@ fn valid_for_target(triple: &Triple, op: Opcode, args: &[Type],... | 1 | 90 | 7 |
a5802d237d75b7029cda38ff25d892c49681d711 | Eduardo de Moura Rodrigues | 2023-03-17T14:53:49 | feat: add basic scaffolding for wasi http (#85)
This adds a basic scaffolding for WASI HTTP proposal as defined [here](https://github.com/WebAssembly/wasi-http/tree/1185b0a0224bc3e11274ad6298fd065cae472651/wit). | diff --git a/host/src/default_outgoing_http.rs b/host/src/default_outgoing_http.rs
new file mode 100644
index 000000000..3a3d7bcb7
--- /dev/null
+++ b/host/src/default_outgoing_http.rs
@@ -0,0 +1,16 @@
+use crate::{
+ wasi,
+ wasi::types::{FutureIncomingResponse as Response, OutgoingRequest as Request, RequestOpt... | 4 | 237 | 0 |
28371bfd40d0b0166674efa9f86b1530c8ded8a7 | Alex Crichton | 2023-03-17T14:52:54 | Validate faulting addresses are valid to fault on (#6028)
* Validate faulting addresses are valid to fault on
This commit adds a defense-in-depth measure to Wasmtime which is
intended to mitigate the impact of CVEs such as GHSA-ff4p-7xrq-q5r8.
Currently Wasmtime will catch `SIGSEGV` signals for WebAssembly code so
lo... | diff --git a/crates/fuzzing/src/generators/memory.rs b/crates/fuzzing/src/generators/memory.rs
index 57ad4dd41..bdf679b58 100644
--- a/crates/fuzzing/src/generators/memory.rs
+++ b/crates/fuzzing/src/generators/memory.rs
@@ -2,6 +2,7 @@
use anyhow::Result;
use arbitrary::{Arbitrary, Unstructured};
+use std::ops::Ra... | 15 | 325 | 24 |
a66b3e1ab6460f84660f9ddac775fb2d8c0411f0 | ghostway0 | 2023-03-17T00:08:00 | cranelift: Fuzz mid-end optimizations (#5998) | diff --git a/fuzz/fuzz_targets/cranelift-fuzzgen.rs b/fuzz/fuzz_targets/cranelift-fuzzgen.rs
index c6a008bd7..b20755509 100644
--- a/fuzz/fuzz_targets/cranelift-fuzzgen.rs
+++ b/fuzz/fuzz_targets/cranelift-fuzzgen.rs
@@ -4,6 +4,7 @@ use cranelift_codegen::ir::Function;
use cranelift_codegen::ir::Signature;
use cranel... | 1 | 61 | 21 |
2e6c7bf994b4b33d916f83d3ac6256dcb6603737 | Benjamin Bouvier | 2023-03-15T14:04:15 | perf: Create a per-process JIT dump file (#6024) | diff --git a/crates/jit/src/profiling/jitdump_linux.rs b/crates/jit/src/profiling/jitdump_linux.rs
index 1336bf215..4dcab8bc6 100644
--- a/crates/jit/src/profiling/jitdump_linux.rs
+++ b/crates/jit/src/profiling/jitdump_linux.rs
@@ -24,61 +24,43 @@ use object::elf;
/// Interface for driving the creation of jitdump f... | 1 | 56 | 77 |
48ecb6f119d4acc6f380e1bad22625aa55ca02df | Trevor Elliott | 2023-03-14T20:45:36 | Compact `valid_for_target` using or patterns (#6019) | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index ff7ae0b88..e48301b27 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -414,70 +414,36 @@ fn valid_for_target(triple: &Triple, op: Opcode, args: &[Type... | 1 | 158 | 314 |
80bfb350725560400379c8144eaccc31aa981aba | Saúl Cabrera | 2023-03-14T19:59:15 | winch: Introduce `winch-environ` (#6017)
This commit introduces the `winch-environ` crate. This crate's responsibility is
to provide a shared implementatation of the `winch_codegen::FuncEnv` trait,
which is Winch's function compilation environment, used to resolve module and
runtime specific information needed by the ... | diff --git a/Cargo.lock b/Cargo.lock
index f61028eb3..015c7f822 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4031,6 +4031,15 @@ dependencies = [
"wasmparser",
]
+[[package]]
+name = "winch-environ"
+version = "0.6.0"
+dependencies = [
+ "wasmparser",
+ "wasmtime-environ",
+ "winch-codegen",
+]
+
[[package]]
name... | 12 | 119 | 29 |
188f7120254f6a09a549a83a094e610c490a7354 | Trevor Elliott | 2023-03-14T00:47:40 | Mark fpromote and fdemote as operating on float scalars (#6014) | diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs
index 3ab1e0b1a..4c7dbe5c7 100755
--- a/cranelift/codegen/meta/src/shared/instructions.rs
+++ b/cranelift/codegen/meta/src/shared/instructions.rs
@@ -3320,13 +3320,16 @@ pub(crate) fn define(
);
... | 1 | 23 | 16 |
873d3b50a09849ca6a5d90852b7e4fd5b79be8a1 | Ingvar Stepanyan | 2023-03-13T23:47:04 | Allow to disable clocks in WasiCtx (#6007)
Takes the approach described in #6004, but also creates a wrapper for the monotonic time that encapsulates the `creation_time` field as well, since they logically belong and are always used together.
This makes it easier to configure `WasiCtx` with custom clocks as well as d... | diff --git a/crates/wasi-common/cap-std-sync/src/clocks.rs b/crates/wasi-common/cap-std-sync/src/clocks.rs
index 19e357435..71eb34252 100644
--- a/crates/wasi-common/cap-std-sync/src/clocks.rs
+++ b/crates/wasi-common/cap-std-sync/src/clocks.rs
@@ -35,13 +35,7 @@ impl WasiMonotonicClock for MonotonicClock {
}
pub f... | 5 | 92 | 56 |
90c9bec225d3d8feaf406e404069ebaa13175ef3 | Nick Fitzgerald | 2023-03-13T21:39:30 | wasmtime: Option to return default values for unknown imports (#6010)
Similar to the `--trap-unknown-imports` option, which defines unknown function
imports with functions that trap when called, this new
`--default-values-unknown-imports` option defines unknown function imports with
a function that returns the default... | diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs
index 0cda89000..70cc04a39 100644
--- a/crates/wasmtime/src/linker.rs
+++ b/crates/wasmtime/src/linker.rs
@@ -3,7 +3,7 @@ use crate::instance::InstancePre;
use crate::store::StoreOpaque;
use crate::{
AsContext, AsContextMut, Caller, Engin... | 3 | 102 | 1 |
fd832c424f1f56cfa20746cbce286715bac8813f | Eduardo Rodrigues | 2023-03-13T20:22:53 | chore: set default features to false | diff --git a/test-programs/Cargo.toml b/test-programs/Cargo.toml
index 0516c8f0c..d084cc642 100644
--- a/test-programs/Cargo.toml
+++ b/test-programs/Cargo.toml
@@ -8,4 +8,4 @@ publish = false
getrandom = "0.2.8"
rustix = "0.36.6"
cap-std = "1.0.3"
-wit-bindgen = { workspace = true }
+wit-bindgen = { workspace = tru... | 1 | 1 | 1 |
b227ee1779aa5aca88680aa8da21a2e0a45630de | Eduardo Rodrigues | 2023-03-13T19:44:30 | chore: use wit-bindgen from workspace | diff --git a/test-programs/Cargo.toml b/test-programs/Cargo.toml
index 583c096bf..0516c8f0c 100644
--- a/test-programs/Cargo.toml
+++ b/test-programs/Cargo.toml
@@ -8,4 +8,4 @@ publish = false
getrandom = "0.2.8"
rustix = "0.36.6"
cap-std = "1.0.3"
-wit-bindgen = "0.4.0"
+wit-bindgen = { workspace = true } | 1 | 1 | 1 |
bba49646c3bf2eff168cb54607302dbf9a448177 | Alex Crichton | 2023-03-13T19:56:47 | Reduce VM overhead of pooling spec tests (#6006)
This commit forces bounds checks to be used when pooling and running the
spec tests to ensure that they can be run at a reasonable degree of
parallelism. Otherwise currently the VM reservation required for the
multi-memory tests is so large that it fails to get reserved... | diff --git a/tests/all/wast.rs b/tests/all/wast.rs
index 260e3bc00..994d27269 100644
--- a/tests/all/wast.rs
+++ b/tests/all/wast.rs
@@ -97,6 +97,23 @@ fn run_wast(wast: &str, strategy: Strategy, pooling: bool) -> anyhow::Result<()>
return Ok(());
}
+ // Reduce the virtual memory required... | 1 | 17 | 0 |
b50cf9bb57dc6824bd5c911cd25de3db41884f8f | uint256_t | 2023-03-13T18:43:34 | cranelift-entity: more efficient `EntitySet` implementation (#5978)
* Use usize intead of u8
* Rename 'byte's to appropriate words | diff --git a/cranelift/entity/src/set.rs b/cranelift/entity/src/set.rs
index 4b64d79f4..a5c8b7b29 100644
--- a/cranelift/entity/src/set.rs
+++ b/cranelift/entity/src/set.rs
@@ -5,6 +5,9 @@ use crate::EntityRef;
use alloc::vec::Vec;
use core::marker::PhantomData;
+// How many bits are used to represent a single elem... | 1 | 20 | 15 |
d03612c2d992a1551bdf6df4aa7f7b09ada5da05 | Saúl Cabrera | 2023-03-13T17:50:53 | cranelift-codegen(x64): Expose `CallInfo` (#6005)
This commit exposes the `CallInfo` struct, needed by Winch to emit function
calls. | diff --git a/cranelift/codegen/src/isa/x64/inst/mod.rs b/cranelift/codegen/src/isa/x64/inst/mod.rs
index 396f9fd4a..c1c71690d 100644
--- a/cranelift/codegen/src/isa/x64/inst/mod.rs
+++ b/cranelift/codegen/src/isa/x64/inst/mod.rs
@@ -30,7 +30,7 @@ use args::*;
// `Inst` is defined inside ISLE as `MInst`. We publicly re... | 3 | 3 | 3 |
2386eee56b0b2d9359f5ee431dcaab5cc86d9e12 | Afonso Bordado | 2023-03-11T12:20:21 | fuzzgen: Add SIMD instructions supported by the interpreter (#5971)
* fuzzgen: Add some SIMD instructions
* fuzzgen: Remove `scalar_to_vector`
Broken in the interpreter #5911
* fuzzgen: Remove SIMD bitcasts
Broken in the interpreter #5915
* fuzzgen: Fix insert lane
* fuzzgen: Remove debug code
* fuzzgen: Remove... | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index 744b923ca..527677466 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -6,9 +6,10 @@ use cranelift::codegen::data_value::DataValue;
use cranelift::cod... | 1 | 362 | 25 |
af7ef8df9adb48204c4caedc7bd4f9ba8f3f7113 | Alex Crichton | 2023-03-11T02:31:31 | Fix some minor issues with the `explorer` command (#5988)
This commit fixes a few minor issues that Nick and I ran into walking
through some code with the `wasmtime explore` command:
* When a new function is reached the address map iterator is advanced
past the prior function to avoid accidentally attributing instr... | diff --git a/crates/explorer/src/lib.rs b/crates/explorer/src/lib.rs
index 23c8cf28c..5dab3e847 100644
--- a/crates/explorer/src/lib.rs
+++ b/crates/explorer/src/lib.rs
@@ -111,9 +111,17 @@ fn annotate_asm(
let mut address_map_iter = address_map.into_iter().peekable();
let mut current_entry = address_map_it... | 1 | 18 | 4 |
411781d2fef834ff0e1c57414c15a8bd7526e845 | Ulrich Weigand | 2023-03-10T19:41:41 | s390x: Fix mistake in available_in_isa (#5981)
The 32-bit float<->int conversion instructions are part of
the VXRS_EXT2 facility, not MIE2.
Fixes https://github.com/bytecodealliance/wasmtime/issues/5979. | diff --git a/cranelift/codegen/src/isa/s390x/inst/mod.rs b/cranelift/codegen/src/isa/s390x/inst/mod.rs
index d68e3317c..7305b98fb 100644
--- a/cranelift/codegen/src/isa/s390x/inst/mod.rs
+++ b/cranelift/codegen/src/isa/s390x/inst/mod.rs
@@ -261,10 +261,10 @@ impl Inst {
_ => InstructionSet::Base,
... | 1 | 4 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.