Files
wasmtime/cranelift/peepmatic/crates/runtime/Cargo.toml
Nick Fitzgerald ee5982fd16 peepmatic: Be generic over the operator type
This lets us avoid the cost of `cranelift_codegen::ir::Opcode` to
`peepmatic_runtime::Operator` conversion overhead, and paves the way for
allowing Peepmatic to support non-clif optimizations (e.g. vcode optimizations).

Rather than defining our own `peepmatic::Operator` type like we used to, now the
whole `peepmatic` crate is effectively generic over a `TOperator` type
parameter. For the Cranelift integration, we use `cranelift_codegen::ir::Opcode`
as the concrete type for our `TOperator` type parameter. For testing, we also
define a `TestOperator` type, so that we can test Peepmatic code without
building all of Cranelift, and we can keep them somewhat isolated from each
other.

The methods that `peepmatic::Operator` had are now translated into trait bounds
on the `TOperator` type. These traits need to be shared between all of
`peepmatic`, `peepmatic-runtime`, and `cranelift-codegen`'s Peepmatic
integration. Therefore, these new traits live in a new crate:
`peepmatic-traits`. This crate acts as a header file of sorts for shared
trait/type/macro definitions.

Additionally, the `peepmatic-runtime` crate no longer depends on the
`peepmatic-macro` procedural macro crate, which should lead to faster build
times for Cranelift when it is using pre-built peephole optimizers.
2020-07-17 16:16:49 -07:00

30 lines
1.0 KiB
TOML

[package]
name = "peepmatic-runtime"
version = "0.66.0"
authors = ["Nick Fitzgerald <fitzgen@gmail.com>"]
edition = "2018"
license = "Apache-2.0 WITH LLVM-exception"
description = "Runtime support for peepmatic peephole optimizers"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bincode = "1.2.1"
bumpalo = "3.2.0"
log = "0.4.8"
peepmatic-automata = { version = "0.66.0", path = "../automata", features = ["serde"] }
peepmatic-traits = { version = "0.66.0", path = "../traits" }
serde = { version = "1.0.105", features = ["derive"] }
thiserror = "1.0.15"
wast = { version = "15.0.0", optional = true }
[dev-dependencies]
peepmatic-test-operator = { version = "0.66.0", path = "../test-operator" }
serde_test = "1.0.114"
[features]
# Enable support for a few extra methods that are required by the `peepmatic`
# crate when constructing peephole optimizers, but are not needed when simply
# using already-constructed peephole optimizers.
construct = ["wast"]