|
|
|
# This file is automatically @generated by Cargo.
|
|
|
|
# It is not intended for manual editing.
|
|
|
|
version = 3
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "addr2line"
|
|
|
|
version = "0.17.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
|
|
|
|
dependencies = [
|
|
|
|
"gimli",
|
externref: implement stack map-based garbage collection
For host VM code, we use plain reference counting, where cloning increments
the reference count, and dropping decrements it. We can avoid many of the
on-stack increment/decrement operations that typically plague the
performance of reference counting via Rust's ownership and borrowing system.
Moving a `VMExternRef` avoids mutating its reference count, and borrowing it
either avoids the reference count increment or delays it until if/when the
`VMExternRef` is cloned.
When passing a `VMExternRef` into compiled Wasm code, we don't want to do
reference count mutations for every compiled `local.{get,set}`, nor for
every function call. Therefore, we use a variation of **deferred reference
counting**, where we only mutate reference counts when storing
`VMExternRef`s somewhere that outlives the activation: into a global or
table. Simultaneously, we over-approximate the set of `VMExternRef`s that
are inside Wasm function activations. Periodically, we walk the stack at GC
safe points, and use stack map information to precisely identify the set of
`VMExternRef`s inside Wasm activations. Then we take the difference between
this precise set and our over-approximation, and decrement the reference
count for each of the `VMExternRef`s that are in our over-approximation but
not in the precise set. Finally, the over-approximation is replaced with the
precise set.
The `VMExternRefActivationsTable` implements the over-approximized set of
`VMExternRef`s referenced by Wasm activations. Calling a Wasm function and
passing it a `VMExternRef` moves the `VMExternRef` into the table, and the
compiled Wasm function logically "borrows" the `VMExternRef` from the
table. Similarly, `global.get` and `table.get` operations clone the gotten
`VMExternRef` into the `VMExternRefActivationsTable` and then "borrow" the
reference out of the table.
When a `VMExternRef` is returned to host code from a Wasm function, the host
increments the reference count (because the reference is logically
"borrowed" from the `VMExternRefActivationsTable` and the reference count
from the table will be dropped at the next GC).
For more general information on deferred reference counting, see *An
Examination of Deferred Reference Counting and Cycle Detection* by Quinane:
https://openresearch-repository.anu.edu.au/bitstream/1885/42030/2/hon-thesis.pdf
cc #929
Fixes #1804
4 years ago
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "adler"
|
|
|
|
version = "1.0.2"
|
externref: implement stack map-based garbage collection
For host VM code, we use plain reference counting, where cloning increments
the reference count, and dropping decrements it. We can avoid many of the
on-stack increment/decrement operations that typically plague the
performance of reference counting via Rust's ownership and borrowing system.
Moving a `VMExternRef` avoids mutating its reference count, and borrowing it
either avoids the reference count increment or delays it until if/when the
`VMExternRef` is cloned.
When passing a `VMExternRef` into compiled Wasm code, we don't want to do
reference count mutations for every compiled `local.{get,set}`, nor for
every function call. Therefore, we use a variation of **deferred reference
counting**, where we only mutate reference counts when storing
`VMExternRef`s somewhere that outlives the activation: into a global or
table. Simultaneously, we over-approximate the set of `VMExternRef`s that
are inside Wasm function activations. Periodically, we walk the stack at GC
safe points, and use stack map information to precisely identify the set of
`VMExternRef`s inside Wasm activations. Then we take the difference between
this precise set and our over-approximation, and decrement the reference
count for each of the `VMExternRef`s that are in our over-approximation but
not in the precise set. Finally, the over-approximation is replaced with the
precise set.
The `VMExternRefActivationsTable` implements the over-approximized set of
`VMExternRef`s referenced by Wasm activations. Calling a Wasm function and
passing it a `VMExternRef` moves the `VMExternRef` into the table, and the
compiled Wasm function logically "borrows" the `VMExternRef` from the
table. Similarly, `global.get` and `table.get` operations clone the gotten
`VMExternRef` into the `VMExternRefActivationsTable` and then "borrow" the
reference out of the table.
When a `VMExternRef` is returned to host code from a Wasm function, the host
increments the reference count (because the reference is logically
"borrowed" from the `VMExternRefActivationsTable` and the reference count
from the table will be dropped at the next GC).
For more general information on deferred reference counting, see *An
Examination of Deferred Reference Counting and Cycle Detection* by Quinane:
https://openresearch-repository.anu.edu.au/bitstream/1885/42030/2/hon-thesis.pdf
cc #929
Fixes #1804
4 years ago
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
externref: implement stack map-based garbage collection
For host VM code, we use plain reference counting, where cloning increments
the reference count, and dropping decrements it. We can avoid many of the
on-stack increment/decrement operations that typically plague the
performance of reference counting via Rust's ownership and borrowing system.
Moving a `VMExternRef` avoids mutating its reference count, and borrowing it
either avoids the reference count increment or delays it until if/when the
`VMExternRef` is cloned.
When passing a `VMExternRef` into compiled Wasm code, we don't want to do
reference count mutations for every compiled `local.{get,set}`, nor for
every function call. Therefore, we use a variation of **deferred reference
counting**, where we only mutate reference counts when storing
`VMExternRef`s somewhere that outlives the activation: into a global or
table. Simultaneously, we over-approximate the set of `VMExternRef`s that
are inside Wasm function activations. Periodically, we walk the stack at GC
safe points, and use stack map information to precisely identify the set of
`VMExternRef`s inside Wasm activations. Then we take the difference between
this precise set and our over-approximation, and decrement the reference
count for each of the `VMExternRef`s that are in our over-approximation but
not in the precise set. Finally, the over-approximation is replaced with the
precise set.
The `VMExternRefActivationsTable` implements the over-approximized set of
`VMExternRef`s referenced by Wasm activations. Calling a Wasm function and
passing it a `VMExternRef` moves the `VMExternRef` into the table, and the
compiled Wasm function logically "borrows" the `VMExternRef` from the
table. Similarly, `global.get` and `table.get` operations clone the gotten
`VMExternRef` into the `VMExternRefActivationsTable` and then "borrow" the
reference out of the table.
When a `VMExternRef` is returned to host code from a Wasm function, the host
increments the reference count (because the reference is logically
"borrowed" from the `VMExternRefActivationsTable` and the reference count
from the table will be dropped at the next GC).
For more general information on deferred reference counting, see *An
Examination of Deferred Reference Counting and Cycle Detection* by Quinane:
https://openresearch-repository.anu.edu.au/bitstream/1885/42030/2/hon-thesis.pdf
cc #929
Fixes #1804
4 years ago
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "aead"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
|
|
|
|
dependencies = [
|
|
|
|
"generic-array",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "aes"
|
|
|
|
version = "0.7.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"cipher",
|
ISLE: guard against stale generated source in default build config.
Currently, the `build.rs` script that generates Rust source from the
ISLE DSL will only do this generation if the `rebuild-isle` Cargo
feature is specified. By default, it is not. This is based on the
principle that we (the build script) do not modify the source tree as
managed by git; git-managed files are strictly a human-managed and
human-edited resource. By adding the opt-in Cargo feature, a developer
is requesting the build script to perform an explicit action. (In my
understanding at least, this principle comes from the general philosophy
of hermetic builds: the output should be a pure function of the input,
and part of this is that the input is read-only. If we modify the source
tree, then all bets are off.)
Unfortunately, requiring the opt-in feature also creates a footgun that
is easy to hit: if a developer modifies the ISLE DSL source, but forgets
to specify the Cargo feature, then the compiler will silently be built
successfully with stale source, and will silently exclude any changes
that were made.
The generated source is checked into git for a good reason: we want DSL
compiler to not affect build times for the overwhelmingly common case
that Cranelift is used as a dependency but the backends are not being
actively developed. (This overhead comes mainly from building `islec`
itself.)
So, what to do? This PR implements a middle ground first described in
[this conversation](https://github.com/bytecodealliance/wasmtime/pull/3506#discussion_r743113351), in which we:
- Generate a hash (SHA-512) of the ISLE DSL source and produce a
"manifest" of ISLE inputs alongside the generated source; and
- Always read the ISLE DSL source, and see if the manifest is still
valid, on builds that do not have the opt-in "rebuild" feature.
This allows us to know whether the ISLE compiler output would have been
the same (modulo changes to the DSL compiler itself, which are
out-of-scope here), without actually building the ISLE compiler and
running it.
If the compiler-backend developer modifies an ISLE source file and then
tries to build `cranelift-codegen` without adding the `rebuild-isle`
Cargo feature, they get the following output:
```text
Error: the ISLE source files that resulted in the generated Rust source
* src/isa/x64/lower/isle/generated_code.rs
have changed but the generated source was not rebuilt! These ISLE source
files are:
* src/clif.isle
* src/prelude.isle
* src/isa/x64/inst.isle
* src/isa/x64/lower.isle
Please add `--features rebuild-isle` to your `cargo build` command
if you wish to rebuild the generated source, then include these changes
in any git commits you make that include the changes to the ISLE.
For example:
$ cargo build -p cranelift-codegen --features rebuild-isle
(This build script cannot do this for you by default because we cannot
modify checked-into-git source without your explicit opt-in.)
```
which will tell them exactly what they need to do to fix the problem!
Note that I am leaving the "Rebuild ISLE" CI job alone for now, because
otherwise, we are trusting whomever submits a PR to generate the correct
generated source. In other words, the manifest is a communication from
the checked-in tree to the developer, but we still need to verify that
the checked-in generated Rust source and the manifest are correct with
respect to the checked-in ISLE source.
3 years ago
|
|
|
"cpufeatures",
|
|
|
|
"opaque-debug",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "aes-gcm"
|
|
|
|
version = "0.9.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6"
|
|
|
|
dependencies = [
|
|
|
|
"aead",
|
|
|
|
"aes",
|
|
|
|
"cipher",
|
|
|
|
"ctr",
|
|
|
|
"ghash",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ahash"
|
|
|
|
version = "0.7.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
|
|
|
|
dependencies = [
|
|
|
|
"getrandom 0.2.6",
|
|
|
|
"once_cell",
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "aho-corasick"
|
|
|
|
version = "0.7.18"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
|
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ambient-authority"
|
|
|
|
version = "0.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ec8ad6edb4840b78c5c3d88de606b22252d552b55f3a4699fbb10fc070ec3049"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ansi_term"
|
|
|
|
version = "0.12.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "anyhow"
|
|
|
|
version = "1.0.57"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "arbitrary"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c38b6b6b79f671c25e1a3e785b7b82d7562ffc9cd3efdc98627e5668a2472490"
|
|
|
|
dependencies = [
|
|
|
|
"derive_arbitrary",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "async-trait"
|
|
|
|
version = "0.1.53"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "atty"
|
|
|
|
version = "0.2.14"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
|
|
|
dependencies = [
|
|
|
|
"hermit-abi 0.1.19",
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "autocfg"
|
|
|
|
version = "0.1.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "autocfg"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "backtrace"
|
|
|
|
version = "0.3.66"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7"
|
|
|
|
dependencies = [
|
|
|
|
"addr2line",
|
|
|
|
"cc",
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
externref: implement stack map-based garbage collection
For host VM code, we use plain reference counting, where cloning increments
the reference count, and dropping decrements it. We can avoid many of the
on-stack increment/decrement operations that typically plague the
performance of reference counting via Rust's ownership and borrowing system.
Moving a `VMExternRef` avoids mutating its reference count, and borrowing it
either avoids the reference count increment or delays it until if/when the
`VMExternRef` is cloned.
When passing a `VMExternRef` into compiled Wasm code, we don't want to do
reference count mutations for every compiled `local.{get,set}`, nor for
every function call. Therefore, we use a variation of **deferred reference
counting**, where we only mutate reference counts when storing
`VMExternRef`s somewhere that outlives the activation: into a global or
table. Simultaneously, we over-approximate the set of `VMExternRef`s that
are inside Wasm function activations. Periodically, we walk the stack at GC
safe points, and use stack map information to precisely identify the set of
`VMExternRef`s inside Wasm activations. Then we take the difference between
this precise set and our over-approximation, and decrement the reference
count for each of the `VMExternRef`s that are in our over-approximation but
not in the precise set. Finally, the over-approximation is replaced with the
precise set.
The `VMExternRefActivationsTable` implements the over-approximized set of
`VMExternRef`s referenced by Wasm activations. Calling a Wasm function and
passing it a `VMExternRef` moves the `VMExternRef` into the table, and the
compiled Wasm function logically "borrows" the `VMExternRef` from the
table. Similarly, `global.get` and `table.get` operations clone the gotten
`VMExternRef` into the `VMExternRefActivationsTable` and then "borrow" the
reference out of the table.
When a `VMExternRef` is returned to host code from a Wasm function, the host
increments the reference count (because the reference is logically
"borrowed" from the `VMExternRefActivationsTable` and the reference count
from the table will be dropped at the next GC).
For more general information on deferred reference counting, see *An
Examination of Deferred Reference Counting and Cycle Detection* by Quinane:
https://openresearch-repository.anu.edu.au/bitstream/1885/42030/2/hon-thesis.pdf
cc #929
Fixes #1804
4 years ago
|
|
|
"miniz_oxide",
|
|
|
|
"object",
|
|
|
|
"rustc-demangle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "base64"
|
|
|
|
version = "0.13.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "base64ct"
|
|
|
|
version = "1.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e6b4d9b1225d28d360ec6a231d65af1fd99a2a095154c8040689617290569c5c"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bincode"
|
|
|
|
version = "1.3.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bit-set"
|
|
|
|
version = "0.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de"
|
|
|
|
dependencies = [
|
|
|
|
"bit-vec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bit-vec"
|
|
|
|
version = "0.6.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bitflags"
|
|
|
|
version = "1.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "block-buffer"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
|
|
|
|
dependencies = [
|
|
|
|
"generic-array",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bstr"
|
|
|
|
version = "0.2.17"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
|
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
"memchr",
|
|
|
|
"regex-automata",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bumpalo"
|
|
|
|
version = "3.9.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "byteorder"
|
|
|
|
version = "1.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bytes"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cap-fs-ext"
|
|
|
|
version = "0.25.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "337ddae0c23990d98099a34db274fda588a3ddf89e1961aa2d3ae08d4572b746"
|
|
|
|
dependencies = [
|
|
|
|
"cap-primitives",
|
|
|
|
"cap-std",
|
|
|
|
"io-lifetimes",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cap-primitives"
|
|
|
|
version = "0.25.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5c13977868250c3102a1737c766c0fe0abea4c9d64b60566b55e3df084a46eb6"
|
|
|
|
dependencies = [
|
|
|
|
"ambient-authority",
|
|
|
|
"errno",
|
|
|
|
"fs-set-times",
|
|
|
|
"io-extras",
|
|
|
|
"io-lifetimes",
|
|
|
|
"ipnet",
|
|
|
|
"maybe-owned",
|
|
|
|
"rustix",
|
|
|
|
"winapi-util",
|
|
|
|
"windows-sys",
|
|
|
|
"winx",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cap-rand"
|
|
|
|
version = "0.25.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ff1aa052bd5af24e9d1ad26db37c4bed43e45494366a03321f05beeafaf99bdb"
|
|
|
|
dependencies = [
|
|
|
|
"ambient-authority",
|
|
|
|
"rand 0.8.5",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cap-std"
|
|
|
|
version = "0.25.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9dc3bec032b93533630adb5cd0e05f4eac5475bf3e9edafc562ccbc44fd5db06"
|
|
|
|
dependencies = [
|
|
|
|
"cap-primitives",
|
|
|
|
"io-extras",
|
|
|
|
"io-lifetimes",
|
|
|
|
"ipnet",
|
|
|
|
"rustix",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cap-tempfile"
|
|
|
|
version = "0.25.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4e19d4852b4185065d0744d225fb961a79165f5a6dedfee9175457fbfd1a9bbb"
|
|
|
|
dependencies = [
|
|
|
|
"cap-std",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rustix",
|
|
|
|
"uuid",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cap-time-ext"
|
|
|
|
version = "0.25.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0486425152c6e3e45528baa8edff1c37e82056cb2105a82836989679b6509326"
|
|
|
|
dependencies = [
|
|
|
|
"cap-primitives",
|
|
|
|
"once_cell",
|
|
|
|
"rustix",
|
|
|
|
"winx",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "capstone"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "178b3c80b4ce3939792d1dd6600575e012da806a10e81abe812dc29cbfe629ec"
|
|
|
|
dependencies = [
|
|
|
|
"capstone-sys",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "capstone-sys"
|
|
|
|
version = "0.13.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cf2f3d97b88fa4a9a6464c7c08b8c4588aaea8c18d0651eca11f2ca15f50f1f6"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cast"
|
|
|
|
version = "0.2.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a"
|
|
|
|
dependencies = [
|
|
|
|
"rustc_version",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cc"
|
|
|
|
version = "1.0.73"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
|
|
|
|
dependencies = [
|
|
|
|
"jobserver",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cfg-if"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "chacha20"
|
|
|
|
version = "0.8.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "01b72a433d0cf2aef113ba70f62634c56fddb0f244e6377185c56a7cadbd8f91"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"cipher",
|
ISLE: guard against stale generated source in default build config.
Currently, the `build.rs` script that generates Rust source from the
ISLE DSL will only do this generation if the `rebuild-isle` Cargo
feature is specified. By default, it is not. This is based on the
principle that we (the build script) do not modify the source tree as
managed by git; git-managed files are strictly a human-managed and
human-edited resource. By adding the opt-in Cargo feature, a developer
is requesting the build script to perform an explicit action. (In my
understanding at least, this principle comes from the general philosophy
of hermetic builds: the output should be a pure function of the input,
and part of this is that the input is read-only. If we modify the source
tree, then all bets are off.)
Unfortunately, requiring the opt-in feature also creates a footgun that
is easy to hit: if a developer modifies the ISLE DSL source, but forgets
to specify the Cargo feature, then the compiler will silently be built
successfully with stale source, and will silently exclude any changes
that were made.
The generated source is checked into git for a good reason: we want DSL
compiler to not affect build times for the overwhelmingly common case
that Cranelift is used as a dependency but the backends are not being
actively developed. (This overhead comes mainly from building `islec`
itself.)
So, what to do? This PR implements a middle ground first described in
[this conversation](https://github.com/bytecodealliance/wasmtime/pull/3506#discussion_r743113351), in which we:
- Generate a hash (SHA-512) of the ISLE DSL source and produce a
"manifest" of ISLE inputs alongside the generated source; and
- Always read the ISLE DSL source, and see if the manifest is still
valid, on builds that do not have the opt-in "rebuild" feature.
This allows us to know whether the ISLE compiler output would have been
the same (modulo changes to the DSL compiler itself, which are
out-of-scope here), without actually building the ISLE compiler and
running it.
If the compiler-backend developer modifies an ISLE source file and then
tries to build `cranelift-codegen` without adding the `rebuild-isle`
Cargo feature, they get the following output:
```text
Error: the ISLE source files that resulted in the generated Rust source
* src/isa/x64/lower/isle/generated_code.rs
have changed but the generated source was not rebuilt! These ISLE source
files are:
* src/clif.isle
* src/prelude.isle
* src/isa/x64/inst.isle
* src/isa/x64/lower.isle
Please add `--features rebuild-isle` to your `cargo build` command
if you wish to rebuild the generated source, then include these changes
in any git commits you make that include the changes to the ISLE.
For example:
$ cargo build -p cranelift-codegen --features rebuild-isle
(This build script cannot do this for you by default because we cannot
modify checked-into-git source without your explicit opt-in.)
```
which will tell them exactly what they need to do to fix the problem!
Note that I am leaving the "Rebuild ISLE" CI job alone for now, because
otherwise, we are trusting whomever submits a PR to generate the correct
generated source. In other words, the manifest is a communication from
the checked-in tree to the developer, but we still need to verify that
the checked-in generated Rust source and the manifest are correct with
respect to the checked-in ISLE source.
3 years ago
|
|
|
"cpufeatures",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "chacha20poly1305"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3b84ed6d1d5f7aa9bdde921a5090e0ca4d934d250ea3b402a5fab3a994e28a2a"
|
|
|
|
dependencies = [
|
|
|
|
"aead",
|
|
|
|
"chacha20",
|
|
|
|
"cipher",
|
|
|
|
"poly1305",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cipher"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
|
|
|
|
dependencies = [
|
|
|
|
"generic-array",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "clap"
|
|
|
|
version = "2.34.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags",
|
|
|
|
"textwrap 0.11.0",
|
|
|
|
"unicode-width",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "clap"
|
|
|
|
version = "3.2.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "190814073e85d238f31ff738fcb0bf6910cedeb73376c87cd69291028966fd83"
|
|
|
|
dependencies = [
|
|
|
|
"atty",
|
|
|
|
"bitflags",
|
|
|
|
"clap_derive",
|
|
|
|
"clap_lex",
|
|
|
|
"indexmap",
|
|
|
|
"once_cell",
|
|
|
|
"strsim",
|
|
|
|
"termcolor",
|
|
|
|
"textwrap 0.15.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "clap_derive"
|
|
|
|
version = "3.2.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "759bf187376e1afa7b85b959e6a664a3e7a95203415dba952ad19139e798f902"
|
|
|
|
dependencies = [
|
|
|
|
"heck",
|
|
|
|
"proc-macro-error",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "clap_lex"
|
|
|
|
version = "0.2.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
|
|
|
|
dependencies = [
|
|
|
|
"os_str_bytes",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "component-macro-test"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "console"
|
|
|
|
version = "0.15.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31"
|
|
|
|
dependencies = [
|
|
|
|
"encode_unicode",
|
|
|
|
"libc",
|
|
|
|
"once_cell",
|
|
|
|
"regex",
|
|
|
|
"terminal_size",
|
|
|
|
"unicode-width",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "const-oid"
|
|
|
|
version = "0.6.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9d6f2aa4d0537bcc1c74df8755072bd31c1ef1a3a1b85a68e8404a8c353b7b8b"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cpp_demangle"
|
|
|
|
version = "0.3.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cpufeatures"
|
|
|
|
version = "0.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-frontend",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-bforest"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-entity",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-codegen"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"bincode",
|
|
|
|
"cranelift-bforest",
|
|
|
|
"cranelift-codegen-meta",
|
|
|
|
"cranelift-codegen-shared",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-isle",
|
|
|
|
"criterion",
|
|
|
|
"gimli",
|
|
|
|
"hashbrown",
|
|
|
|
"log",
|
Initial ISLE integration with the x64 backend
On the build side, this commit introduces two things:
1. The automatic generation of various ISLE definitions for working with
CLIF. Specifically, it generates extern type definitions for clif opcodes and
the clif instruction data `enum`, as well as extractors for matching each clif
instructions. This happens inside the `cranelift-codegen-meta` crate.
2. The compilation of ISLE DSL sources to Rust code, that can be included in the
main `cranelift-codegen` compilation.
Next, this commit introduces the integration glue code required to get
ISLE-generated Rust code hooked up in clif-to-x64 lowering. When lowering a clif
instruction, we first try to use the ISLE code path. If it succeeds, then we are
done lowering this instruction. If it fails, then we proceed along the existing
hand-written code path for lowering.
Finally, this commit ports many lowering rules over from hand-written,
open-coded Rust to ISLE.
In the process of supporting ISLE, this commit also makes the x64 `Inst` capable
of expressing SSA by supporting 3-operand forms for all of the existing
instructions that only have a 2-operand form encoding:
dst = src1 op src2
Rather than only the typical x86-64 2-operand form:
dst = dst op src
This allows `MachInst` to be in SSA form, since `dst` and `src1` are
disentangled.
("3-operand" and "2-operand" are a little bit of a misnomer since not all
operations are binary operations, but we do the same thing for, e.g., unary
operations by disentangling the sole operand from the result.)
There are two motivations for this change:
1. To allow ISLE lowering code to have value-equivalence semantics. We want ISLE
lowering to translate a CLIF expression that evaluates to some value into a
`MachInst` expression that evaluates to the same value. We want both the
lowering itself and the resulting `MachInst` to be pure and referentially
transparent. This is both a nice paradigm for compiler writers that are
authoring and maintaining lowering rules and is a prerequisite to any sort of
formal verification of our lowering rules in the future.
2. Better align `MachInst` with `regalloc2`'s API, which requires that the input
be in SSA form.
3 years ago
|
|
|
"miette",
|
|
|
|
"regalloc2",
|
|
|
|
"serde",
|
|
|
|
"smallvec",
|
Harvest left-hand side superoptimization candidates.
Given a clif function, harvest all its integer subexpressions, so that they can
be fed into [Souper](https://github.com/google/souper) as candidates for
superoptimization. For some of these candidates, Souper will successfully
synthesize a right-hand side that is equivalent but has lower cost than the
left-hand side. Then, we can combine these left- and right-hand sides into a
complete optimization, and add it to our peephole passes.
To harvest the expression that produced a given value `x`, we do a post-order
traversal of the dataflow graph starting from `x`. As we do this traversal, we
maintain a map from clif values to their translated Souper values. We stop
traversing when we reach anything that can't be translated into Souper IR: a
memory load, a float-to-int conversion, a block parameter, etc. For values
produced by these instructions, we create a Souper `var`, which is an input
variable to the optimization. For instructions that have a direct mapping into
Souper IR, we get the Souper version of each of its operands and then create the
Souper version of the instruction itself. It should now be clear why we do a
post-order traversal: we need an instruction's translated operands in order to
translate the instruction itself. Once this instruction is translated, we update
the clif-to-souper map with this new translation so that any other instruction
that uses this result as an operand has access to the translated value. When the
traversal is complete we return the translation of `x` as the root of left-hand
side candidate.
4 years ago
|
|
|
"souper-ir",
|
|
|
|
"target-lexicon",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-codegen-meta"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-codegen-shared"
|
|
|
|
version = "0.87.0"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-entity"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-filetests"
|
|
|
|
version = "0.73.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-frontend",
|
|
|
|
"cranelift-interpreter",
|
|
|
|
"cranelift-native",
|
|
|
|
"cranelift-preopt",
|
|
|
|
"cranelift-reader",
|
|
|
|
"file-per-thread-logger",
|
|
|
|
"filecheck",
|
|
|
|
"gimli",
|
|
|
|
"log",
|
|
|
|
"memmap2",
|
|
|
|
"num_cpus",
|
|
|
|
"similar",
|
|
|
|
"target-lexicon",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-frontend"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"hashbrown",
|
|
|
|
"log",
|
|
|
|
"smallvec",
|
|
|
|
"target-lexicon",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-fuzzgen"
|
|
|
|
version = "0.75.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"arbitrary",
|
|
|
|
"cranelift",
|
|
|
|
"cranelift-native",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-interpreter"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-frontend",
|
|
|
|
"cranelift-reader",
|
|
|
|
"log",
|
|
|
|
"smallvec",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-isle"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"miette",
|
|
|
|
"tempfile",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-jit"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cranelift",
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-frontend",
|
|
|
|
"cranelift-module",
|
|
|
|
"cranelift-native",
|
|
|
|
"libc",
|
|
|
|
"log",
|
|
|
|
"memmap2",
|
|
|
|
"region",
|
|
|
|
"target-lexicon",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-module"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cranelift-codegen",
|
|
|
|
"hashbrown",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-native"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"libc",
|
|
|
|
"target-lexicon",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-object"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-frontend",
|
|
|
|
"cranelift-module",
|
|
|
|
"log",
|
|
|
|
"object",
|
|
|
|
"target-lexicon",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-preopt"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-reader"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"smallvec",
|
|
|
|
"target-lexicon",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-serde"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"clap 3.2.8",
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-reader",
|
|
|
|
"serde_json",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-tools"
|
|
|
|
version = "0.73.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"capstone",
|
|
|
|
"cfg-if",
|
|
|
|
"clap 3.2.8",
|
|
|
|
"cranelift",
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-filetests",
|
|
|
|
"cranelift-frontend",
|
|
|
|
"cranelift-interpreter",
|
|
|
|
"cranelift-jit",
|
|
|
|
"cranelift-module",
|
|
|
|
"cranelift-native",
|
|
|
|
"cranelift-object",
|
|
|
|
"cranelift-preopt",
|
|
|
|
"cranelift-reader",
|
|
|
|
"cranelift-wasm",
|
|
|
|
"filecheck",
|
|
|
|
"indicatif",
|
|
|
|
"log",
|
|
|
|
"pretty_env_logger",
|
Harvest left-hand side superoptimization candidates.
Given a clif function, harvest all its integer subexpressions, so that they can
be fed into [Souper](https://github.com/google/souper) as candidates for
superoptimization. For some of these candidates, Souper will successfully
synthesize a right-hand side that is equivalent but has lower cost than the
left-hand side. Then, we can combine these left- and right-hand sides into a
complete optimization, and add it to our peephole passes.
To harvest the expression that produced a given value `x`, we do a post-order
traversal of the dataflow graph starting from `x`. As we do this traversal, we
maintain a map from clif values to their translated Souper values. We stop
traversing when we reach anything that can't be translated into Souper IR: a
memory load, a float-to-int conversion, a block parameter, etc. For values
produced by these instructions, we create a Souper `var`, which is an input
variable to the optimization. For instructions that have a direct mapping into
Souper IR, we get the Souper version of each of its operands and then create the
Souper version of the instruction itself. It should now be clear why we do a
post-order traversal: we need an instruction's translated operands in order to
translate the instruction itself. Once this instruction is translated, we update
the clif-to-souper map with this new translation so that any other instruction
that uses this result as an operand has access to the translated value. When the
traversal is complete we return the translation of `x` as the root of left-hand
side candidate.
4 years ago
|
|
|
"rayon",
|
|
|
|
"target-lexicon",
|
|
|
|
"termcolor",
|
|
|
|
"thiserror",
|
|
|
|
"walkdir",
|
|
|
|
"wat",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cranelift-wasm"
|
|
|
|
version = "0.87.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-frontend",
|
|
|
|
"hashbrown",
|
|
|
|
"itertools",
|
|
|
|
"log",
|
|
|
|
"serde",
|
wasm->CLIF translation: consistently bitcast V128 values that are block formal parameters.
In the current translation of wasm (128-bit) SIMD into CLIF, we work around differences in the
type system models of wasm vs CLIF by inserting `bitcast` (a no-op cast) CLIF instructions before
more or less every use of a SIMD value. Unfortunately this was not being done consistently and
even small examples with a single if-then-else diamond that produces a SIMD value, could cause a
verification failure downstream. In this case, the jump out of the "else" block needed a
bitcast, but didn't have one.
This patch wraps creation of CLIF jumps and conditional branches up into three functions,
`canonicalise_then_jump` and `canonicalise_then_br{z,nz}`, and uses them consistently. They
first cast the relevant block formal parameters, then generate the relevant kind of branch/jump.
Hence, provided they are also used consistently in future to generate branches/jumps in this
file, we are protected against such failures.
The patch also adds a large(ish) comment at the top explaining this in more detail.
4 years ago
|
|
|
"smallvec",
|
|
|
|
"target-lexicon",
|
|
|
|
"wasmparser",
|
Remove `wasmtime-environ`'s dependency on `cranelift-codegen` (#3199)
* Move `CompiledFunction` into wasmtime-cranelift
This commit moves the `wasmtime_environ::CompiledFunction` type into the
`wasmtime-cranelift` crate. This type has lots of Cranelift-specific
pieces of compilation and doesn't need to be generated by all Wasmtime
compilers. This replaces the usage in the `Compiler` trait with a
`Box<Any>` type that each compiler can select. Each compiler must still
produce a `FunctionInfo`, however, which is shared information we'll
deserialize for each module.
The `wasmtime-debug` crate is also folded into the `wasmtime-cranelift`
crate as a result of this commit. One possibility was to move the
`CompiledFunction` commit into its own crate and have `wasmtime-debug`
depend on that, but since `wasmtime-debug` is Cranelift-specific at this
time it didn't seem like it was too too necessary to keep it separate.
If `wasmtime-debug` supports other backends in the future we can
recreate a new crate, perhaps with it refactored to not depend on
Cranelift.
* Move wasmtime_environ::reference_type
This now belongs in wasmtime-cranelift and nowhere else
* Remove `Type` reexport in wasmtime-environ
One less dependency on `cranelift-codegen`!
* Remove `types` reexport from `wasmtime-environ`
Less cranelift!
* Remove `SourceLoc` from wasmtime-environ
Change the `srcloc`, `start_srcloc`, and `end_srcloc` fields to a custom
`FilePos` type instead of `ir::SourceLoc`. These are only used in a few
places so there's not much to lose from an extra abstraction for these
leaf use cases outside of cranelift.
* Remove wasmtime-environ's dep on cranelift's `StackMap`
This commit "clones" the `StackMap` data structure in to
`wasmtime-environ` to have an independent representation that that
chosen by Cranelift. This allows Wasmtime to decouple this runtime
dependency of stack map information and let the two evolve
independently, if necessary.
An alternative would be to refactor cranelift's implementation into a
separate crate and have wasmtime depend on that but it seemed a bit like
overkill to do so and easier to clone just a few lines for this.
* Define code offsets in wasmtime-environ with `u32`
Don't use Cranelift's `binemit::CodeOffset` alias to define this field
type since the `wasmtime-environ` crate will be losing the
`cranelift-codegen` dependency soon.
* Commit to using `cranelift-entity` in Wasmtime
This commit removes the reexport of `cranelift-entity` from the
`wasmtime-environ` crate and instead directly depends on the
`cranelift-entity` crate in all referencing crates. The original reason
for the reexport was to make cranelift version bumps easier since it's
less versions to change, but nowadays we have a script to do that.
Otherwise this encourages crates to use whatever they want from
`cranelift-entity` since we'll always depend on the whole crate.
It's expected that the `cranelift-entity` crate will continue to be a
lean crate in dependencies and suitable for use at both runtime and
compile time. Consequently there's no need to avoid its usage in
Wasmtime at runtime, since "remove Cranelift at compile time" is
primarily about the `cranelift-codegen` crate.
* Remove most uses of `cranelift-codegen` in `wasmtime-environ`
There's only one final use remaining, which is the reexport of
`TrapCode`, which will get handled later.
* Limit the glob-reexport of `cranelift_wasm`
This commit removes the glob reexport of `cranelift-wasm` from the
`wasmtime-environ` crate. This is intended to explicitly define what
we're reexporting and is a transitionary step to curtail the amount of
dependencies taken on `cranelift-wasm` throughout the codebase. For
example some functions used by debuginfo mapping are better imported
directly from the crate since they're Cranelift-specific. Note that
this is intended to be a temporary state affairs, soon this reexport
will be gone entirely.
Additionally this commit reduces imports from `cranelift_wasm` and also
primarily imports from `crate::wasm` within `wasmtime-environ` to get a
better sense of what's imported from where and what will need to be
shared.
* Extract types from cranelift-wasm to cranelift-wasm-types
This commit creates a new crate called `cranelift-wasm-types` and
extracts type definitions from the `cranelift-wasm` crate into this new
crate. The purpose of this crate is to be a shared definition of wasm
types that can be shared both by compilers (like Cranelift) as well as
wasm runtimes (e.g. Wasmtime). This new `cranelift-wasm-types` crate
doesn't depend on `cranelift-codegen` and is the final step in severing
the unconditional dependency from Wasmtime to `cranelift-codegen`.
The final refactoring in this commit is to then reexport this crate from
`wasmtime-environ`, delete the `cranelift-codegen` dependency, and then
update all `use` paths to point to these new types.
The main change of substance here is that the `TrapCode` enum is
mirrored from Cranelift into this `cranelift-wasm-types` crate. While
this unfortunately results in three definitions (one more which is
non-exhaustive in Wasmtime itself) it's hopefully not too onerous and
ideally something we can patch up in the future.
* Get lightbeam compiling
* Remove unnecessary dependency
* Fix compile with uffd
* Update publish script
* Fix more uffd tests
* Rename cranelift-wasm-types to wasmtime-types
This reflects the purpose a bit more where it's types specifically
intended for Wasmtime and its support.
* Fix publish script
3 years ago
|
|
|
"wasmtime-types",
|
|
|
|
"wat",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crc32fast"
|
|
|
|
version = "1.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "criterion"
|
|
|
|
version = "0.3.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1604dafd25fba2fe2d5895a9da139f8dc9b319a5fe5354ca137cbbce4e178d10"
|
|
|
|
dependencies = [
|
|
|
|
"atty",
|
|
|
|
"cast",
|
|
|
|
"clap 2.34.0",
|
|
|
|
"criterion-plot",
|
|
|
|
"csv",
|
|
|
|
"itertools",
|
|
|
|
"lazy_static",
|
|
|
|
"num-traits",
|
|
|
|
"oorandom",
|
|
|
|
"plotters",
|
|
|
|
"rayon",
|
|
|
|
"regex",
|
|
|
|
"serde",
|
|
|
|
"serde_cbor",
|
|
|
|
"serde_derive",
|
|
|
|
"serde_json",
|
|
|
|
"tinytemplate",
|
|
|
|
"walkdir",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "criterion-plot"
|
|
|
|
version = "0.4.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d00996de9f2f7559f7f4dc286073197f83e92256a59ed395f9aac01fe717da57"
|
|
|
|
dependencies = [
|
|
|
|
"cast",
|
|
|
|
"itertools",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-channel"
|
|
|
|
version = "0.5.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"crossbeam-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-deque"
|
|
|
|
version = "0.8.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"crossbeam-epoch",
|
|
|
|
"crossbeam-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-epoch"
|
|
|
|
version = "0.9.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
"cfg-if",
|
|
|
|
"crossbeam-utils",
|
|
|
|
"memoffset",
|
|
|
|
"once_cell",
|
|
|
|
"scopeguard",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-utils"
|
|
|
|
version = "0.8.10"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"once_cell",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crypto-bigint"
|
|
|
|
version = "0.2.11"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f83bd3bb4314701c568e340cd8cf78c975aa0ca79e03d3f6d1677d5b0c9c0c03"
|
|
|
|
dependencies = [
|
|
|
|
"generic-array",
|
|
|
|
"rand_core 0.6.3",
|
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crypto-mac"
|
|
|
|
version = "0.11.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
|
|
|
|
dependencies = [
|
|
|
|
"generic-array",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "csv"
|
|
|
|
version = "1.1.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1"
|
|
|
|
dependencies = [
|
|
|
|
"bstr",
|
|
|
|
"csv-core",
|
|
|
|
"itoa 0.4.8",
|
|
|
|
"ryu",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "csv-core"
|
|
|
|
version = "0.1.10"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
|
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ctr"
|
|
|
|
version = "0.8.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea"
|
|
|
|
dependencies = [
|
|
|
|
"cipher",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cty"
|
|
|
|
version = "0.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "curve25519-dalek"
|
|
|
|
version = "3.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"digest",
|
|
|
|
"rand_core 0.5.1",
|
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "der"
|
|
|
|
version = "0.4.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "79b71cca7d95d7681a4b3b9cdf63c8dbc3730d0584c2c74e31416d64a90493f4"
|
|
|
|
dependencies = [
|
|
|
|
"const-oid",
|
|
|
|
"crypto-bigint",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "derivative"
|
|
|
|
version = "2.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "derive_arbitrary"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "98e23c06c035dac87bd802d98f368df73a7f2cb05a66ffbd1f377e821fac4af9"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "digest"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
|
|
|
|
dependencies = [
|
|
|
|
"generic-array",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "directories-next"
|
|
|
|
version = "2.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"dirs-sys-next",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dirs-next"
|
|
|
|
version = "2.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"dirs-sys-next",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dirs-sys-next"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"redox_users",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "downcast-rs"
|
|
|
|
version = "1.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "dunce"
|
|
|
|
version = "1.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ecdsa"
|
|
|
|
version = "0.12.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "43ee23aa5b4f68c7a092b5c3beb25f50c406adc75e2363634f242f28ab255372"
|
|
|
|
dependencies = [
|
|
|
|
"der",
|
|
|
|
"elliptic-curve",
|
|
|
|
"hmac",
|
|
|
|
"signature",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ed25519"
|
|
|
|
version = "1.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3d5c4b5e5959dc2c2b89918d8e2cc40fcdd623cef026ed09d2f0ee05199dc8e4"
|
|
|
|
dependencies = [
|
|
|
|
"signature",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ed25519-dalek"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
|
|
|
|
dependencies = [
|
|
|
|
"curve25519-dalek",
|
|
|
|
"ed25519",
|
|
|
|
"rand 0.7.3",
|
|
|
|
"serde",
|
|
|
|
"sha2",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "egg"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "05a6c0bbc92278f84e742f08c0ab9cb16a987376cd2bc39d228ef9c74d98d6f7"
|
|
|
|
dependencies = [
|
|
|
|
"indexmap",
|
|
|
|
"instant",
|
|
|
|
"log",
|
|
|
|
"once_cell",
|
|
|
|
"smallvec",
|
|
|
|
"symbolic_expressions",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "either"
|
|
|
|
version = "1.6.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "elliptic-curve"
|
|
|
|
version = "0.10.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "beca177dcb8eb540133e7680baff45e7cc4d93bf22002676cec549f82343721b"
|
|
|
|
dependencies = [
|
|
|
|
"crypto-bigint",
|
|
|
|
"ff",
|
|
|
|
"generic-array",
|
|
|
|
"group",
|
|
|
|
"pkcs8",
|
|
|
|
"rand_core 0.6.3",
|
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "encode_unicode"
|
|
|
|
version = "0.3.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "env_logger"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
|
|
|
|
dependencies = [
|
|
|
|
"atty",
|
|
|
|
"humantime 1.3.0",
|
|
|
|
"log",
|
|
|
|
"regex",
|
|
|
|
"termcolor",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "env_logger"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3"
|
|
|
|
dependencies = [
|
|
|
|
"atty",
|
|
|
|
"humantime 2.1.0",
|
|
|
|
"log",
|
|
|
|
"regex",
|
|
|
|
"termcolor",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "errno"
|
|
|
|
version = "0.2.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
|
|
|
|
dependencies = [
|
|
|
|
"errno-dragonfly",
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "errno-dragonfly"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "example-fib-debug-wasm"
|
|
|
|
version = "0.0.0"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "example-tokio-wasm"
|
|
|
|
version = "0.0.0"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "example-wasi-wasm"
|
|
|
|
version = "0.0.0"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fallible-iterator"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fastrand"
|
|
|
|
version = "1.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
|
|
|
|
dependencies = [
|
|
|
|
"instant",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ff"
|
|
|
|
version = "0.10.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d0f40b2dcd8bc322217a5f6559ae5f9e9d1de202a2ecee2e9eafcbece7562a4f"
|
|
|
|
dependencies = [
|
|
|
|
"rand_core 0.6.3",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "file-per-thread-logger"
|
|
|
|
version = "0.1.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "21e16290574b39ee41c71aeb90ae960c504ebaf1e2a1c87bd52aa56ed6e1a02f"
|
|
|
|
dependencies = [
|
|
|
|
"env_logger 0.9.0",
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "filecheck"
|
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2fe00b427b7c4835f8b82170eb7b9a63634376b63d73b9a9093367e82570bbaa"
|
|
|
|
dependencies = [
|
|
|
|
"regex",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "filetime"
|
|
|
|
version = "0.2.16"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
|
|
|
"redox_syscall",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "flagset"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cda653ca797810c02f7ca4b804b40b8b95ae046eb989d356bce17919a8c25499"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fnv"
|
|
|
|
version = "1.0.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fs-set-times"
|
|
|
|
version = "0.17.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "344a9d25719061ed11379a5ff2f7222486df7d7211f3c228a1d78fa387706576"
|
|
|
|
dependencies = [
|
|
|
|
"io-lifetimes",
|
|
|
|
"rustix",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fslock"
|
|
|
|
version = "0.1.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "57eafdd0c16f57161105ae1b98a1238f97645f2f588438b2949c99a2af9616bf"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "fxhash"
|
|
|
|
version = "0.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "generic-array"
|
|
|
|
version = "0.14.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803"
|
|
|
|
dependencies = [
|
|
|
|
"typenum",
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "getrandom"
|
|
|
|
version = "0.1.16"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
|
|
|
"wasi 0.9.0+wasi-snapshot-preview1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "getrandom"
|
|
|
|
version = "0.2.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
|
|
|
"wasi 0.10.2+wasi-snapshot-preview1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ghash"
|
|
|
|
version = "0.4.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99"
|
|
|
|
dependencies = [
|
|
|
|
"opaque-debug",
|
|
|
|
"polyval",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "gimli"
|
|
|
|
version = "0.26.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
|
|
|
|
dependencies = [
|
|
|
|
"fallible-iterator",
|
|
|
|
"indexmap",
|
|
|
|
"stable_deref_trait",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "glob"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "group"
|
|
|
|
version = "0.10.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912"
|
|
|
|
dependencies = [
|
|
|
|
"ff",
|
|
|
|
"rand_core 0.6.3",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "half"
|
|
|
|
version = "1.8.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hashbrown"
|
|
|
|
version = "0.12.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3"
|
|
|
|
dependencies = [
|
|
|
|
"ahash",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "heck"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hermit-abi"
|
|
|
|
version = "0.1.19"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hermit-abi"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1ab7905ea95c6d9af62940f9d7dd9596d54c334ae2c15300c482051292d5637f"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hkdf"
|
|
|
|
version = "0.11.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b"
|
|
|
|
dependencies = [
|
|
|
|
"digest",
|
|
|
|
"hmac",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hmac"
|
|
|
|
version = "0.11.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
|
|
|
|
dependencies = [
|
|
|
|
"crypto-mac",
|
|
|
|
"digest",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "humantime"
|
|
|
|
version = "1.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
|
|
|
|
dependencies = [
|
|
|
|
"quick-error 1.2.3",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "humantime"
|
|
|
|
version = "2.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "id-arena"
|
|
|
|
version = "2.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "indexmap"
|
|
|
|
version = "1.9.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
"hashbrown",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "indicatif"
|
|
|
|
version = "0.13.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8572bccfb0665e70b7faf44ee28841b8e0823450cd4ad562a76b5a3c4bf48487"
|
|
|
|
dependencies = [
|
|
|
|
"console",
|
|
|
|
"lazy_static",
|
|
|
|
"number_prefix",
|
|
|
|
"regex",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "instant"
|
|
|
|
version = "0.1.12"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "io-extras"
|
|
|
|
version = "0.15.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4a5d8c2ab5becd8720e30fd25f8fa5500d8dc3fceadd8378f05859bd7b46fc49"
|
|
|
|
dependencies = [
|
|
|
|
"io-lifetimes",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "io-lifetimes"
|
|
|
|
version = "0.7.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "24c3f4eff5495aee4c0399d7b6a0dc2b6e81be84242ffbfcf253ebacccc1d0cb"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ipnet"
|
|
|
|
version = "2.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "is-terminal"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0d508111813f9af3afd2f92758f77e4ed2cc9371b642112c6a48d22eb73105c5"
|
|
|
|
dependencies = [
|
|
|
|
"hermit-abi 0.2.0",
|
|
|
|
"io-lifetimes",
|
|
|
|
"rustix",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "is_ci"
|
|
|
|
version = "1.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "isle-fuzz"
|
|
|
|
version = "0.0.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-isle",
|
|
|
|
"env_logger 0.9.0",
|
|
|
|
"libfuzzer-sys",
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "islec"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"clap 3.2.8",
|
|
|
|
"cranelift-isle",
|
|
|
|
"env_logger 0.9.0",
|
|
|
|
"miette",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "itertools"
|
|
|
|
version = "0.10.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"
|
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "itoa"
|
|
|
|
version = "0.4.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "itoa"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ittapi"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "663fe0550070071ff59e981864a9cd3ee1c869ed0a088140d9ac4dc05ea6b1a1"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"ittapi-sys",
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ittapi-sys"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e21911b7183f38c71d75ab478a527f314e28db51027037ece2e5511ed9410703"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "jobserver"
|
|
|
|
version = "0.1.24"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "js-sys"
|
|
|
|
version = "0.3.57"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397"
|
|
|
|
dependencies = [
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "k256"
|
|
|
|
version = "0.9.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "903ae2481bcdfdb7b68e0a9baa4b7c9aff600b9ae2e8e5bb5833b8c91ab851ea"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"ecdsa",
|
|
|
|
"elliptic-curve",
|
|
|
|
"sha2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "lazy_static"
|
|
|
|
version = "1.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|
|
|
dependencies = [
|
|
|
|
"spin",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "leb128"
|
|
|
|
version = "0.2.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libc"
|
|
|
|
version = "0.2.126"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libfuzzer-sys"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "336244aaeab6a12df46480dc585802aa743a72d66b11937844c61bbca84c991d"
|
|
|
|
dependencies = [
|
|
|
|
"arbitrary",
|
|
|
|
"cc",
|
|
|
|
"once_cell",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libloading"
|
|
|
|
version = "0.7.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libm"
|
|
|
|
version = "0.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "linux-raw-sys"
|
|
|
|
version = "0.0.46"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "listenfd"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "14e4fcc00ff6731d94b70e16e71f43bda62883461f31230742e3bc6dddf12988"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"uuid",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "lock_api"
|
|
|
|
version = "0.4.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
"scopeguard",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "log"
|
|
|
|
version = "0.4.17"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "mach"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "maybe-owned"
|
|
|
|
version = "0.3.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "memchr"
|
|
|
|
version = "2.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
|
|
|
|
Add a pooling allocator mode based on copy-on-write mappings of memfds.
As first suggested by Jan on the Zulip here [1], a cheap and effective
way to obtain copy-on-write semantics of a "backing image" for a Wasm
memory is to mmap a file with `MAP_PRIVATE`. The `memfd` mechanism
provided by the Linux kernel allows us to create anonymous,
in-memory-only files that we can use for this mapping, so we can
construct the image contents on-the-fly then effectively create a CoW
overlay. Furthermore, and importantly, `madvise(MADV_DONTNEED, ...)`
will discard the CoW overlay, returning the mapping to its original
state.
By itself this is almost enough for a very fast
instantiation-termination loop of the same image over and over,
without changing the address space mapping at all (which is
expensive). The only missing bit is how to implement
heap *growth*. But here memfds can help us again: if we create another
anonymous file and map it where the extended parts of the heap would
go, we can take advantage of the fact that a `mmap()` mapping can
be *larger than the file itself*, with accesses beyond the end
generating a `SIGBUS`, and the fact that we can cheaply resize the
file with `ftruncate`, even after a mapping exists. So we can map the
"heap extension" file once with the maximum memory-slot size and grow
the memfd itself as `memory.grow` operations occur.
The above CoW technique and heap-growth technique together allow us a
fastpath of `madvise()` and `ftruncate()` only when we re-instantiate
the same module over and over, as long as we can reuse the same
slot. This fastpath avoids all whole-process address-space locks in
the Linux kernel, which should mean it is highly scalable. It also
avoids the cost of copying data on read, as the `uffd` heap backend
does when servicing pagefaults; the kernel's own optimized CoW
logic (same as used by all file mmaps) is used instead.
[1] https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general/topic/Copy.20on.20write.20based.20instance.20reuse/near/266657772
3 years ago
|
|
|
[[package]]
|
|
|
|
name = "memfd"
|
|
|
|
version = "0.6.1"
|
Add a pooling allocator mode based on copy-on-write mappings of memfds.
As first suggested by Jan on the Zulip here [1], a cheap and effective
way to obtain copy-on-write semantics of a "backing image" for a Wasm
memory is to mmap a file with `MAP_PRIVATE`. The `memfd` mechanism
provided by the Linux kernel allows us to create anonymous,
in-memory-only files that we can use for this mapping, so we can
construct the image contents on-the-fly then effectively create a CoW
overlay. Furthermore, and importantly, `madvise(MADV_DONTNEED, ...)`
will discard the CoW overlay, returning the mapping to its original
state.
By itself this is almost enough for a very fast
instantiation-termination loop of the same image over and over,
without changing the address space mapping at all (which is
expensive). The only missing bit is how to implement
heap *growth*. But here memfds can help us again: if we create another
anonymous file and map it where the extended parts of the heap would
go, we can take advantage of the fact that a `mmap()` mapping can
be *larger than the file itself*, with accesses beyond the end
generating a `SIGBUS`, and the fact that we can cheaply resize the
file with `ftruncate`, even after a mapping exists. So we can map the
"heap extension" file once with the maximum memory-slot size and grow
the memfd itself as `memory.grow` operations occur.
The above CoW technique and heap-growth technique together allow us a
fastpath of `madvise()` and `ftruncate()` only when we re-instantiate
the same module over and over, as long as we can reuse the same
slot. This fastpath avoids all whole-process address-space locks in
the Linux kernel, which should mean it is highly scalable. It also
avoids the cost of copying data on read, as the `uffd` heap backend
does when servicing pagefaults; the kernel's own optimized CoW
logic (same as used by all file mmaps) is used instead.
[1] https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general/topic/Copy.20on.20write.20based.20instance.20reuse/near/266657772
3 years ago
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "480b5a5de855d11ff13195950bdc8b98b5e942ef47afc447f6615cdcc4e15d80"
|
Add a pooling allocator mode based on copy-on-write mappings of memfds.
As first suggested by Jan on the Zulip here [1], a cheap and effective
way to obtain copy-on-write semantics of a "backing image" for a Wasm
memory is to mmap a file with `MAP_PRIVATE`. The `memfd` mechanism
provided by the Linux kernel allows us to create anonymous,
in-memory-only files that we can use for this mapping, so we can
construct the image contents on-the-fly then effectively create a CoW
overlay. Furthermore, and importantly, `madvise(MADV_DONTNEED, ...)`
will discard the CoW overlay, returning the mapping to its original
state.
By itself this is almost enough for a very fast
instantiation-termination loop of the same image over and over,
without changing the address space mapping at all (which is
expensive). The only missing bit is how to implement
heap *growth*. But here memfds can help us again: if we create another
anonymous file and map it where the extended parts of the heap would
go, we can take advantage of the fact that a `mmap()` mapping can
be *larger than the file itself*, with accesses beyond the end
generating a `SIGBUS`, and the fact that we can cheaply resize the
file with `ftruncate`, even after a mapping exists. So we can map the
"heap extension" file once with the maximum memory-slot size and grow
the memfd itself as `memory.grow` operations occur.
The above CoW technique and heap-growth technique together allow us a
fastpath of `madvise()` and `ftruncate()` only when we re-instantiate
the same module over and over, as long as we can reuse the same
slot. This fastpath avoids all whole-process address-space locks in
the Linux kernel, which should mean it is highly scalable. It also
avoids the cost of copying data on read, as the `uffd` heap backend
does when servicing pagefaults; the kernel's own optimized CoW
logic (same as used by all file mmaps) is used instead.
[1] https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general/topic/Copy.20on.20write.20based.20instance.20reuse/near/266657772
3 years ago
|
|
|
dependencies = [
|
|
|
|
"rustix",
|
Add a pooling allocator mode based on copy-on-write mappings of memfds.
As first suggested by Jan on the Zulip here [1], a cheap and effective
way to obtain copy-on-write semantics of a "backing image" for a Wasm
memory is to mmap a file with `MAP_PRIVATE`. The `memfd` mechanism
provided by the Linux kernel allows us to create anonymous,
in-memory-only files that we can use for this mapping, so we can
construct the image contents on-the-fly then effectively create a CoW
overlay. Furthermore, and importantly, `madvise(MADV_DONTNEED, ...)`
will discard the CoW overlay, returning the mapping to its original
state.
By itself this is almost enough for a very fast
instantiation-termination loop of the same image over and over,
without changing the address space mapping at all (which is
expensive). The only missing bit is how to implement
heap *growth*. But here memfds can help us again: if we create another
anonymous file and map it where the extended parts of the heap would
go, we can take advantage of the fact that a `mmap()` mapping can
be *larger than the file itself*, with accesses beyond the end
generating a `SIGBUS`, and the fact that we can cheaply resize the
file with `ftruncate`, even after a mapping exists. So we can map the
"heap extension" file once with the maximum memory-slot size and grow
the memfd itself as `memory.grow` operations occur.
The above CoW technique and heap-growth technique together allow us a
fastpath of `madvise()` and `ftruncate()` only when we re-instantiate
the same module over and over, as long as we can reuse the same
slot. This fastpath avoids all whole-process address-space locks in
the Linux kernel, which should mean it is highly scalable. It also
avoids the cost of copying data on read, as the `uffd` heap backend
does when servicing pagefaults; the kernel's own optimized CoW
logic (same as used by all file mmaps) is used instead.
[1] https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general/topic/Copy.20on.20write.20based.20instance.20reuse/near/266657772
3 years ago
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "memmap2"
|
|
|
|
version = "0.2.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "723e3ebdcdc5c023db1df315364573789f8857c11b631a2fdfad7c00f5c046b4"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "memoffset"
|
|
|
|
version = "0.6.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "memory_units"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "miette"
|
|
|
|
version = "5.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6ec753a43fd71bb5f28751c9ec17fbe89d6d26ca8282d1e1f82f5ac3dbd5581e"
|
|
|
|
dependencies = [
|
|
|
|
"atty",
|
|
|
|
"backtrace",
|
|
|
|
"miette-derive",
|
|
|
|
"once_cell",
|
|
|
|
"owo-colors",
|
|
|
|
"supports-color",
|
|
|
|
"supports-hyperlinks",
|
|
|
|
"supports-unicode",
|
|
|
|
"terminal_size",
|
Cranelift: do not check in generated ISLE code; regenerate on every compile. (#4143)
This PR fixes #4066: it modifies the Cranelift `build.rs` workflow to
invoke the ISLE DSL compiler on every compilation, rather than only
when the user specifies a special "rebuild ISLE" feature.
The main benefit of this change is that it vastly simplifies the mental
model required of developers, and removes a bunch of failure modes
we have tried to work around in other ways. There is now just one
"source of truth", the ISLE source itself, in the repository, and so there
is no need to understand a special "rebuild" step and how to handle
merge errors. There is no special process needed to develop the compiler
when modifying the DSL. And there is no "noise" in the git history produced
by constantly-regenerated files.
The two main downsides we discussed in #4066 are:
- Compile time could increase, by adding more to the "meta" step before the main build;
- It becomes less obvious where the source definitions are (everything becomes
more "magic"), which makes exploration and debugging harder.
This PR addresses each of these concerns:
1. To maintain reasonable compile time, it includes work to cut down the
dependencies of the `cranelift-isle` crate to *nothing* (only the Rust stdlib),
in the default build. It does this by putting the error-reporting bits
(`miette` crate) under an optional feature, and the logging (`log` crate) under
a feature-controlled macro, and manually writing an `Error` impl rather than
using `thiserror`. This completely avoids proc macros and the `syn` build slowness.
The user can still get nice errors out of `miette`: this is enabled by specifying
a Cargo feature `--features isle-errors`.
2. To allow the user to optionally inspect the generated source, which nominally
lives in a hard-to-find path inside `target/` now, this PR adds a feature `isle-in-source-tree`
that, as implied by the name, moves the target for ISLE generated source into
the source tree, at `cranelift/codegen/isle_generated_source/`. It seems reasonable
to do this when an explicit feature (opt-in) is specified because this is how ISLE regeneration
currently works as well. To prevent surprises, if the feature is *not* specified, the
build fails if this directory exists.
3 years ago
|
|
|
"textwrap 0.15.0",
|
|
|
|
"thiserror",
|
Cranelift: do not check in generated ISLE code; regenerate on every compile. (#4143)
This PR fixes #4066: it modifies the Cranelift `build.rs` workflow to
invoke the ISLE DSL compiler on every compilation, rather than only
when the user specifies a special "rebuild ISLE" feature.
The main benefit of this change is that it vastly simplifies the mental
model required of developers, and removes a bunch of failure modes
we have tried to work around in other ways. There is now just one
"source of truth", the ISLE source itself, in the repository, and so there
is no need to understand a special "rebuild" step and how to handle
merge errors. There is no special process needed to develop the compiler
when modifying the DSL. And there is no "noise" in the git history produced
by constantly-regenerated files.
The two main downsides we discussed in #4066 are:
- Compile time could increase, by adding more to the "meta" step before the main build;
- It becomes less obvious where the source definitions are (everything becomes
more "magic"), which makes exploration and debugging harder.
This PR addresses each of these concerns:
1. To maintain reasonable compile time, it includes work to cut down the
dependencies of the `cranelift-isle` crate to *nothing* (only the Rust stdlib),
in the default build. It does this by putting the error-reporting bits
(`miette` crate) under an optional feature, and the logging (`log` crate) under
a feature-controlled macro, and manually writing an `Error` impl rather than
using `thiserror`. This completely avoids proc macros and the `syn` build slowness.
The user can still get nice errors out of `miette`: this is enabled by specifying
a Cargo feature `--features isle-errors`.
2. To allow the user to optionally inspect the generated source, which nominally
lives in a hard-to-find path inside `target/` now, this PR adds a feature `isle-in-source-tree`
that, as implied by the name, moves the target for ISLE generated source into
the source tree, at `cranelift/codegen/isle_generated_source/`. It seems reasonable
to do this when an explicit feature (opt-in) is specified because this is how ISLE regeneration
currently works as well. To prevent surprises, if the feature is *not* specified, the
build fails if this directory exists.
3 years ago
|
|
|
"unicode-width",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "miette-derive"
|
|
|
|
version = "5.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fdfc33ea15c5446600f91d319299dd40301614afff7143cdfa9bf4c09da3ca64"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
externref: implement stack map-based garbage collection
For host VM code, we use plain reference counting, where cloning increments
the reference count, and dropping decrements it. We can avoid many of the
on-stack increment/decrement operations that typically plague the
performance of reference counting via Rust's ownership and borrowing system.
Moving a `VMExternRef` avoids mutating its reference count, and borrowing it
either avoids the reference count increment or delays it until if/when the
`VMExternRef` is cloned.
When passing a `VMExternRef` into compiled Wasm code, we don't want to do
reference count mutations for every compiled `local.{get,set}`, nor for
every function call. Therefore, we use a variation of **deferred reference
counting**, where we only mutate reference counts when storing
`VMExternRef`s somewhere that outlives the activation: into a global or
table. Simultaneously, we over-approximate the set of `VMExternRef`s that
are inside Wasm function activations. Periodically, we walk the stack at GC
safe points, and use stack map information to precisely identify the set of
`VMExternRef`s inside Wasm activations. Then we take the difference between
this precise set and our over-approximation, and decrement the reference
count for each of the `VMExternRef`s that are in our over-approximation but
not in the precise set. Finally, the over-approximation is replaced with the
precise set.
The `VMExternRefActivationsTable` implements the over-approximized set of
`VMExternRef`s referenced by Wasm activations. Calling a Wasm function and
passing it a `VMExternRef` moves the `VMExternRef` into the table, and the
compiled Wasm function logically "borrows" the `VMExternRef` from the
table. Similarly, `global.get` and `table.get` operations clone the gotten
`VMExternRef` into the `VMExternRefActivationsTable` and then "borrow" the
reference out of the table.
When a `VMExternRef` is returned to host code from a Wasm function, the host
increments the reference count (because the reference is logically
"borrowed" from the `VMExternRefActivationsTable` and the reference count
from the table will be dropped at the next GC).
For more general information on deferred reference counting, see *An
Examination of Deferred Reference Counting and Cycle Detection* by Quinane:
https://openresearch-repository.anu.edu.au/bitstream/1885/42030/2/hon-thesis.pdf
cc #929
Fixes #1804
4 years ago
|
|
|
[[package]]
|
|
|
|
name = "miniz_oxide"
|
|
|
|
version = "0.5.1"
|
externref: implement stack map-based garbage collection
For host VM code, we use plain reference counting, where cloning increments
the reference count, and dropping decrements it. We can avoid many of the
on-stack increment/decrement operations that typically plague the
performance of reference counting via Rust's ownership and borrowing system.
Moving a `VMExternRef` avoids mutating its reference count, and borrowing it
either avoids the reference count increment or delays it until if/when the
`VMExternRef` is cloned.
When passing a `VMExternRef` into compiled Wasm code, we don't want to do
reference count mutations for every compiled `local.{get,set}`, nor for
every function call. Therefore, we use a variation of **deferred reference
counting**, where we only mutate reference counts when storing
`VMExternRef`s somewhere that outlives the activation: into a global or
table. Simultaneously, we over-approximate the set of `VMExternRef`s that
are inside Wasm function activations. Periodically, we walk the stack at GC
safe points, and use stack map information to precisely identify the set of
`VMExternRef`s inside Wasm activations. Then we take the difference between
this precise set and our over-approximation, and decrement the reference
count for each of the `VMExternRef`s that are in our over-approximation but
not in the precise set. Finally, the over-approximation is replaced with the
precise set.
The `VMExternRefActivationsTable` implements the over-approximized set of
`VMExternRef`s referenced by Wasm activations. Calling a Wasm function and
passing it a `VMExternRef` moves the `VMExternRef` into the table, and the
compiled Wasm function logically "borrows" the `VMExternRef` from the
table. Similarly, `global.get` and `table.get` operations clone the gotten
`VMExternRef` into the `VMExternRefActivationsTable` and then "borrow" the
reference out of the table.
When a `VMExternRef` is returned to host code from a Wasm function, the host
increments the reference count (because the reference is logically
"borrowed" from the `VMExternRefActivationsTable` and the reference count
from the table will be dropped at the next GC).
For more general information on deferred reference counting, see *An
Examination of Deferred Reference Counting and Cycle Detection* by Quinane:
https://openresearch-repository.anu.edu.au/bitstream/1885/42030/2/hon-thesis.pdf
cc #929
Fixes #1804
4 years ago
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082"
|
externref: implement stack map-based garbage collection
For host VM code, we use plain reference counting, where cloning increments
the reference count, and dropping decrements it. We can avoid many of the
on-stack increment/decrement operations that typically plague the
performance of reference counting via Rust's ownership and borrowing system.
Moving a `VMExternRef` avoids mutating its reference count, and borrowing it
either avoids the reference count increment or delays it until if/when the
`VMExternRef` is cloned.
When passing a `VMExternRef` into compiled Wasm code, we don't want to do
reference count mutations for every compiled `local.{get,set}`, nor for
every function call. Therefore, we use a variation of **deferred reference
counting**, where we only mutate reference counts when storing
`VMExternRef`s somewhere that outlives the activation: into a global or
table. Simultaneously, we over-approximate the set of `VMExternRef`s that
are inside Wasm function activations. Periodically, we walk the stack at GC
safe points, and use stack map information to precisely identify the set of
`VMExternRef`s inside Wasm activations. Then we take the difference between
this precise set and our over-approximation, and decrement the reference
count for each of the `VMExternRef`s that are in our over-approximation but
not in the precise set. Finally, the over-approximation is replaced with the
precise set.
The `VMExternRefActivationsTable` implements the over-approximized set of
`VMExternRef`s referenced by Wasm activations. Calling a Wasm function and
passing it a `VMExternRef` moves the `VMExternRef` into the table, and the
compiled Wasm function logically "borrows" the `VMExternRef` from the
table. Similarly, `global.get` and `table.get` operations clone the gotten
`VMExternRef` into the `VMExternRefActivationsTable` and then "borrow" the
reference out of the table.
When a `VMExternRef` is returned to host code from a Wasm function, the host
increments the reference count (because the reference is logically
"borrowed" from the `VMExternRefActivationsTable` and the reference count
from the table will be dropped at the next GC).
For more general information on deferred reference counting, see *An
Examination of Deferred Reference Counting and Cycle Detection* by Quinane:
https://openresearch-repository.anu.edu.au/bitstream/1885/42030/2/hon-thesis.pdf
cc #929
Fixes #1804
4 years ago
|
|
|
dependencies = [
|
|
|
|
"adler",
|
externref: implement stack map-based garbage collection
For host VM code, we use plain reference counting, where cloning increments
the reference count, and dropping decrements it. We can avoid many of the
on-stack increment/decrement operations that typically plague the
performance of reference counting via Rust's ownership and borrowing system.
Moving a `VMExternRef` avoids mutating its reference count, and borrowing it
either avoids the reference count increment or delays it until if/when the
`VMExternRef` is cloned.
When passing a `VMExternRef` into compiled Wasm code, we don't want to do
reference count mutations for every compiled `local.{get,set}`, nor for
every function call. Therefore, we use a variation of **deferred reference
counting**, where we only mutate reference counts when storing
`VMExternRef`s somewhere that outlives the activation: into a global or
table. Simultaneously, we over-approximate the set of `VMExternRef`s that
are inside Wasm function activations. Periodically, we walk the stack at GC
safe points, and use stack map information to precisely identify the set of
`VMExternRef`s inside Wasm activations. Then we take the difference between
this precise set and our over-approximation, and decrement the reference
count for each of the `VMExternRef`s that are in our over-approximation but
not in the precise set. Finally, the over-approximation is replaced with the
precise set.
The `VMExternRefActivationsTable` implements the over-approximized set of
`VMExternRef`s referenced by Wasm activations. Calling a Wasm function and
passing it a `VMExternRef` moves the `VMExternRef` into the table, and the
compiled Wasm function logically "borrows" the `VMExternRef` from the
table. Similarly, `global.get` and `table.get` operations clone the gotten
`VMExternRef` into the `VMExternRefActivationsTable` and then "borrow" the
reference out of the table.
When a `VMExternRef` is returned to host code from a Wasm function, the host
increments the reference count (because the reference is logically
"borrowed" from the `VMExternRefActivationsTable` and the reference count
from the table will be dropped at the next GC).
For more general information on deferred reference counting, see *An
Examination of Deferred Reference Counting and Cycle Detection* by Quinane:
https://openresearch-repository.anu.edu.au/bitstream/1885/42030/2/hon-thesis.pdf
cc #929
Fixes #1804
4 years ago
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "mio"
|
|
|
|
version = "0.8.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"log",
|
|
|
|
"miow",
|
|
|
|
"ntapi",
|
|
|
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "miow"
|
|
|
|
version = "0.3.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
|
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "more-asserts"
|
|
|
|
version = "0.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ntapi"
|
|
|
|
version = "0.3.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
|
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-bigint"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
"num-integer",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-bigint-dig"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4547ee5541c18742396ae2c895d0717d0f886d8823b8399cdaf7b07d63ad0480"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 0.1.8",
|
|
|
|
"byteorder",
|
|
|
|
"lazy_static",
|
|
|
|
"libm",
|
|
|
|
"num-integer",
|
|
|
|
"num-iter",
|
|
|
|
"num-traits",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"serde",
|
|
|
|
"smallvec",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-integer"
|
|
|
|
version = "0.1.45"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-iter"
|
|
|
|
version = "0.1.43"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
"num-integer",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-rational"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
"num-bigint",
|
|
|
|
"num-integer",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-traits"
|
|
|
|
version = "0.2.15"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
"libm",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num_cpus"
|
|
|
|
version = "1.13.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
|
|
|
|
dependencies = [
|
|
|
|
"hermit-abi 0.1.19",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "number_prefix"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "object"
|
|
|
|
version = "0.29.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
|
|
|
|
dependencies = [
|
|
|
|
"crc32fast",
|
|
|
|
"hashbrown",
|
|
|
|
"indexmap",
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ocaml-boxroot-sys"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5186393bfbee4ce2bc5bbb82beafb77e85c1d0a557e3cfc8c8a0d63d7845fed5"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ocaml-interop"
|
|
|
|
version = "0.8.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2e01e08412a7e072a90a225d2ae49a2860aeea853ce673bc63891dbf86aed063"
|
|
|
|
dependencies = [
|
|
|
|
"ocaml-boxroot-sys",
|
|
|
|
"ocaml-sys",
|
|
|
|
"static_assertions",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ocaml-sys"
|
|
|
|
version = "0.22.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "73ec6ca7d41458442627435afb8f4671e83fd642e8a560171d671a1f679aa3cf"
|
|
|
|
dependencies = [
|
|
|
|
"cty",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "once_cell"
|
|
|
|
version = "1.12.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "oorandom"
|
|
|
|
version = "11.1.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "opaque-debug"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openvino"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d9627908ea4af5766040aa191c8607479af7f70b45fdf6e999b450069fea851a"
|
|
|
|
dependencies = [
|
|
|
|
"openvino-sys",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openvino-finder"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "213893e484dcf3db4af79d498a955f7c4c209d06e7020779cda68fca779c2578"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openvino-sys"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e2ba37c26ad2591acc48abee5350d65daa263bf0ab7a79d2ab6999d4b20130ec"
|
|
|
|
dependencies = [
|
|
|
|
"libloading",
|
|
|
|
"once_cell",
|
|
|
|
"openvino-finder",
|
|
|
|
"pretty_env_logger",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "os_pipe"
|
|
|
|
version = "0.9.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fb233f06c2307e1f5ce2ecad9f8121cffbbee2c95428f44ea85222e460d0d213"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "os_str_bytes"
|
|
|
|
version = "6.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "owo-colors"
|
|
|
|
version = "3.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "decf7381921fea4dcb2549c5667eda59b3ec297ab7e2b5fc33eac69d2e7da87b"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "p256"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d053368e1bae4c8a672953397bd1bd7183dde1c72b0b7612a15719173148d186"
|
|
|
|
dependencies = [
|
|
|
|
"ecdsa",
|
|
|
|
"elliptic-curve",
|
|
|
|
"sha2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parity-wasm"
|
|
|
|
version = "0.42.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parking_lot"
|
|
|
|
version = "0.11.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
|
|
|
|
dependencies = [
|
|
|
|
"instant",
|
|
|
|
"lock_api",
|
|
|
|
"parking_lot_core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parking_lot_core"
|
|
|
|
version = "0.8.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"instant",
|
|
|
|
"libc",
|
|
|
|
"redox_syscall",
|
|
|
|
"smallvec",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "paste"
|
|
|
|
version = "1.0.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pem-rfc7468"
|
|
|
|
version = "0.2.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "84e93a3b1cc0510b03020f33f21e62acdde3dcaef432edc95bea377fbd4c2cd4"
|
|
|
|
dependencies = [
|
|
|
|
"base64ct",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pin-project-lite"
|
|
|
|
version = "0.2.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pkcs1"
|
|
|
|
version = "0.2.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "116bee8279d783c0cf370efa1a94632f2108e5ef0bb32df31f051647810a4e2c"
|
|
|
|
dependencies = [
|
|
|
|
"der",
|
|
|
|
"pem-rfc7468",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pkcs8"
|
|
|
|
version = "0.7.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ee3ef9b64d26bad0536099c816c6734379e45bbd5f14798def6809e5cc350447"
|
|
|
|
dependencies = [
|
|
|
|
"der",
|
|
|
|
"pem-rfc7468",
|
|
|
|
"pkcs1",
|
|
|
|
"spki",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "plotters"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a"
|
|
|
|
dependencies = [
|
|
|
|
"num-traits",
|
|
|
|
"plotters-backend",
|
|
|
|
"plotters-svg",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"web-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "plotters-backend"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "plotters-svg"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9"
|
|
|
|
dependencies = [
|
|
|
|
"plotters-backend",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "poly1305"
|
|
|
|
version = "0.7.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede"
|
|
|
|
dependencies = [
|
ISLE: guard against stale generated source in default build config.
Currently, the `build.rs` script that generates Rust source from the
ISLE DSL will only do this generation if the `rebuild-isle` Cargo
feature is specified. By default, it is not. This is based on the
principle that we (the build script) do not modify the source tree as
managed by git; git-managed files are strictly a human-managed and
human-edited resource. By adding the opt-in Cargo feature, a developer
is requesting the build script to perform an explicit action. (In my
understanding at least, this principle comes from the general philosophy
of hermetic builds: the output should be a pure function of the input,
and part of this is that the input is read-only. If we modify the source
tree, then all bets are off.)
Unfortunately, requiring the opt-in feature also creates a footgun that
is easy to hit: if a developer modifies the ISLE DSL source, but forgets
to specify the Cargo feature, then the compiler will silently be built
successfully with stale source, and will silently exclude any changes
that were made.
The generated source is checked into git for a good reason: we want DSL
compiler to not affect build times for the overwhelmingly common case
that Cranelift is used as a dependency but the backends are not being
actively developed. (This overhead comes mainly from building `islec`
itself.)
So, what to do? This PR implements a middle ground first described in
[this conversation](https://github.com/bytecodealliance/wasmtime/pull/3506#discussion_r743113351), in which we:
- Generate a hash (SHA-512) of the ISLE DSL source and produce a
"manifest" of ISLE inputs alongside the generated source; and
- Always read the ISLE DSL source, and see if the manifest is still
valid, on builds that do not have the opt-in "rebuild" feature.
This allows us to know whether the ISLE compiler output would have been
the same (modulo changes to the DSL compiler itself, which are
out-of-scope here), without actually building the ISLE compiler and
running it.
If the compiler-backend developer modifies an ISLE source file and then
tries to build `cranelift-codegen` without adding the `rebuild-isle`
Cargo feature, they get the following output:
```text
Error: the ISLE source files that resulted in the generated Rust source
* src/isa/x64/lower/isle/generated_code.rs
have changed but the generated source was not rebuilt! These ISLE source
files are:
* src/clif.isle
* src/prelude.isle
* src/isa/x64/inst.isle
* src/isa/x64/lower.isle
Please add `--features rebuild-isle` to your `cargo build` command
if you wish to rebuild the generated source, then include these changes
in any git commits you make that include the changes to the ISLE.
For example:
$ cargo build -p cranelift-codegen --features rebuild-isle
(This build script cannot do this for you by default because we cannot
modify checked-into-git source without your explicit opt-in.)
```
which will tell them exactly what they need to do to fix the problem!
Note that I am leaving the "Rebuild ISLE" CI job alone for now, because
otherwise, we are trusting whomever submits a PR to generate the correct
generated source. In other words, the manifest is a communication from
the checked-in tree to the developer, but we still need to verify that
the checked-in generated Rust source and the manifest are correct with
respect to the checked-in ISLE source.
3 years ago
|
|
|
"cpufeatures",
|
|
|
|
"opaque-debug",
|
|
|
|
"universal-hash",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "polyval"
|
|
|
|
version = "0.5.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
ISLE: guard against stale generated source in default build config.
Currently, the `build.rs` script that generates Rust source from the
ISLE DSL will only do this generation if the `rebuild-isle` Cargo
feature is specified. By default, it is not. This is based on the
principle that we (the build script) do not modify the source tree as
managed by git; git-managed files are strictly a human-managed and
human-edited resource. By adding the opt-in Cargo feature, a developer
is requesting the build script to perform an explicit action. (In my
understanding at least, this principle comes from the general philosophy
of hermetic builds: the output should be a pure function of the input,
and part of this is that the input is read-only. If we modify the source
tree, then all bets are off.)
Unfortunately, requiring the opt-in feature also creates a footgun that
is easy to hit: if a developer modifies the ISLE DSL source, but forgets
to specify the Cargo feature, then the compiler will silently be built
successfully with stale source, and will silently exclude any changes
that were made.
The generated source is checked into git for a good reason: we want DSL
compiler to not affect build times for the overwhelmingly common case
that Cranelift is used as a dependency but the backends are not being
actively developed. (This overhead comes mainly from building `islec`
itself.)
So, what to do? This PR implements a middle ground first described in
[this conversation](https://github.com/bytecodealliance/wasmtime/pull/3506#discussion_r743113351), in which we:
- Generate a hash (SHA-512) of the ISLE DSL source and produce a
"manifest" of ISLE inputs alongside the generated source; and
- Always read the ISLE DSL source, and see if the manifest is still
valid, on builds that do not have the opt-in "rebuild" feature.
This allows us to know whether the ISLE compiler output would have been
the same (modulo changes to the DSL compiler itself, which are
out-of-scope here), without actually building the ISLE compiler and
running it.
If the compiler-backend developer modifies an ISLE source file and then
tries to build `cranelift-codegen` without adding the `rebuild-isle`
Cargo feature, they get the following output:
```text
Error: the ISLE source files that resulted in the generated Rust source
* src/isa/x64/lower/isle/generated_code.rs
have changed but the generated source was not rebuilt! These ISLE source
files are:
* src/clif.isle
* src/prelude.isle
* src/isa/x64/inst.isle
* src/isa/x64/lower.isle
Please add `--features rebuild-isle` to your `cargo build` command
if you wish to rebuild the generated source, then include these changes
in any git commits you make that include the changes to the ISLE.
For example:
$ cargo build -p cranelift-codegen --features rebuild-isle
(This build script cannot do this for you by default because we cannot
modify checked-into-git source without your explicit opt-in.)
```
which will tell them exactly what they need to do to fix the problem!
Note that I am leaving the "Rebuild ISLE" CI job alone for now, because
otherwise, we are trusting whomever submits a PR to generate the correct
generated source. In other words, the manifest is a communication from
the checked-in tree to the developer, but we still need to verify that
the checked-in generated Rust source and the manifest are correct with
respect to the checked-in ISLE source.
3 years ago
|
|
|
"cpufeatures",
|
|
|
|
"opaque-debug",
|
|
|
|
"universal-hash",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ppv-lite86"
|
|
|
|
version = "0.2.16"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pqcrypto"
|
|
|
|
version = "0.14.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9da39bd0587bff4189521766c34f3203263926f7527906578a96d22a81a700d5"
|
|
|
|
dependencies = [
|
|
|
|
"pqcrypto-kyber",
|
|
|
|
"pqcrypto-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pqcrypto-internals"
|
|
|
|
version = "0.2.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0127cbc0239f585139a56effd7867921eae3425a000a72dde2b0a156062346b2"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"dunce",
|
|
|
|
"getrandom 0.2.6",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pqcrypto-kyber"
|
|
|
|
version = "0.7.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8a17989a978f7d7c1496e38806ad9ff11f36eb8e419c562eafddbbf176af4a8a"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"glob",
|
|
|
|
"libc",
|
|
|
|
"pqcrypto-internals",
|
|
|
|
"pqcrypto-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pqcrypto-traits"
|
|
|
|
version = "0.3.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "97e91cb6af081c6daad5fa705f8adb0634c027662052cb3174bdf2957bf07e25"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pretty_env_logger"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d"
|
|
|
|
dependencies = [
|
|
|
|
"env_logger 0.7.1",
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "proc-macro-error"
|
|
|
|
version = "1.0.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro-error-attr",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "proc-macro-error-attr"
|
|
|
|
version = "1.0.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "proc-macro2"
|
|
|
|
version = "1.0.37"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
|
|
|
|
dependencies = [
|
|
|
|
"unicode-xid",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "proptest"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5"
|
|
|
|
dependencies = [
|
|
|
|
"bit-set",
|
|
|
|
"bitflags",
|
|
|
|
"byteorder",
|
|
|
|
"lazy_static",
|
|
|
|
"num-traits",
|
|
|
|
"quick-error 2.0.1",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rand_chacha 0.3.1",
|
|
|
|
"rand_xorshift",
|
|
|
|
"regex-syntax",
|
|
|
|
"rusty-fork",
|
|
|
|
"tempfile",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "psm"
|
|
|
|
version = "0.1.18"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "871372391786ccec00d3c5d3d6608905b3d4db263639cfe075d3b60a736d115a"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "quick-error"
|
|
|
|
version = "1.2.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "quick-error"
|
|
|
|
version = "2.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "quote"
|
|
|
|
version = "1.0.18"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand"
|
|
|
|
version = "0.7.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
|
|
|
|
dependencies = [
|
|
|
|
"getrandom 0.1.16",
|
|
|
|
"libc",
|
|
|
|
"rand_chacha 0.2.2",
|
|
|
|
"rand_core 0.5.1",
|
|
|
|
"rand_hc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand"
|
|
|
|
version = "0.8.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"rand_chacha 0.3.1",
|
|
|
|
"rand_core 0.6.3",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_chacha"
|
|
|
|
version = "0.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
|
|
|
|
dependencies = [
|
|
|
|
"ppv-lite86",
|
|
|
|
"rand_core 0.5.1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_chacha"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
|
|
|
dependencies = [
|
|
|
|
"ppv-lite86",
|
|
|
|
"rand_core 0.6.3",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_core"
|
|
|
|
version = "0.5.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
|
|
|
|
dependencies = [
|
|
|
|
"getrandom 0.1.16",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_core"
|
|
|
|
version = "0.6.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
|
|
|
|
dependencies = [
|
|
|
|
"getrandom 0.2.6",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_hc"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
|
|
|
|
dependencies = [
|
|
|
|
"rand_core 0.5.1",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_xorshift"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
|
|
|
|
dependencies = [
|
|
|
|
"rand_core 0.6.3",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rawbytes"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "04d0088f16afb86d12c7f239d8de4637fa68ecc99a3db227e1ab58a294713e60"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rayon"
|
|
|
|
version = "1.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221"
|
|
|
|
dependencies = [
|
|
|
|
"autocfg 1.1.0",
|
|
|
|
"crossbeam-deque",
|
|
|
|
"either",
|
|
|
|
"rayon-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rayon-core"
|
|
|
|
version = "1.9.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4"
|
|
|
|
dependencies = [
|
|
|
|
"crossbeam-channel",
|
|
|
|
"crossbeam-deque",
|
|
|
|
"crossbeam-utils",
|
|
|
|
"num_cpus",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "redox_syscall"
|
|
|
|
version = "0.2.13"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "redox_users"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
|
|
|
|
dependencies = [
|
|
|
|
"getrandom 0.2.6",
|
|
|
|
"redox_syscall",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "regalloc2"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "76ff2e57a7d050308b3fde0f707aa240b491b190e3855f212860f11bb3af4205"
|
|
|
|
dependencies = [
|
|
|
|
"fxhash",
|
|
|
|
"log",
|
|
|
|
"serde",
|
|
|
|
"slice-group-by",
|
|
|
|
"smallvec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "regex"
|
|
|
|
version = "1.5.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
|
|
|
|
dependencies = [
|
|
|
|
"aho-corasick",
|
|
|
|
"memchr",
|
|
|
|
"regex-syntax",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "regex-automata"
|
|
|
|
version = "0.1.10"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "regex-syntax"
|
|
|
|
version = "0.6.25"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "region"
|
|
|
|
version = "2.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags",
|
|
|
|
"libc",
|
|
|
|
"mach",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "remove_dir_all"
|
|
|
|
version = "0.5.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
|
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rsa"
|
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e05c2603e2823634ab331437001b411b9ed11660fbc4066f3908c84a9439260d"
|
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"digest",
|
|
|
|
"lazy_static",
|
|
|
|
"num-bigint-dig",
|
|
|
|
"num-integer",
|
|
|
|
"num-iter",
|
|
|
|
"num-traits",
|
|
|
|
"pkcs1",
|
|
|
|
"pkcs8",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"serde",
|
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustc-demangle"
|
|
|
|
version = "0.1.21"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustc_version"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
|
|
|
|
dependencies = [
|
|
|
|
"semver",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustix"
|
|
|
|
version = "0.35.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ef258c11e17f5c01979a10543a30a4e12faef6aab217a74266e747eefa3aed88"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags",
|
|
|
|
"errno",
|
|
|
|
"io-lifetimes",
|
|
|
|
"itoa 1.0.1",
|
|
|
|
"libc",
|
|
|
|
"linux-raw-sys",
|
|
|
|
"once_cell",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rusty-fork"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
|
|
|
|
dependencies = [
|
|
|
|
"fnv",
|
|
|
|
"quick-error 1.2.3",
|
|
|
|
"tempfile",
|
|
|
|
"wait-timeout",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ryu"
|
|
|
|
version = "1.0.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "same-file"
|
|
|
|
version = "1.0.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
|
|
|
dependencies = [
|
|
|
|
"winapi-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "scopeguard"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "semver"
|
|
|
|
version = "1.0.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "serde"
|
|
|
|
version = "1.0.137"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
|
|
|
|
dependencies = [
|
|
|
|
"serde_derive",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "serde_cbor"
|
|
|
|
version = "0.11.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
|
|
|
|
dependencies = [
|
|
|
|
"half",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "serde_derive"
|
|
|
|
version = "1.0.137"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "serde_json"
|
|
|
|
version = "1.0.80"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f972498cf015f7c0746cac89ebe1d6ef10c293b94175a243a2d9442c163d9944"
|
|
|
|
dependencies = [
|
|
|
|
"itoa 1.0.1",
|
|
|
|
"ryu",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sha2"
|
|
|
|
version = "0.9.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
|
|
|
|
dependencies = [
|
|
|
|
"block-buffer",
|
|
|
|
"cfg-if",
|
ISLE: guard against stale generated source in default build config.
Currently, the `build.rs` script that generates Rust source from the
ISLE DSL will only do this generation if the `rebuild-isle` Cargo
feature is specified. By default, it is not. This is based on the
principle that we (the build script) do not modify the source tree as
managed by git; git-managed files are strictly a human-managed and
human-edited resource. By adding the opt-in Cargo feature, a developer
is requesting the build script to perform an explicit action. (In my
understanding at least, this principle comes from the general philosophy
of hermetic builds: the output should be a pure function of the input,
and part of this is that the input is read-only. If we modify the source
tree, then all bets are off.)
Unfortunately, requiring the opt-in feature also creates a footgun that
is easy to hit: if a developer modifies the ISLE DSL source, but forgets
to specify the Cargo feature, then the compiler will silently be built
successfully with stale source, and will silently exclude any changes
that were made.
The generated source is checked into git for a good reason: we want DSL
compiler to not affect build times for the overwhelmingly common case
that Cranelift is used as a dependency but the backends are not being
actively developed. (This overhead comes mainly from building `islec`
itself.)
So, what to do? This PR implements a middle ground first described in
[this conversation](https://github.com/bytecodealliance/wasmtime/pull/3506#discussion_r743113351), in which we:
- Generate a hash (SHA-512) of the ISLE DSL source and produce a
"manifest" of ISLE inputs alongside the generated source; and
- Always read the ISLE DSL source, and see if the manifest is still
valid, on builds that do not have the opt-in "rebuild" feature.
This allows us to know whether the ISLE compiler output would have been
the same (modulo changes to the DSL compiler itself, which are
out-of-scope here), without actually building the ISLE compiler and
running it.
If the compiler-backend developer modifies an ISLE source file and then
tries to build `cranelift-codegen` without adding the `rebuild-isle`
Cargo feature, they get the following output:
```text
Error: the ISLE source files that resulted in the generated Rust source
* src/isa/x64/lower/isle/generated_code.rs
have changed but the generated source was not rebuilt! These ISLE source
files are:
* src/clif.isle
* src/prelude.isle
* src/isa/x64/inst.isle
* src/isa/x64/lower.isle
Please add `--features rebuild-isle` to your `cargo build` command
if you wish to rebuild the generated source, then include these changes
in any git commits you make that include the changes to the ISLE.
For example:
$ cargo build -p cranelift-codegen --features rebuild-isle
(This build script cannot do this for you by default because we cannot
modify checked-into-git source without your explicit opt-in.)
```
which will tell them exactly what they need to do to fix the problem!
Note that I am leaving the "Rebuild ISLE" CI job alone for now, because
otherwise, we are trusting whomever submits a PR to generate the correct
generated source. In other words, the manifest is a communication from
the checked-in tree to the developer, but we still need to verify that
the checked-in generated Rust source and the manifest are correct with
respect to the checked-in ISLE source.
3 years ago
|
|
|
"cpufeatures",
|
|
|
|
"digest",
|
|
|
|
"opaque-debug",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sharded-slab"
|
|
|
|
version = "0.1.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
|
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "shellexpand"
|
|
|
|
version = "2.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "83bdb7831b2d85ddf4a7b148aa19d0587eddbe8671a436b7bd1182eaad0f2829"
|
|
|
|
dependencies = [
|
|
|
|
"dirs-next",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "shuffling-allocator"
|
|
|
|
version = "1.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4ee9977fa98489d9006f4ab26fc5cbe2a139985baed09d2ec08dee6e506fc496"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "signature"
|
|
|
|
version = "1.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f2807892cfa58e081aa1f1111391c7a0649d4fa127a4ffbe34bcbfb35a1171a4"
|
|
|
|
dependencies = [
|
|
|
|
"digest",
|
|
|
|
"rand_core 0.6.3",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "similar"
|
|
|
|
version = "2.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2e24979f63a11545f5f2c60141afe249d4f19f84581ea2138065e400941d83d3"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "slice-group-by"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "smallvec"
|
|
|
|
version = "1.8.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "smawk"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "socket2"
|
|
|
|
version = "0.4.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "souper-ir"
|
|
|
|
version = "2.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a50c18ce33988e1973003afbaa66e6a465ad7a614dc33f246879ccc209c2c044"
|
|
|
|
dependencies = [
|
|
|
|
"id-arena",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "spin"
|
|
|
|
version = "0.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "spki"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5c01a0c15da1b0b0e1494112e7af814a678fec9bd157881b49beac661e9b6f32"
|
|
|
|
dependencies = [
|
|
|
|
"der",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "stable_deref_trait"
|
|
|
|
version = "1.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "static_assertions"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "strsim"
|
|
|
|
version = "0.10.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "subtle"
|
|
|
|
version = "2.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "supports-color"
|
|
|
|
version = "1.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4872ced36b91d47bae8a214a683fe54e7078875b399dfa251df346c9b547d1f9"
|
|
|
|
dependencies = [
|
|
|
|
"atty",
|
|
|
|
"is_ci",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "supports-hyperlinks"
|
|
|
|
version = "1.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406"
|
|
|
|
dependencies = [
|
|
|
|
"atty",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "supports-unicode"
|
|
|
|
version = "1.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2"
|
|
|
|
dependencies = [
|
|
|
|
"atty",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "symbolic_expressions"
|
|
|
|
version = "5.0.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7c68d531d83ec6c531150584c42a4290911964d5f0d79132b193b67252a23b71"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "syn"
|
|
|
|
version = "1.0.92"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"unicode-xid",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "synstructure"
|
|
|
|
version = "0.12.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
"unicode-xid",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "system-interface"
|
|
|
|
version = "0.21.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2e3e98c4cf2f43a7e3b3a943b63fd192559b8a98ddcbef260580f29f0f4b9d1b"
|
|
|
|
dependencies = [
|
|
|
|
"atty",
|
|
|
|
"bitflags",
|
|
|
|
"cap-fs-ext",
|
|
|
|
"cap-std",
|
|
|
|
"io-lifetimes",
|
|
|
|
"rustix",
|
|
|
|
"windows-sys",
|
|
|
|
"winx",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "target-lexicon"
|
|
|
|
version = "0.12.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tempfile"
|
|
|
|
version = "3.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"fastrand",
|
|
|
|
"libc",
|
|
|
|
"redox_syscall",
|
|
|
|
"remove_dir_all",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "termcolor"
|
|
|
|
version = "1.1.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
|
|
|
|
dependencies = [
|
|
|
|
"winapi-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "terminal_size"
|
|
|
|
version = "0.1.17"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "test-programs"
|
|
|
|
version = "0.19.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cap-std",
|
|
|
|
"cfg-if",
|
|
|
|
"os_pipe",
|
|
|
|
"pretty_env_logger",
|
|
|
|
"target-lexicon",
|
|
|
|
"tempfile",
|
|
|
|
"tokio",
|
|
|
|
"wasi-cap-std-sync",
|
|
|
|
"wasi-common",
|
|
|
|
"wasmtime",
|
|
|
|
"wasmtime-wasi",
|
|
|
|
"wat",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "textwrap"
|
|
|
|
version = "0.11.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
|
|
|
dependencies = [
|
|
|
|
"unicode-width",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "textwrap"
|
Cranelift: do not check in generated ISLE code; regenerate on every compile. (#4143)
This PR fixes #4066: it modifies the Cranelift `build.rs` workflow to
invoke the ISLE DSL compiler on every compilation, rather than only
when the user specifies a special "rebuild ISLE" feature.
The main benefit of this change is that it vastly simplifies the mental
model required of developers, and removes a bunch of failure modes
we have tried to work around in other ways. There is now just one
"source of truth", the ISLE source itself, in the repository, and so there
is no need to understand a special "rebuild" step and how to handle
merge errors. There is no special process needed to develop the compiler
when modifying the DSL. And there is no "noise" in the git history produced
by constantly-regenerated files.
The two main downsides we discussed in #4066 are:
- Compile time could increase, by adding more to the "meta" step before the main build;
- It becomes less obvious where the source definitions are (everything becomes
more "magic"), which makes exploration and debugging harder.
This PR addresses each of these concerns:
1. To maintain reasonable compile time, it includes work to cut down the
dependencies of the `cranelift-isle` crate to *nothing* (only the Rust stdlib),
in the default build. It does this by putting the error-reporting bits
(`miette` crate) under an optional feature, and the logging (`log` crate) under
a feature-controlled macro, and manually writing an `Error` impl rather than
using `thiserror`. This completely avoids proc macros and the `syn` build slowness.
The user can still get nice errors out of `miette`: this is enabled by specifying
a Cargo feature `--features isle-errors`.
2. To allow the user to optionally inspect the generated source, which nominally
lives in a hard-to-find path inside `target/` now, this PR adds a feature `isle-in-source-tree`
that, as implied by the name, moves the target for ISLE generated source into
the source tree, at `cranelift/codegen/isle_generated_source/`. It seems reasonable
to do this when an explicit feature (opt-in) is specified because this is how ISLE regeneration
currently works as well. To prevent surprises, if the feature is *not* specified, the
build fails if this directory exists.
3 years ago
|
|
|
version = "0.15.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
Cranelift: do not check in generated ISLE code; regenerate on every compile. (#4143)
This PR fixes #4066: it modifies the Cranelift `build.rs` workflow to
invoke the ISLE DSL compiler on every compilation, rather than only
when the user specifies a special "rebuild ISLE" feature.
The main benefit of this change is that it vastly simplifies the mental
model required of developers, and removes a bunch of failure modes
we have tried to work around in other ways. There is now just one
"source of truth", the ISLE source itself, in the repository, and so there
is no need to understand a special "rebuild" step and how to handle
merge errors. There is no special process needed to develop the compiler
when modifying the DSL. And there is no "noise" in the git history produced
by constantly-regenerated files.
The two main downsides we discussed in #4066 are:
- Compile time could increase, by adding more to the "meta" step before the main build;
- It becomes less obvious where the source definitions are (everything becomes
more "magic"), which makes exploration and debugging harder.
This PR addresses each of these concerns:
1. To maintain reasonable compile time, it includes work to cut down the
dependencies of the `cranelift-isle` crate to *nothing* (only the Rust stdlib),
in the default build. It does this by putting the error-reporting bits
(`miette` crate) under an optional feature, and the logging (`log` crate) under
a feature-controlled macro, and manually writing an `Error` impl rather than
using `thiserror`. This completely avoids proc macros and the `syn` build slowness.
The user can still get nice errors out of `miette`: this is enabled by specifying
a Cargo feature `--features isle-errors`.
2. To allow the user to optionally inspect the generated source, which nominally
lives in a hard-to-find path inside `target/` now, this PR adds a feature `isle-in-source-tree`
that, as implied by the name, moves the target for ISLE generated source into
the source tree, at `cranelift/codegen/isle_generated_source/`. It seems reasonable
to do this when an explicit feature (opt-in) is specified because this is how ISLE regeneration
currently works as well. To prevent surprises, if the feature is *not* specified, the
build fails if this directory exists.
3 years ago
|
|
|
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
|
|
|
|
dependencies = [
|
|
|
|
"smawk",
|
|
|
|
"unicode-linebreak",
|
|
|
|
"unicode-width",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "thiserror"
|
|
|
|
version = "1.0.31"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a"
|
|
|
|
dependencies = [
|
|
|
|
"thiserror-impl",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "thiserror-impl"
|
|
|
|
version = "1.0.31"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "thread_local"
|
|
|
|
version = "1.1.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
|
|
|
|
dependencies = [
|
|
|
|
"once_cell",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tinytemplate"
|
|
|
|
version = "1.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio"
|
|
|
|
version = "1.18.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "dce653fb475565de9f6fb0614b28bca8df2c430c0cf84bcd9c843f15de5414cc"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"libc",
|
|
|
|
"memchr",
|
|
|
|
"mio",
|
|
|
|
"num_cpus",
|
|
|
|
"once_cell",
|
|
|
|
"pin-project-lite",
|
|
|
|
"socket2",
|
|
|
|
"tokio-macros",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-macros"
|
|
|
|
version = "1.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "toml"
|
|
|
|
version = "0.5.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing"
|
|
|
|
version = "0.1.34"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"log",
|
|
|
|
"pin-project-lite",
|
|
|
|
"tracing-attributes",
|
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-attributes"
|
|
|
|
version = "0.1.21"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-core"
|
|
|
|
version = "0.1.28"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7"
|
|
|
|
dependencies = [
|
|
|
|
"once_cell",
|
|
|
|
"valuable",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-log"
|
|
|
|
version = "0.1.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
|
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
"log",
|
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-subscriber"
|
|
|
|
version = "0.3.11"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596"
|
|
|
|
dependencies = [
|
|
|
|
"ansi_term",
|
|
|
|
"sharded-slab",
|
|
|
|
"smallvec",
|
|
|
|
"thread_local",
|
|
|
|
"tracing-core",
|
|
|
|
"tracing-log",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "typenum"
|
|
|
|
version = "1.15.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-linebreak"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3a52dcaab0c48d931f7cc8ef826fa51690a08e1ea55117ef26f89864f532383f"
|
|
|
|
dependencies = [
|
|
|
|
"regex",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-width"
|
|
|
|
version = "0.1.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-xid"
|
|
|
|
version = "0.2.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "universal-hash"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05"
|
|
|
|
dependencies = [
|
|
|
|
"generic-array",
|
|
|
|
"subtle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "uuid"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0"
|
|
|
|
dependencies = [
|
|
|
|
"getrandom 0.2.6",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "v8"
|
|
|
|
version = "0.44.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f3f92c29dd66c7342443280695afc5bb79d773c3aa3eb02978cf24f058ae2b3d"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags",
|
|
|
|
"fslock",
|
|
|
|
"lazy_static",
|
|
|
|
"libc",
|
|
|
|
"which",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "valuable"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "version_check"
|
|
|
|
version = "0.9.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wait-timeout"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "walkdir"
|
|
|
|
version = "2.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
|
|
|
|
dependencies = [
|
|
|
|
"same-file",
|
|
|
|
"winapi",
|
|
|
|
"winapi-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi"
|
|
|
|
version = "0.9.0+wasi-snapshot-preview1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi"
|
|
|
|
version = "0.10.2+wasi-snapshot-preview1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi"
|
|
|
|
version = "0.11.0+wasi-snapshot-preview1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi-cap-std-sync"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"async-trait",
|
|
|
|
"cap-fs-ext",
|
|
|
|
"cap-rand",
|
|
|
|
"cap-std",
|
|
|
|
"cap-time-ext",
|
|
|
|
"fs-set-times",
|
|
|
|
"io-extras",
|
|
|
|
"io-lifetimes",
|
|
|
|
"is-terminal",
|
|
|
|
"once_cell",
|
|
|
|
"rustix",
|
|
|
|
"system-interface",
|
|
|
|
"tempfile",
|
|
|
|
"tracing",
|
|
|
|
"wasi-common",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi-common"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"bitflags",
|
|
|
|
"cap-rand",
|
|
|
|
"cap-std",
|
|
|
|
"io-extras",
|
|
|
|
"rustix",
|
|
|
|
"thiserror",
|
|
|
|
"tracing",
|
It's wiggle time! (#1202)
* Use wiggle in place of wig in wasi-common
This is a rather massive commit that introduces `wiggle` into the
picture. We still use `wig`'s macro in `old` snapshot and to generate
`wasmtime-wasi` glue, but everything else is now autogenerated by `wiggle`.
In summary, thanks to `wiggle`, we no longer need to worry about
serialising and deserialising to and from the guest memory, and
all guest (WASI) types are now proper idiomatic Rust types.
While we're here, in preparation for the ephemeral snapshot, I went
ahead and reorganised the internal structure of the crate. Instead of
modules like `hostcalls_impl` or `hostcalls_impl::fs`, the structure
now resembles that in ephemeral with modules like `path`, `fd`, etc.
Now, I'm not requiring we leave it like this, but I reckon it looks
cleaner this way after all.
* Fix wig to use new first-class access to caller's mem
* Ignore warning in proc_exit for the moment
* Group unsafes together in args and environ calls
* Simplify pwrite; more unsafe blocks
* Simplify fd_read
* Bundle up unsafes in fd_readdir
* Simplify fd_write
* Add comment to path_readlink re zero-len buffers
* Simplify unsafes in random_get
* Hide GuestPtr<str> to &str in path::get
* Rewrite pread and pwrite using SeekFrom and read/write_vectored
I've left the implementation of VirtualFs pretty much untouched
as I don't feel that comfortable in changing the API too much.
Having said that, I reckon `pread` and `pwrite` could be refactored
out, and `preadv` and `pwritev` could be entirely rewritten using
`seek` and `read_vectored` and `write_vectored`.
* Add comment about VirtFs unsafety
* Fix all mentions of FdEntry to Entry
* Fix warnings on Win
* Add aux struct EntryTable responsible for Fds and Entries
This commit adds aux struct `EntryTable` which is private to `WasiCtx`
and is basically responsible for `Fd` alloc/dealloc as well as storing
matching `Entry`s. This struct is entirely private to `WasiCtx` and
as such as should remain transparent to `WasiCtx` users.
* Remove redundant check for empty buffer in path_readlink
* Preserve and rewind file cursor in pread/pwrite
* Use GuestPtr<[u8]>::copy_from_slice wherever copying bytes directly
* Use GuestPtr<[u8]>::copy_from_slice in fd_readdir
* Clean up unsafes around WasiCtx accessors
* Fix bugs in args_get and environ_get
* Fix conflicts after rebase
5 years ago
|
|
|
"wiggle",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi-crypto"
|
|
|
|
version = "0.1.5"
|
|
|
|
dependencies = [
|
|
|
|
"aes-gcm",
|
|
|
|
"anyhow",
|
|
|
|
"bincode",
|
|
|
|
"byteorder",
|
|
|
|
"chacha20poly1305",
|
|
|
|
"curve25519-dalek",
|
|
|
|
"derivative",
|
|
|
|
"ed25519-dalek",
|
|
|
|
"hkdf",
|
|
|
|
"hmac",
|
|
|
|
"k256",
|
|
|
|
"p256",
|
|
|
|
"parking_lot",
|
|
|
|
"pqcrypto",
|
|
|
|
"rand_core 0.5.1",
|
|
|
|
"rand_core 0.6.3",
|
|
|
|
"rsa",
|
|
|
|
"serde",
|
|
|
|
"sha2",
|
|
|
|
"subtle",
|
|
|
|
"thiserror",
|
|
|
|
"xoodyak",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi-tokio"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cap-std",
|
|
|
|
"cap-tempfile",
|
|
|
|
"io-extras",
|
|
|
|
"io-lifetimes",
|
|
|
|
"rustix",
|
|
|
|
"tempfile",
|
|
|
|
"tokio",
|
|
|
|
"wasi-cap-std-sync",
|
|
|
|
"wasi-common",
|
|
|
|
"wiggle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen"
|
|
|
|
version = "0.2.80"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"wasm-bindgen-macro",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-backend"
|
|
|
|
version = "0.2.80"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4"
|
|
|
|
dependencies = [
|
|
|
|
"bumpalo",
|
|
|
|
"lazy_static",
|
|
|
|
"log",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
"wasm-bindgen-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-macro"
|
|
|
|
version = "0.2.80"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5"
|
|
|
|
dependencies = [
|
|
|
|
"quote",
|
|
|
|
"wasm-bindgen-macro-support",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-macro-support"
|
|
|
|
version = "0.2.80"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
"wasm-bindgen-backend",
|
|
|
|
"wasm-bindgen-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-shared"
|
|
|
|
version = "0.2.80"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-encoder"
|
|
|
|
version = "0.14.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f76068e87fe9b837a6bc2ccded66784173eadb828c4168643e9fddf6f9ed2e61"
|
|
|
|
dependencies = [
|
|
|
|
"leb128",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-mutate"
|
|
|
|
version = "0.2.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fde0df58bcb700325907d1b024b58de418bd9c48abf5de6f802ad63d28c7d08d"
|
|
|
|
dependencies = [
|
|
|
|
"egg",
|
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"thiserror",
|
|
|
|
"wasm-encoder",
|
|
|
|
"wasmparser",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-smith"
|
|
|
|
version = "0.11.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b73250e61e41d0e467b78559c7d761841005d724384bb0b78d52ff974acf5520"
|
|
|
|
dependencies = [
|
|
|
|
"arbitrary",
|
|
|
|
"flagset",
|
|
|
|
"indexmap",
|
|
|
|
"leb128",
|
|
|
|
"wasm-encoder",
|
|
|
|
"wasmparser",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-spec-interpreter"
|
|
|
|
version = "0.1.0"
|
|
|
|
dependencies = [
|
|
|
|
"ocaml-interop",
|
|
|
|
"once_cell",
|
|
|
|
"wat",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmi"
|
|
|
|
version = "0.11.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0a3cb58f98e4d6c944af18c2c9002f22d0b928dfbb8b6c2b7d78a8573a5216bf"
|
|
|
|
dependencies = [
|
|
|
|
"downcast-rs",
|
|
|
|
"libm",
|
|
|
|
"memory_units",
|
|
|
|
"num-rational",
|
|
|
|
"num-traits",
|
|
|
|
"parity-wasm",
|
|
|
|
"wasmi-validation",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmi-validation"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "165343ecd6c018fc09ebcae280752702c9a2ef3e6f8d02f1cfcbdb53ef6d7937"
|
|
|
|
dependencies = [
|
|
|
|
"parity-wasm",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmparser"
|
|
|
|
version = "0.87.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5c04e207cd2e8ecb6f9bd28a2cf3119b4c6bfeee6fe3a25cc1daf8041d00a875"
|
|
|
|
dependencies = [
|
|
|
|
"indexmap",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmprinter"
|
|
|
|
version = "0.2.37"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "550bde1d5aec6aa1584c9f227ca2ab60621e002a4b15b8bee83f92c7c516db87"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"wasmparser",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"async-trait",
|
|
|
|
"backtrace",
|
|
|
|
"bincode",
|
|
|
|
"cfg-if",
|
|
|
|
"indexmap",
|
|
|
|
"libc",
|
|
|
|
"log",
|
Use an mmap-friendly serialization format (#3257)
* Use an mmap-friendly serialization format
This commit reimplements the main serialization format for Wasmtime's
precompiled artifacts. Previously they were generally a binary blob of
`bincode`-encoded metadata prefixed with some versioning information.
The downside of this format, though, is that loading a precompiled
artifact required pushing all information through `bincode`. This is
inefficient when some data, such as trap/address tables, are rarely
accessed.
The new format added in this commit is one which is designed to be
`mmap`-friendly. This means that the relevant parts of the precompiled
artifact are already page-aligned for updating permissions of pieces
here and there. Additionally the artifact is optimized so that if data
is rarely read then we can delay reading it until necessary.
The new artifact format for serialized modules is an ELF file. This is
not a public API guarantee, so it cannot be relied upon. In the meantime
though this is quite useful for exploring precompiled modules with
standard tooling like `objdump`. The ELF file is already constructed as
part of module compilation, and this is the main contents of the
serialized artifact.
THere is some extra information, though, not encoded in each module's
individual ELF file such as type information. This information continues
to be `bincode`-encoded, but it's intended to be much smaller and much
faster to deserialize. This extra information is appended to the end of
the ELF file. This means that the original ELF file is still a valid ELF
file, we just get to have extra bits at the end. More information on the
new format can be found in the module docs of the serialization module
of Wasmtime.
Another refatoring implemented as part of this commit is to deserialize
and store object files directly in `mmap`-backed storage. This avoids
the need to copy bytes after the artifact is loaded into memory for each
compiled module, and in a future commit it opens up the door to avoiding
copying the text section into a `CodeMemory`. For now, though, the main
change is that copies are not necessary when loading from a precompiled
compilation artifact once the artifact is itself in mmap-based memory.
To assist with managing `mmap`-based memory a new `MmapVec` type was
added to `wasmtime_jit` which acts as a form of `Vec<T>` backed by a
`wasmtime_runtime::Mmap`. This type notably supports `drain(..N)` to
slice the buffer into disjoint regions that are all separately owned,
such as having a separately owned window into one artifact for all
object files contained within.
Finally this commit implements a small refactoring in `wasmtime-cache`
to use the standard artifact format for cache entries rather than a
bincode-encoded version. This required some more hooks for
serializing/deserializing but otherwise the crate still performs as
before.
* Review comments
3 years ago
|
|
|
"object",
|
|
|
|
"once_cell",
|
|
|
|
"paste",
|
|
|
|
"psm",
|
Add a cranelift compile-time feature to wasmtime (#3206)
* Remove unnecessary into_iter/map
Forgotten from a previous refactoring, this variable was already of the
right type!
* Move `wasmtime_jit::Compiler` into `wasmtime`
This `Compiler` struct is mostly a historical artifact at this point and
wasn't necessarily pulling much weight any more. This organization also
doesn't lend itself super well to compiling out `cranelift` when the
`Compiler` here is used for both parallel iteration configuration
settings as well as compilation.
The movement into `wasmtime` is relatively small, with
`Module::build_artifacts` being the main function added here which is a
merging of the previous functions removed from the `wasmtime-jit` crate.
* Add a `cranelift` compile-time feature to `wasmtime`
This commit concludes the saga of refactoring Wasmtime and making
Cranelift an optional dependency by adding a new Cargo feature to the
`wasmtime` crate called `cranelift`, which is enabled by default.
This feature is implemented by having a new cfg for `wasmtime` itself,
`cfg(compiler)`, which is used wherever compilation is necessary. This
bubbles up to disable APIs such as `Module::new`, `Func::new`,
`Engine::precompile_module`, and a number of `Config` methods affecting
compiler configuration. Checks are added to CI that when built in this
mode Wasmtime continues to successfully build. It's hoped that although
this is effectively "sprinkle `#[cfg]` until things compile" this won't
be too too bad to maintain over time since it's also an use case we're
interested in supporting.
With `cranelift` disabled the only way to create a `Module` is with the
`Module::deserialize` method, which requires some form of precompiled
artifact.
Two consequences of this change are:
* `Module::serialize` is also disabled in this mode. The reason for this
is that serialized modules contain ISA/shared flags encoded in them
which were used to produce the compiled code. There's no storage for
this if compilation is disabled. This could probably be re-enabled in
the future if necessary, but it may not end up being all that necessary.
* Deserialized modules are not checked to ensure that their ISA/shared
flags are compatible with the host CPU. This is actually already the
case, though, with normal modules. We'll likely want to fix this in
the future using a shared implementation for both these locations.
Documentation should be updated to indicate that `cranelift` can be
disabled, although it's not really the most prominent documentation
because this is expected to be a somewhat niche use case (albeit
important, just not too common).
* Always enable cranelift for the C API
* Fix doc example builds
* Fix check tests on GitHub Actions
3 years ago
|
|
|
"rayon",
|
|
|
|
"serde",
|
|
|
|
"target-lexicon",
|
Improve robustness of cache loading/storing (#974)
* Improve robustness of cache loading/storing
Today wasmtime incorrectly loads compiled compiled modules from the
global cache when toggling settings such as optimizations. For example
if you execute `wasmtime foo.wasm` that will cache globally an
unoptimized version of the wasm module. If you then execute `wasmtime -O
foo.wasm` it would then reload the unoptimized version from cache, not
realizing the compilation settings were different, and use that instead.
This can lead to very surprising behavior naturally!
This commit updates how the cache is managed in an attempt to make it
much more robust against these sorts of issues. This takes a leaf out of
rustc's playbook and models the cache with a function that looks like:
fn load<T: Hash>(
&self,
data: T,
compute: fn(T) -> CacheEntry,
) -> CacheEntry;
The goal here is that it guarantees that all the `data` necessary to
`compute` the result of the cache entry is hashable and stored into the
hash key entry. This was previously open-coded and manually managed
where items were hashed explicitly, but this construction guarantees
that everything reasonable `compute` could use to compile the module is
stored in `data`, which is itself hashable.
This refactoring then resulted in a few workarounds and a few fixes,
including the original issue:
* The `Module` type was split into `Module` and `ModuleLocal` where only
the latter is hashed. The previous hash function for a `Module` left
out items like the `start_func` and didn't hash items like the imports
of the module. Omitting the `start_func` was fine since compilation
didn't actually use it, but omitting imports seemed uncomfortable
because while compilation didn't use the import values it did use the
*number* of imports, which seems like it should then be put into the
cache key. The `ModuleLocal` type now derives `Hash` to guarantee that
all of its contents affect the hash key.
* The `ModuleTranslationState` from `cranelift-wasm` doesn't implement
`Hash` which means that we have a manual wrapper to work around that.
This will be fixed with an upstream implementation, since this state
affects the generated wasm code. Currently this is just a map of
signatures, which is present in `Module` anyway, so we should be good
for the time being.
* Hashing `dyn TargetIsa` was also added, where previously it was not
fully hashed. Previously only the target name was used as part of the
cache key, but crucially the flags of compilation were omitted (for
example the optimization flags). Unfortunately the trait object itself
is not hashable so we still have to manually write a wrapper to hash
it, but we likely want to add upstream some utilities to hash isa
objects into cranelift itself. For now though we can continue to add
hashed fields as necessary.
Overall the goal here was to use the compiler to expose what we're not
hashing, and then make sure we organize data and write the right code to
ensure everything is hashed, and nothing more.
* Update crates/environ/src/module.rs
Co-Authored-By: Peter Huene <peterhuene@protonmail.com>
* Fix lightbeam
* Fix compilation of tests
* Update the expected structure of the cache
* Revert "Update the expected structure of the cache"
This reverts commit 2b53fee426a4e411c313d8c1e424841ba304a9cd.
* Separate the cache dir a bit
* Add a test the cache is busted with opt levels
* rustfmt
Co-authored-by: Peter Huene <peterhuene@protonmail.com>
5 years ago
|
|
|
"tempfile",
|
|
|
|
"wasi-cap-std-sync",
|
|
|
|
"wasmparser",
|
|
|
|
"wasmtime-cache",
|
|
|
|
"wasmtime-component-macro",
|
support dynamic function calls in component model (#4442)
* support dynamic function calls in component model
This addresses #4310, introducing a new `component::values::Val` type for
representing component values dynamically, as well as `component::types::Type`
for representing the corresponding interface types. It also adds a `call` method
to `component::func::Func`, which takes a slice of `Val`s as parameters and
returns a `Result<Val>` representing the result.
Note that I've moved `post_return` and `call_raw` from `TypedFunc` to `Func`
since there was nothing specific to `TypedFunc` about them, and I wanted to
reuse them. The code in both is unchanged beyond the trivial tweaks to make
them fit in their new home.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* order variants and match cases more consistently
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* implement lift for String, Box<str>, etc.
This also removes the redundant `store` parameter from `Type::load`.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* implement code review feedback
This fixes a few issues:
- Bad offset calculation when lowering
- Missing variant padding
- Style issues regarding `types::Handle`
- Missed opportunities to reuse `Lift` and `Lower` impls
It also adds forwarding `Lift` impls for `Box<[T]>`, `Vec<T>`, etc.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* move `new_*` methods to specific `types` structs
Per review feedback, I've moved `Type::new_record` to `Record::new_val` and
added a `Type::unwrap_record` method; likewise for the other kinds of types.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* make tuple, option, and expected type comparisons recursive
These types should compare as equal across component boundaries as long as their
type parameters are equal.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* improve error diagnostic in `Type::check`
We now distinguish between more failure cases to provide an informative error
message.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* address review feedback
- Remove `WasmStr::to_str_from_memory` and `WasmList::get_from_memory`
- add `try_new` methods to various `values` types
- avoid using `ExactSizeIterator::len` where we can't trust it
- fix over-constrained bounds on forwarded `ComponentType` impls
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* rearrange code per review feedback
- Move functions from `types` to `values` module so we can make certain struct fields private
- Rename `try_new` to just `new`
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* remove special-case equality test for tuples, options, and expecteds
Instead, I've added a FIXME comment and will open an issue to do recursive
structural equality testing.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
2 years ago
|
|
|
"wasmtime-component-util",
|
Add a cranelift compile-time feature to wasmtime (#3206)
* Remove unnecessary into_iter/map
Forgotten from a previous refactoring, this variable was already of the
right type!
* Move `wasmtime_jit::Compiler` into `wasmtime`
This `Compiler` struct is mostly a historical artifact at this point and
wasn't necessarily pulling much weight any more. This organization also
doesn't lend itself super well to compiling out `cranelift` when the
`Compiler` here is used for both parallel iteration configuration
settings as well as compilation.
The movement into `wasmtime` is relatively small, with
`Module::build_artifacts` being the main function added here which is a
merging of the previous functions removed from the `wasmtime-jit` crate.
* Add a `cranelift` compile-time feature to `wasmtime`
This commit concludes the saga of refactoring Wasmtime and making
Cranelift an optional dependency by adding a new Cargo feature to the
`wasmtime` crate called `cranelift`, which is enabled by default.
This feature is implemented by having a new cfg for `wasmtime` itself,
`cfg(compiler)`, which is used wherever compilation is necessary. This
bubbles up to disable APIs such as `Module::new`, `Func::new`,
`Engine::precompile_module`, and a number of `Config` methods affecting
compiler configuration. Checks are added to CI that when built in this
mode Wasmtime continues to successfully build. It's hoped that although
this is effectively "sprinkle `#[cfg]` until things compile" this won't
be too too bad to maintain over time since it's also an use case we're
interested in supporting.
With `cranelift` disabled the only way to create a `Module` is with the
`Module::deserialize` method, which requires some form of precompiled
artifact.
Two consequences of this change are:
* `Module::serialize` is also disabled in this mode. The reason for this
is that serialized modules contain ISA/shared flags encoded in them
which were used to produce the compiled code. There's no storage for
this if compilation is disabled. This could probably be re-enabled in
the future if necessary, but it may not end up being all that necessary.
* Deserialized modules are not checked to ensure that their ISA/shared
flags are compatible with the host CPU. This is actually already the
case, though, with normal modules. We'll likely want to fix this in
the future using a shared implementation for both these locations.
Documentation should be updated to indicate that `cranelift` can be
disabled, although it's not really the most prominent documentation
because this is expected to be a somewhat niche use case (albeit
important, just not too common).
* Always enable cranelift for the C API
* Fix doc example builds
* Fix check tests on GitHub Actions
3 years ago
|
|
|
"wasmtime-cranelift",
|
|
|
|
"wasmtime-environ",
|
|
|
|
"wasmtime-fiber",
|
|
|
|
"wasmtime-jit",
|
|
|
|
"wasmtime-runtime",
|
|
|
|
"wasmtime-wasi",
|
|
|
|
"wat",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-asm-macros"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-bench-api"
|
|
|
|
version = "0.19.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cap-std",
|
|
|
|
"shuffling-allocator",
|
|
|
|
"target-lexicon",
|
|
|
|
"wasi-cap-std-sync",
|
|
|
|
"wasmtime",
|
|
|
|
"wasmtime-cli-flags",
|
|
|
|
"wasmtime-wasi",
|
|
|
|
"wasmtime-wasi-crypto",
|
|
|
|
"wasmtime-wasi-nn",
|
|
|
|
"wat",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-c-api"
|
|
|
|
version = "0.19.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cap-std",
|
|
|
|
"env_logger 0.9.0",
|
|
|
|
"once_cell",
|
|
|
|
"wasi-cap-std-sync",
|
|
|
|
"wasmtime",
|
|
|
|
"wasmtime-c-api-macros",
|
|
|
|
"wasmtime-wasi",
|
|
|
|
"wat",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-c-api-macros"
|
|
|
|
version = "0.19.0"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-cache"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"base64",
|
|
|
|
"bincode",
|
|
|
|
"directories-next",
|
|
|
|
"file-per-thread-logger",
|
|
|
|
"filetime",
|
|
|
|
"log",
|
|
|
|
"more-asserts",
|
|
|
|
"once_cell",
|
|
|
|
"pretty_env_logger",
|
|
|
|
"rustix",
|
|
|
|
"serde",
|
|
|
|
"sha2",
|
|
|
|
"tempfile",
|
|
|
|
"toml",
|
|
|
|
"windows-sys",
|
|
|
|
"zstd",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-cli"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"async-trait",
|
|
|
|
"clap 3.2.8",
|
|
|
|
"component-macro-test",
|
|
|
|
"criterion",
|
|
|
|
"env_logger 0.9.0",
|
|
|
|
"filecheck",
|
|
|
|
"humantime 2.1.0",
|
|
|
|
"libc",
|
|
|
|
"listenfd",
|
Use an mmap-friendly serialization format (#3257)
* Use an mmap-friendly serialization format
This commit reimplements the main serialization format for Wasmtime's
precompiled artifacts. Previously they were generally a binary blob of
`bincode`-encoded metadata prefixed with some versioning information.
The downside of this format, though, is that loading a precompiled
artifact required pushing all information through `bincode`. This is
inefficient when some data, such as trap/address tables, are rarely
accessed.
The new format added in this commit is one which is designed to be
`mmap`-friendly. This means that the relevant parts of the precompiled
artifact are already page-aligned for updating permissions of pieces
here and there. Additionally the artifact is optimized so that if data
is rarely read then we can delay reading it until necessary.
The new artifact format for serialized modules is an ELF file. This is
not a public API guarantee, so it cannot be relied upon. In the meantime
though this is quite useful for exploring precompiled modules with
standard tooling like `objdump`. The ELF file is already constructed as
part of module compilation, and this is the main contents of the
serialized artifact.
THere is some extra information, though, not encoded in each module's
individual ELF file such as type information. This information continues
to be `bincode`-encoded, but it's intended to be much smaller and much
faster to deserialize. This extra information is appended to the end of
the ELF file. This means that the original ELF file is still a valid ELF
file, we just get to have extra bits at the end. More information on the
new format can be found in the module docs of the serialization module
of Wasmtime.
Another refatoring implemented as part of this commit is to deserialize
and store object files directly in `mmap`-backed storage. This avoids
the need to copy bytes after the artifact is loaded into memory for each
compiled module, and in a future commit it opens up the door to avoiding
copying the text section into a `CodeMemory`. For now, though, the main
change is that copies are not necessary when loading from a precompiled
compilation artifact once the artifact is itself in mmap-based memory.
To assist with managing `mmap`-based memory a new `MmapVec` type was
added to `wasmtime_jit` which acts as a form of `Vec<T>` backed by a
`wasmtime_runtime::Mmap`. This type notably supports `drain(..N)` to
slice the buffer into disjoint regions that are all separately owned,
such as having a separately owned window into one artifact for all
object files contained within.
Finally this commit implements a small refactoring in `wasmtime-cache`
to use the standard artifact format for cache entries rather than a
bincode-encoded version. This required some more hooks for
serializing/deserializing but otherwise the crate still performs as
before.
* Review comments
3 years ago
|
|
|
"memchr",
|
|
|
|
"more-asserts",
|
|
|
|
"num_cpus",
|
|
|
|
"once_cell",
|
|
|
|
"rayon",
|
|
|
|
"rustix",
|
|
|
|
"target-lexicon",
|
|
|
|
"tempfile",
|
|
|
|
"test-programs",
|
|
|
|
"tokio",
|
|
|
|
"tracing-subscriber",
|
|
|
|
"wasmtime",
|
|
|
|
"wasmtime-cache",
|
|
|
|
"wasmtime-cli-flags",
|
Add a cranelift compile-time feature to wasmtime (#3206)
* Remove unnecessary into_iter/map
Forgotten from a previous refactoring, this variable was already of the
right type!
* Move `wasmtime_jit::Compiler` into `wasmtime`
This `Compiler` struct is mostly a historical artifact at this point and
wasn't necessarily pulling much weight any more. This organization also
doesn't lend itself super well to compiling out `cranelift` when the
`Compiler` here is used for both parallel iteration configuration
settings as well as compilation.
The movement into `wasmtime` is relatively small, with
`Module::build_artifacts` being the main function added here which is a
merging of the previous functions removed from the `wasmtime-jit` crate.
* Add a `cranelift` compile-time feature to `wasmtime`
This commit concludes the saga of refactoring Wasmtime and making
Cranelift an optional dependency by adding a new Cargo feature to the
`wasmtime` crate called `cranelift`, which is enabled by default.
This feature is implemented by having a new cfg for `wasmtime` itself,
`cfg(compiler)`, which is used wherever compilation is necessary. This
bubbles up to disable APIs such as `Module::new`, `Func::new`,
`Engine::precompile_module`, and a number of `Config` methods affecting
compiler configuration. Checks are added to CI that when built in this
mode Wasmtime continues to successfully build. It's hoped that although
this is effectively "sprinkle `#[cfg]` until things compile" this won't
be too too bad to maintain over time since it's also an use case we're
interested in supporting.
With `cranelift` disabled the only way to create a `Module` is with the
`Module::deserialize` method, which requires some form of precompiled
artifact.
Two consequences of this change are:
* `Module::serialize` is also disabled in this mode. The reason for this
is that serialized modules contain ISA/shared flags encoded in them
which were used to produce the compiled code. There's no storage for
this if compilation is disabled. This could probably be re-enabled in
the future if necessary, but it may not end up being all that necessary.
* Deserialized modules are not checked to ensure that their ISA/shared
flags are compatible with the host CPU. This is actually already the
case, though, with normal modules. We'll likely want to fix this in
the future using a shared implementation for both these locations.
Documentation should be updated to indicate that `cranelift` can be
disabled, although it's not really the most prominent documentation
because this is expected to be a somewhat niche use case (albeit
important, just not too common).
* Always enable cranelift for the C API
* Fix doc example builds
* Fix check tests on GitHub Actions
3 years ago
|
|
|
"wasmtime-cranelift",
|
|
|
|
"wasmtime-environ",
|
|
|
|
"wasmtime-runtime",
|
|
|
|
"wasmtime-wasi",
|
|
|
|
"wasmtime-wasi-crypto",
|
|
|
|
"wasmtime-wasi-nn",
|
|
|
|
"wasmtime-wast",
|
|
|
|
"wast 43.0.0",
|
|
|
|
"wat",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-cli-flags"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"clap 3.2.8",
|
|
|
|
"file-per-thread-logger",
|
|
|
|
"pretty_env_logger",
|
|
|
|
"rayon",
|
|
|
|
"wasmtime",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-component-macro"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
support dynamic function calls in component model (#4442)
* support dynamic function calls in component model
This addresses #4310, introducing a new `component::values::Val` type for
representing component values dynamically, as well as `component::types::Type`
for representing the corresponding interface types. It also adds a `call` method
to `component::func::Func`, which takes a slice of `Val`s as parameters and
returns a `Result<Val>` representing the result.
Note that I've moved `post_return` and `call_raw` from `TypedFunc` to `Func`
since there was nothing specific to `TypedFunc` about them, and I wanted to
reuse them. The code in both is unchanged beyond the trivial tweaks to make
them fit in their new home.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* order variants and match cases more consistently
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* implement lift for String, Box<str>, etc.
This also removes the redundant `store` parameter from `Type::load`.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* implement code review feedback
This fixes a few issues:
- Bad offset calculation when lowering
- Missing variant padding
- Style issues regarding `types::Handle`
- Missed opportunities to reuse `Lift` and `Lower` impls
It also adds forwarding `Lift` impls for `Box<[T]>`, `Vec<T>`, etc.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* move `new_*` methods to specific `types` structs
Per review feedback, I've moved `Type::new_record` to `Record::new_val` and
added a `Type::unwrap_record` method; likewise for the other kinds of types.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* make tuple, option, and expected type comparisons recursive
These types should compare as equal across component boundaries as long as their
type parameters are equal.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* improve error diagnostic in `Type::check`
We now distinguish between more failure cases to provide an informative error
message.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* address review feedback
- Remove `WasmStr::to_str_from_memory` and `WasmList::get_from_memory`
- add `try_new` methods to various `values` types
- avoid using `ExactSizeIterator::len` where we can't trust it
- fix over-constrained bounds on forwarded `ComponentType` impls
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* rearrange code per review feedback
- Move functions from `types` to `values` module so we can make certain struct fields private
- Rename `try_new` to just `new`
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* remove special-case equality test for tuples, options, and expecteds
Instead, I've added a FIXME comment and will open an issue to do recursive
structural equality testing.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
2 years ago
|
|
|
"wasmtime-component-util",
|
|
|
|
]
|
|
|
|
|
support dynamic function calls in component model (#4442)
* support dynamic function calls in component model
This addresses #4310, introducing a new `component::values::Val` type for
representing component values dynamically, as well as `component::types::Type`
for representing the corresponding interface types. It also adds a `call` method
to `component::func::Func`, which takes a slice of `Val`s as parameters and
returns a `Result<Val>` representing the result.
Note that I've moved `post_return` and `call_raw` from `TypedFunc` to `Func`
since there was nothing specific to `TypedFunc` about them, and I wanted to
reuse them. The code in both is unchanged beyond the trivial tweaks to make
them fit in their new home.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* order variants and match cases more consistently
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* implement lift for String, Box<str>, etc.
This also removes the redundant `store` parameter from `Type::load`.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* implement code review feedback
This fixes a few issues:
- Bad offset calculation when lowering
- Missing variant padding
- Style issues regarding `types::Handle`
- Missed opportunities to reuse `Lift` and `Lower` impls
It also adds forwarding `Lift` impls for `Box<[T]>`, `Vec<T>`, etc.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* move `new_*` methods to specific `types` structs
Per review feedback, I've moved `Type::new_record` to `Record::new_val` and
added a `Type::unwrap_record` method; likewise for the other kinds of types.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* make tuple, option, and expected type comparisons recursive
These types should compare as equal across component boundaries as long as their
type parameters are equal.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* improve error diagnostic in `Type::check`
We now distinguish between more failure cases to provide an informative error
message.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* address review feedback
- Remove `WasmStr::to_str_from_memory` and `WasmList::get_from_memory`
- add `try_new` methods to various `values` types
- avoid using `ExactSizeIterator::len` where we can't trust it
- fix over-constrained bounds on forwarded `ComponentType` impls
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* rearrange code per review feedback
- Move functions from `types` to `values` module so we can make certain struct fields private
- Rename `try_new` to just `new`
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* remove special-case equality test for tuples, options, and expecteds
Instead, I've added a FIXME comment and will open an issue to do recursive
structural equality testing.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
2 years ago
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-component-util"
|
|
|
|
version = "0.40.0"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-cranelift"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-entity",
|
|
|
|
"cranelift-frontend",
|
|
|
|
"cranelift-native",
|
|
|
|
"cranelift-wasm",
|
|
|
|
"gimli",
|
|
|
|
"log",
|
|
|
|
"more-asserts",
|
|
|
|
"object",
|
|
|
|
"target-lexicon",
|
|
|
|
"thiserror",
|
|
|
|
"wasmparser",
|
|
|
|
"wasmtime-environ",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-environ"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"cranelift-entity",
|
|
|
|
"gimli",
|
|
|
|
"indexmap",
|
|
|
|
"log",
|
|
|
|
"more-asserts",
|
|
|
|
"object",
|
|
|
|
"serde",
|
|
|
|
"target-lexicon",
|
|
|
|
"thiserror",
|
|
|
|
"wasmparser",
|
Remove `wasmtime-environ`'s dependency on `cranelift-codegen` (#3199)
* Move `CompiledFunction` into wasmtime-cranelift
This commit moves the `wasmtime_environ::CompiledFunction` type into the
`wasmtime-cranelift` crate. This type has lots of Cranelift-specific
pieces of compilation and doesn't need to be generated by all Wasmtime
compilers. This replaces the usage in the `Compiler` trait with a
`Box<Any>` type that each compiler can select. Each compiler must still
produce a `FunctionInfo`, however, which is shared information we'll
deserialize for each module.
The `wasmtime-debug` crate is also folded into the `wasmtime-cranelift`
crate as a result of this commit. One possibility was to move the
`CompiledFunction` commit into its own crate and have `wasmtime-debug`
depend on that, but since `wasmtime-debug` is Cranelift-specific at this
time it didn't seem like it was too too necessary to keep it separate.
If `wasmtime-debug` supports other backends in the future we can
recreate a new crate, perhaps with it refactored to not depend on
Cranelift.
* Move wasmtime_environ::reference_type
This now belongs in wasmtime-cranelift and nowhere else
* Remove `Type` reexport in wasmtime-environ
One less dependency on `cranelift-codegen`!
* Remove `types` reexport from `wasmtime-environ`
Less cranelift!
* Remove `SourceLoc` from wasmtime-environ
Change the `srcloc`, `start_srcloc`, and `end_srcloc` fields to a custom
`FilePos` type instead of `ir::SourceLoc`. These are only used in a few
places so there's not much to lose from an extra abstraction for these
leaf use cases outside of cranelift.
* Remove wasmtime-environ's dep on cranelift's `StackMap`
This commit "clones" the `StackMap` data structure in to
`wasmtime-environ` to have an independent representation that that
chosen by Cranelift. This allows Wasmtime to decouple this runtime
dependency of stack map information and let the two evolve
independently, if necessary.
An alternative would be to refactor cranelift's implementation into a
separate crate and have wasmtime depend on that but it seemed a bit like
overkill to do so and easier to clone just a few lines for this.
* Define code offsets in wasmtime-environ with `u32`
Don't use Cranelift's `binemit::CodeOffset` alias to define this field
type since the `wasmtime-environ` crate will be losing the
`cranelift-codegen` dependency soon.
* Commit to using `cranelift-entity` in Wasmtime
This commit removes the reexport of `cranelift-entity` from the
`wasmtime-environ` crate and instead directly depends on the
`cranelift-entity` crate in all referencing crates. The original reason
for the reexport was to make cranelift version bumps easier since it's
less versions to change, but nowadays we have a script to do that.
Otherwise this encourages crates to use whatever they want from
`cranelift-entity` since we'll always depend on the whole crate.
It's expected that the `cranelift-entity` crate will continue to be a
lean crate in dependencies and suitable for use at both runtime and
compile time. Consequently there's no need to avoid its usage in
Wasmtime at runtime, since "remove Cranelift at compile time" is
primarily about the `cranelift-codegen` crate.
* Remove most uses of `cranelift-codegen` in `wasmtime-environ`
There's only one final use remaining, which is the reexport of
`TrapCode`, which will get handled later.
* Limit the glob-reexport of `cranelift_wasm`
This commit removes the glob reexport of `cranelift-wasm` from the
`wasmtime-environ` crate. This is intended to explicitly define what
we're reexporting and is a transitionary step to curtail the amount of
dependencies taken on `cranelift-wasm` throughout the codebase. For
example some functions used by debuginfo mapping are better imported
directly from the crate since they're Cranelift-specific. Note that
this is intended to be a temporary state affairs, soon this reexport
will be gone entirely.
Additionally this commit reduces imports from `cranelift_wasm` and also
primarily imports from `crate::wasm` within `wasmtime-environ` to get a
better sense of what's imported from where and what will need to be
shared.
* Extract types from cranelift-wasm to cranelift-wasm-types
This commit creates a new crate called `cranelift-wasm-types` and
extracts type definitions from the `cranelift-wasm` crate into this new
crate. The purpose of this crate is to be a shared definition of wasm
types that can be shared both by compilers (like Cranelift) as well as
wasm runtimes (e.g. Wasmtime). This new `cranelift-wasm-types` crate
doesn't depend on `cranelift-codegen` and is the final step in severing
the unconditional dependency from Wasmtime to `cranelift-codegen`.
The final refactoring in this commit is to then reexport this crate from
`wasmtime-environ`, delete the `cranelift-codegen` dependency, and then
update all `use` paths to point to these new types.
The main change of substance here is that the `TrapCode` enum is
mirrored from Cranelift into this `cranelift-wasm-types` crate. While
this unfortunately results in three definitions (one more which is
non-exhaustive in Wasmtime itself) it's hopefully not too onerous and
ideally something we can patch up in the future.
* Get lightbeam compiling
* Remove unnecessary dependency
* Fix compile with uffd
* Update publish script
* Fix more uffd tests
* Rename cranelift-wasm-types to wasmtime-types
This reflects the purpose a bit more where it's types specifically
intended for Wasmtime and its support.
* Fix publish script
3 years ago
|
|
|
"wasmtime-types",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-fiber"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"backtrace",
|
|
|
|
"cc",
|
|
|
|
"cfg-if",
|
|
|
|
"rustix",
|
|
|
|
"wasmtime-asm-macros",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-fuzz"
|
|
|
|
version = "0.0.0"
|
|
|
|
dependencies = [
|
|
|
|
"cranelift-codegen",
|
|
|
|
"cranelift-filetests",
|
|
|
|
"cranelift-fuzzgen",
|
|
|
|
"cranelift-interpreter",
|
|
|
|
"cranelift-reader",
|
|
|
|
"cranelift-wasm",
|
|
|
|
"libfuzzer-sys",
|
|
|
|
"target-lexicon",
|
|
|
|
"wasmtime",
|
|
|
|
"wasmtime-fuzzing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-fuzzing"
|
|
|
|
version = "0.19.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"arbitrary",
|
|
|
|
"env_logger 0.9.0",
|
|
|
|
"log",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rayon",
|
|
|
|
"target-lexicon",
|
|
|
|
"tempfile",
|
|
|
|
"v8",
|
|
|
|
"wasm-encoder",
|
|
|
|
"wasm-mutate",
|
|
|
|
"wasm-smith",
|
|
|
|
"wasm-spec-interpreter",
|
|
|
|
"wasmi",
|
|
|
|
"wasmparser",
|
|
|
|
"wasmprinter",
|
|
|
|
"wasmtime",
|
|
|
|
"wasmtime-wast",
|
|
|
|
"wat",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-jit"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"addr2line",
|
|
|
|
"anyhow",
|
|
|
|
"bincode",
|
|
|
|
"cfg-if",
|
|
|
|
"cpp_demangle",
|
|
|
|
"gimli",
|
|
|
|
"ittapi",
|
|
|
|
"log",
|
|
|
|
"object",
|
|
|
|
"rustc-demangle",
|
|
|
|
"rustix",
|
|
|
|
"serde",
|
|
|
|
"target-lexicon",
|
|
|
|
"thiserror",
|
|
|
|
"wasmtime-environ",
|
|
|
|
"wasmtime-jit-debug",
|
|
|
|
"wasmtime-runtime",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-jit-debug"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"object",
|
|
|
|
"once_cell",
|
|
|
|
"rustix",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-runtime"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"backtrace",
|
|
|
|
"cc",
|
|
|
|
"cfg-if",
|
|
|
|
"indexmap",
|
|
|
|
"libc",
|
externref: implement stack map-based garbage collection
For host VM code, we use plain reference counting, where cloning increments
the reference count, and dropping decrements it. We can avoid many of the
on-stack increment/decrement operations that typically plague the
performance of reference counting via Rust's ownership and borrowing system.
Moving a `VMExternRef` avoids mutating its reference count, and borrowing it
either avoids the reference count increment or delays it until if/when the
`VMExternRef` is cloned.
When passing a `VMExternRef` into compiled Wasm code, we don't want to do
reference count mutations for every compiled `local.{get,set}`, nor for
every function call. Therefore, we use a variation of **deferred reference
counting**, where we only mutate reference counts when storing
`VMExternRef`s somewhere that outlives the activation: into a global or
table. Simultaneously, we over-approximate the set of `VMExternRef`s that
are inside Wasm function activations. Periodically, we walk the stack at GC
safe points, and use stack map information to precisely identify the set of
`VMExternRef`s inside Wasm activations. Then we take the difference between
this precise set and our over-approximation, and decrement the reference
count for each of the `VMExternRef`s that are in our over-approximation but
not in the precise set. Finally, the over-approximation is replaced with the
precise set.
The `VMExternRefActivationsTable` implements the over-approximized set of
`VMExternRef`s referenced by Wasm activations. Calling a Wasm function and
passing it a `VMExternRef` moves the `VMExternRef` into the table, and the
compiled Wasm function logically "borrows" the `VMExternRef` from the
table. Similarly, `global.get` and `table.get` operations clone the gotten
`VMExternRef` into the `VMExternRefActivationsTable` and then "borrow" the
reference out of the table.
When a `VMExternRef` is returned to host code from a Wasm function, the host
increments the reference count (because the reference is logically
"borrowed" from the `VMExternRefActivationsTable` and the reference count
from the table will be dropped at the next GC).
For more general information on deferred reference counting, see *An
Examination of Deferred Reference Counting and Cycle Detection* by Quinane:
https://openresearch-repository.anu.edu.au/bitstream/1885/42030/2/hon-thesis.pdf
cc #929
Fixes #1804
4 years ago
|
|
|
"log",
|
Mach ports continued + support aarch64-apple unwinding (#2723)
* Switch macOS to using mach ports for trap handling
This commit moves macOS to using mach ports instead of signals for
handling traps. The motivation for this is listed in #2456, namely that
once mach ports are used in a process that means traditional UNIX signal
handlers won't get used. This means that if Wasmtime is integrated with
Breakpad, for example, then Wasmtime's trap handler never fires and
traps don't work.
The `traphandlers` module is refactored as part of this commit to split
the platform-specific bits into their own files (it was growing quite a
lot for one inline `cfg_if!`). The `unix.rs` and `windows.rs` files
remain the same as they were before with a few minor tweaks for some
refactored interfaces. The `macos.rs` file is brand new and lifts almost
its entire implementation from SpiderMonkey, adapted for Wasmtime
though.
The main gotcha with mach ports is that a separate thread is what
services the exception. Some unsafe magic allows this separate thread to
read non-`Send` and temporary state from other threads, but is hoped to
be safe in this context. The unfortunate downside is that calling wasm
on macOS now involves taking a global lock and modifying a global hash
map twice-per-call. I'm not entirely sure how to get out of this cost
for now, but hopefully for any embeddings on macOS it's not the end of
the world.
Closes #2456
* Add a sketch of arm64 apple support
* store: maintain CallThreadState mapping when switching fibers
* cranelift/aarch64: generate unwind directives to disable pointer auth
Aarch64 post ARMv8.3 has a feature called pointer authentication,
designed to fight ROP/JOP attacks: some pointers may be signed using new
instructions, adding payloads to the high (previously unused) bits of
the pointers. More on this here: https://lwn.net/Articles/718888/
Unwinders on aarch64 need to know if some pointers contained on the call
frame contain an authentication code or not, to be able to properly
authenticate them or use them directly. Since native code may have
enabled it by default (as is the case on the Mac M1), and the default is
that this configuration value is inherited, we need to explicitly
disable it, for the only kind of supported pointers (return addresses).
To do so, we set the value of a non-existing dwarf pseudo register (34)
to 0, as documented in
https://github.com/ARM-software/abi-aa/blob/master/aadwarf64/aadwarf64.rst#note-8.
This is done at the function granularity, in the spirit of Cranelift
compilation model. Alternatively, a single directive could be generated
in the CIE, generating less information per module.
* Make exception handling work on Mac aarch64 too
* fibers: use a breakpoint instruction after the final call in wasmtime_fiber_start
Co-authored-by: Alex Crichton <alex@alexcrichton.com>
4 years ago
|
|
|
"mach",
|
Add a pooling allocator mode based on copy-on-write mappings of memfds.
As first suggested by Jan on the Zulip here [1], a cheap and effective
way to obtain copy-on-write semantics of a "backing image" for a Wasm
memory is to mmap a file with `MAP_PRIVATE`. The `memfd` mechanism
provided by the Linux kernel allows us to create anonymous,
in-memory-only files that we can use for this mapping, so we can
construct the image contents on-the-fly then effectively create a CoW
overlay. Furthermore, and importantly, `madvise(MADV_DONTNEED, ...)`
will discard the CoW overlay, returning the mapping to its original
state.
By itself this is almost enough for a very fast
instantiation-termination loop of the same image over and over,
without changing the address space mapping at all (which is
expensive). The only missing bit is how to implement
heap *growth*. But here memfds can help us again: if we create another
anonymous file and map it where the extended parts of the heap would
go, we can take advantage of the fact that a `mmap()` mapping can
be *larger than the file itself*, with accesses beyond the end
generating a `SIGBUS`, and the fact that we can cheaply resize the
file with `ftruncate`, even after a mapping exists. So we can map the
"heap extension" file once with the maximum memory-slot size and grow
the memfd itself as `memory.grow` operations occur.
The above CoW technique and heap-growth technique together allow us a
fastpath of `madvise()` and `ftruncate()` only when we re-instantiate
the same module over and over, as long as we can reuse the same
slot. This fastpath avoids all whole-process address-space locks in
the Linux kernel, which should mean it is highly scalable. It also
avoids the cost of copying data on read, as the `uffd` heap backend
does when servicing pagefaults; the kernel's own optimized CoW
logic (same as used by all file mmaps) is used instead.
[1] https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general/topic/Copy.20on.20write.20based.20instance.20reuse/near/266657772
3 years ago
|
|
|
"memfd",
|
|
|
|
"memoffset",
|
|
|
|
"more-asserts",
|
|
|
|
"rand 0.8.5",
|
|
|
|
"rustix",
|
|
|
|
"thiserror",
|
|
|
|
"wasmtime-environ",
|
|
|
|
"wasmtime-fiber",
|
|
|
|
"wasmtime-jit-debug",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
Remove `wasmtime-environ`'s dependency on `cranelift-codegen` (#3199)
* Move `CompiledFunction` into wasmtime-cranelift
This commit moves the `wasmtime_environ::CompiledFunction` type into the
`wasmtime-cranelift` crate. This type has lots of Cranelift-specific
pieces of compilation and doesn't need to be generated by all Wasmtime
compilers. This replaces the usage in the `Compiler` trait with a
`Box<Any>` type that each compiler can select. Each compiler must still
produce a `FunctionInfo`, however, which is shared information we'll
deserialize for each module.
The `wasmtime-debug` crate is also folded into the `wasmtime-cranelift`
crate as a result of this commit. One possibility was to move the
`CompiledFunction` commit into its own crate and have `wasmtime-debug`
depend on that, but since `wasmtime-debug` is Cranelift-specific at this
time it didn't seem like it was too too necessary to keep it separate.
If `wasmtime-debug` supports other backends in the future we can
recreate a new crate, perhaps with it refactored to not depend on
Cranelift.
* Move wasmtime_environ::reference_type
This now belongs in wasmtime-cranelift and nowhere else
* Remove `Type` reexport in wasmtime-environ
One less dependency on `cranelift-codegen`!
* Remove `types` reexport from `wasmtime-environ`
Less cranelift!
* Remove `SourceLoc` from wasmtime-environ
Change the `srcloc`, `start_srcloc`, and `end_srcloc` fields to a custom
`FilePos` type instead of `ir::SourceLoc`. These are only used in a few
places so there's not much to lose from an extra abstraction for these
leaf use cases outside of cranelift.
* Remove wasmtime-environ's dep on cranelift's `StackMap`
This commit "clones" the `StackMap` data structure in to
`wasmtime-environ` to have an independent representation that that
chosen by Cranelift. This allows Wasmtime to decouple this runtime
dependency of stack map information and let the two evolve
independently, if necessary.
An alternative would be to refactor cranelift's implementation into a
separate crate and have wasmtime depend on that but it seemed a bit like
overkill to do so and easier to clone just a few lines for this.
* Define code offsets in wasmtime-environ with `u32`
Don't use Cranelift's `binemit::CodeOffset` alias to define this field
type since the `wasmtime-environ` crate will be losing the
`cranelift-codegen` dependency soon.
* Commit to using `cranelift-entity` in Wasmtime
This commit removes the reexport of `cranelift-entity` from the
`wasmtime-environ` crate and instead directly depends on the
`cranelift-entity` crate in all referencing crates. The original reason
for the reexport was to make cranelift version bumps easier since it's
less versions to change, but nowadays we have a script to do that.
Otherwise this encourages crates to use whatever they want from
`cranelift-entity` since we'll always depend on the whole crate.
It's expected that the `cranelift-entity` crate will continue to be a
lean crate in dependencies and suitable for use at both runtime and
compile time. Consequently there's no need to avoid its usage in
Wasmtime at runtime, since "remove Cranelift at compile time" is
primarily about the `cranelift-codegen` crate.
* Remove most uses of `cranelift-codegen` in `wasmtime-environ`
There's only one final use remaining, which is the reexport of
`TrapCode`, which will get handled later.
* Limit the glob-reexport of `cranelift_wasm`
This commit removes the glob reexport of `cranelift-wasm` from the
`wasmtime-environ` crate. This is intended to explicitly define what
we're reexporting and is a transitionary step to curtail the amount of
dependencies taken on `cranelift-wasm` throughout the codebase. For
example some functions used by debuginfo mapping are better imported
directly from the crate since they're Cranelift-specific. Note that
this is intended to be a temporary state affairs, soon this reexport
will be gone entirely.
Additionally this commit reduces imports from `cranelift_wasm` and also
primarily imports from `crate::wasm` within `wasmtime-environ` to get a
better sense of what's imported from where and what will need to be
shared.
* Extract types from cranelift-wasm to cranelift-wasm-types
This commit creates a new crate called `cranelift-wasm-types` and
extracts type definitions from the `cranelift-wasm` crate into this new
crate. The purpose of this crate is to be a shared definition of wasm
types that can be shared both by compilers (like Cranelift) as well as
wasm runtimes (e.g. Wasmtime). This new `cranelift-wasm-types` crate
doesn't depend on `cranelift-codegen` and is the final step in severing
the unconditional dependency from Wasmtime to `cranelift-codegen`.
The final refactoring in this commit is to then reexport this crate from
`wasmtime-environ`, delete the `cranelift-codegen` dependency, and then
update all `use` paths to point to these new types.
The main change of substance here is that the `TrapCode` enum is
mirrored from Cranelift into this `cranelift-wasm-types` crate. While
this unfortunately results in three definitions (one more which is
non-exhaustive in Wasmtime itself) it's hopefully not too onerous and
ideally something we can patch up in the future.
* Get lightbeam compiling
* Remove unnecessary dependency
* Fix compile with uffd
* Update publish script
* Fix more uffd tests
* Rename cranelift-wasm-types to wasmtime-types
This reflects the purpose a bit more where it's types specifically
intended for Wasmtime and its support.
* Fix publish script
3 years ago
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-types"
|
|
|
|
version = "0.40.0"
|
Remove `wasmtime-environ`'s dependency on `cranelift-codegen` (#3199)
* Move `CompiledFunction` into wasmtime-cranelift
This commit moves the `wasmtime_environ::CompiledFunction` type into the
`wasmtime-cranelift` crate. This type has lots of Cranelift-specific
pieces of compilation and doesn't need to be generated by all Wasmtime
compilers. This replaces the usage in the `Compiler` trait with a
`Box<Any>` type that each compiler can select. Each compiler must still
produce a `FunctionInfo`, however, which is shared information we'll
deserialize for each module.
The `wasmtime-debug` crate is also folded into the `wasmtime-cranelift`
crate as a result of this commit. One possibility was to move the
`CompiledFunction` commit into its own crate and have `wasmtime-debug`
depend on that, but since `wasmtime-debug` is Cranelift-specific at this
time it didn't seem like it was too too necessary to keep it separate.
If `wasmtime-debug` supports other backends in the future we can
recreate a new crate, perhaps with it refactored to not depend on
Cranelift.
* Move wasmtime_environ::reference_type
This now belongs in wasmtime-cranelift and nowhere else
* Remove `Type` reexport in wasmtime-environ
One less dependency on `cranelift-codegen`!
* Remove `types` reexport from `wasmtime-environ`
Less cranelift!
* Remove `SourceLoc` from wasmtime-environ
Change the `srcloc`, `start_srcloc`, and `end_srcloc` fields to a custom
`FilePos` type instead of `ir::SourceLoc`. These are only used in a few
places so there's not much to lose from an extra abstraction for these
leaf use cases outside of cranelift.
* Remove wasmtime-environ's dep on cranelift's `StackMap`
This commit "clones" the `StackMap` data structure in to
`wasmtime-environ` to have an independent representation that that
chosen by Cranelift. This allows Wasmtime to decouple this runtime
dependency of stack map information and let the two evolve
independently, if necessary.
An alternative would be to refactor cranelift's implementation into a
separate crate and have wasmtime depend on that but it seemed a bit like
overkill to do so and easier to clone just a few lines for this.
* Define code offsets in wasmtime-environ with `u32`
Don't use Cranelift's `binemit::CodeOffset` alias to define this field
type since the `wasmtime-environ` crate will be losing the
`cranelift-codegen` dependency soon.
* Commit to using `cranelift-entity` in Wasmtime
This commit removes the reexport of `cranelift-entity` from the
`wasmtime-environ` crate and instead directly depends on the
`cranelift-entity` crate in all referencing crates. The original reason
for the reexport was to make cranelift version bumps easier since it's
less versions to change, but nowadays we have a script to do that.
Otherwise this encourages crates to use whatever they want from
`cranelift-entity` since we'll always depend on the whole crate.
It's expected that the `cranelift-entity` crate will continue to be a
lean crate in dependencies and suitable for use at both runtime and
compile time. Consequently there's no need to avoid its usage in
Wasmtime at runtime, since "remove Cranelift at compile time" is
primarily about the `cranelift-codegen` crate.
* Remove most uses of `cranelift-codegen` in `wasmtime-environ`
There's only one final use remaining, which is the reexport of
`TrapCode`, which will get handled later.
* Limit the glob-reexport of `cranelift_wasm`
This commit removes the glob reexport of `cranelift-wasm` from the
`wasmtime-environ` crate. This is intended to explicitly define what
we're reexporting and is a transitionary step to curtail the amount of
dependencies taken on `cranelift-wasm` throughout the codebase. For
example some functions used by debuginfo mapping are better imported
directly from the crate since they're Cranelift-specific. Note that
this is intended to be a temporary state affairs, soon this reexport
will be gone entirely.
Additionally this commit reduces imports from `cranelift_wasm` and also
primarily imports from `crate::wasm` within `wasmtime-environ` to get a
better sense of what's imported from where and what will need to be
shared.
* Extract types from cranelift-wasm to cranelift-wasm-types
This commit creates a new crate called `cranelift-wasm-types` and
extracts type definitions from the `cranelift-wasm` crate into this new
crate. The purpose of this crate is to be a shared definition of wasm
types that can be shared both by compilers (like Cranelift) as well as
wasm runtimes (e.g. Wasmtime). This new `cranelift-wasm-types` crate
doesn't depend on `cranelift-codegen` and is the final step in severing
the unconditional dependency from Wasmtime to `cranelift-codegen`.
The final refactoring in this commit is to then reexport this crate from
`wasmtime-environ`, delete the `cranelift-codegen` dependency, and then
update all `use` paths to point to these new types.
The main change of substance here is that the `TrapCode` enum is
mirrored from Cranelift into this `cranelift-wasm-types` crate. While
this unfortunately results in three definitions (one more which is
non-exhaustive in Wasmtime itself) it's hopefully not too onerous and
ideally something we can patch up in the future.
* Get lightbeam compiling
* Remove unnecessary dependency
* Fix compile with uffd
* Update publish script
* Fix more uffd tests
* Rename cranelift-wasm-types to wasmtime-types
This reflects the purpose a bit more where it's types specifically
intended for Wasmtime and its support.
* Fix publish script
3 years ago
|
|
|
dependencies = [
|
|
|
|
"cranelift-entity",
|
|
|
|
"serde",
|
|
|
|
"thiserror",
|
|
|
|
"wasmparser",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-wasi"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"wasi-cap-std-sync",
|
|
|
|
"wasi-common",
|
|
|
|
"wasi-tokio",
|
|
|
|
"wasmtime",
|
|
|
|
"wiggle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-wasi-crypto"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"wasi-crypto",
|
|
|
|
"wasmtime",
|
|
|
|
"wiggle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-wasi-nn"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"openvino",
|
|
|
|
"thiserror",
|
|
|
|
"walkdir",
|
|
|
|
"wiggle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasmtime-wast"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"wasmtime",
|
|
|
|
"wast 43.0.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wast"
|
|
|
|
version = "35.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68"
|
|
|
|
dependencies = [
|
|
|
|
"leb128",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wast"
|
|
|
|
version = "43.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "408feaebf6dbf9d154957873b14d00e8fba4cbc17a8cbb1bc9e4c1db425c50a8"
|
|
|
|
dependencies = [
|
|
|
|
"leb128",
|
|
|
|
"memchr",
|
|
|
|
"unicode-width",
|
|
|
|
"wasm-encoder",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wat"
|
|
|
|
version = "1.0.45"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2b70bfff0cfaf33dc9d641196dbcd0023a2da8b4b9030c59535cb44e2884983b"
|
|
|
|
dependencies = [
|
|
|
|
"wast 43.0.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "web-sys"
|
|
|
|
version = "0.3.57"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283"
|
|
|
|
dependencies = [
|
|
|
|
"js-sys",
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "which"
|
|
|
|
version = "4.2.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae"
|
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"lazy_static",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wiggle"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"async-trait",
|
|
|
|
"bitflags",
|
|
|
|
"proptest",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
"wasmtime",
|
|
|
|
"wiggle-macro",
|
|
|
|
"wiggle-test",
|
|
|
|
"witx",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wiggle-generate"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"heck",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"shellexpand",
|
|
|
|
"syn",
|
|
|
|
"witx",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wiggle-macro"
|
|
|
|
version = "0.40.0"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
"wiggle",
|
|
|
|
"wiggle-generate",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wiggle-test"
|
|
|
|
version = "0.21.0"
|
|
|
|
dependencies = [
|
|
|
|
"env_logger 0.9.0",
|
|
|
|
"proptest",
|
|
|
|
"thiserror",
|
|
|
|
"tracing",
|
|
|
|
"tracing-subscriber",
|
|
|
|
"wiggle",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winapi"
|
|
|
|
version = "0.3.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
|
|
|
dependencies = [
|
|
|
|
"winapi-i686-pc-windows-gnu",
|
|
|
|
"winapi-x86_64-pc-windows-gnu",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winapi-i686-pc-windows-gnu"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winapi-util"
|
|
|
|
version = "0.1.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winapi-x86_64-pc-windows-gnu"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows-sys"
|
|
|
|
version = "0.36.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
|
|
|
|
dependencies = [
|
|
|
|
"windows_aarch64_msvc",
|
|
|
|
"windows_i686_gnu",
|
|
|
|
"windows_i686_msvc",
|
|
|
|
"windows_x86_64_gnu",
|
|
|
|
"windows_x86_64_msvc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_msvc"
|
|
|
|
version = "0.36.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_gnu"
|
|
|
|
version = "0.36.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_msvc"
|
|
|
|
version = "0.36.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnu"
|
|
|
|
version = "0.36.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_msvc"
|
|
|
|
version = "0.36.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winx"
|
|
|
|
version = "0.33.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b7b01e010390eb263a4518c8cebf86cb67469d1511c00b749a47b64c39e8054d"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags",
|
|
|
|
"io-lifetimes",
|
|
|
|
"windows-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "witx"
|
|
|
|
version = "0.9.1"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"log",
|
|
|
|
"rayon",
|
|
|
|
"thiserror",
|
|
|
|
"wast 35.0.2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "xoodyak"
|
|
|
|
version = "0.7.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "94b52dbbb9ca4862dcd5e33383af1610db2f28d081e0803e3a3b2bbdfab5eeed"
|
|
|
|
dependencies = [
|
|
|
|
"rawbytes",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zeroize"
|
|
|
|
version = "1.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619"
|
|
|
|
dependencies = [
|
|
|
|
"zeroize_derive",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zeroize_derive"
|
|
|
|
version = "1.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn",
|
|
|
|
"synstructure",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zstd"
|
|
|
|
version = "0.11.1+zstd.1.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "77a16b8414fde0414e90c612eba70985577451c4c504b99885ebed24762cb81a"
|
|
|
|
dependencies = [
|
|
|
|
"zstd-safe",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zstd-safe"
|
|
|
|
version = "5.0.1+zstd.1.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7c12659121420dd6365c5c3de4901f97145b79651fb1d25814020ed2ed0585ae"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"zstd-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zstd-sys"
|
|
|
|
version = "2.0.1+zstd.1.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
]
|