Files
wasmtime/crates/api/Cargo.toml
Alex Crichton 3b7cb6ee64 Enable jitdump profiling support by default (#1310)
* Enable jitdump profiling support by default

This the result of some of the investigation I was doing for #1017. I've
done a number of refactorings here which culminated in a number of
changes that all amount to what I think should result in jitdump support being
enabled by default:

* Pass in a list of finished functions instead of just a range to
  ensure that we're emitting jit dump data for a specific module rather
  than a whole `CodeMemory` which may have other modules.
* Define `ProfilingStrategy` in the `wasmtime` crate to have everything
  locally-defined
* Add support to the C API to enable profiling
* Documentation added for profiling with jitdump to the book
* Split out supported/unsupported files in `jitdump.rs` to avoid having
  lots of `#[cfg]`.
* Make dependencies optional that are only used for `jitdump`.
* Move initialization up-front to `JitDumpAgent::new()` instead of
  deferring it to the first module.
* Pass around `Arc<dyn ProfilingAgent>` instead of
  `Option<Arc<Mutex<Box<dyn ProfilingAgent>>>>`

The `jitdump` Cargo feature is now enabled by default which means that
our published binaries, C API artifacts, and crates will support
profiling at runtime by default. The support I don't think is fully
fleshed out and working but I think it's probably in a good enough spot
we can get users playing around with it!
2020-03-20 11:44:51 -05:00

56 lines
1.5 KiB
TOML

[package]
name = "wasmtime"
version = "0.12.0"
authors = ["The Wasmtime Project Developers"]
description = "High-level API to expose the Wasmtime runtime"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition = "2018"
[dependencies]
wasmtime-runtime = { path = "../runtime", version = "0.12.0" }
wasmtime-environ = { path = "../environ", version = "0.12.0" }
wasmtime-jit = { path = "../jit", version = "0.12.0" }
wasmtime-profiling = { path = "../profiling", version = "0.12.0" }
wasmparser = "0.51.2"
target-lexicon = { version = "0.10.0", default-features = false }
anyhow = "1.0.19"
region = "2.0.0"
libc = "0.2"
cfg-if = "0.1.9"
backtrace = "0.3.42"
rustc-demangle = "0.1.16"
lazy_static = "1.4"
wat = { version = "1.0.10", optional = true }
[target.'cfg(target_os = "windows")'.dependencies]
winapi = "0.3.7"
[dev-dependencies]
# for wasmtime.rs
wasi-common = { path = "../wasi-common", version = "0.12.0" }
pretty_env_logger = "0.4.0"
rayon = "1.2.1"
file-per-thread-logger = "0.1.1"
wat = "1.0.10"
tempfile = "3.1"
[badges]
maintenance = { status = "actively-developed" }
[features]
default = ['wat', 'jitdump']
# Enables experimental support for the lightbeam codegen backend, an alternative
# to cranelift. Requires Nightly Rust currently, and this is not enabled by
# default.
lightbeam = ["wasmtime-jit/lightbeam"]
# Enables support for the `perf` jitdump profiler
jitdump = ["wasmtime-jit/jitdump"]
[[test]]
name = "host-segfault"
harness = false