You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.0 KiB

[package]
name = "wasmtime-cli-flags"
version.workspace = true
authors.workspace = true
description = "Exposes common CLI flags used for running Wasmtime"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
documentation = "https://docs.rs/wasmtime-cache/"
edition.workspace = true
Configure workspace lints, enable running some Clippy lints on CI (#7561) * Configure Rust lints at the workspace level This commit adds necessary configuration knobs to have lints configured at the workspace level in Wasmtime rather than the crate level. This uses a feature of Cargo first released with 1.74.0 (last week) of the `[workspace.lints]` table. This should help create a more consistent set of lints applied across all crates in our workspace in addition to possibly running select clippy lints on CI as well. * Move `unused_extern_crates` to the workspace level This commit configures a `deny` lint level for the `unused_extern_crates` lint to the workspace level rather than the previous configuration at the individual crate level. * Move `trivial_numeric_casts` to workspace level * Change workspace lint levels to `warn` CI will ensure that these don't get checked into the codebase and otherwise provide fewer speed bumps for in-process development. * Move `unstable_features` lint to workspace level * Move `unused_import_braces` lint to workspace level * Start running Clippy on CI This commit configures our CI to run `cargo clippy --workspace` for all merged PRs. Historically this hasn't been all the feasible due to the amount of configuration required to control the number of warnings on CI, but with Cargo's new `[lint]` table it's possible to have a one-liner to silence all lints from Clippy by default. This commit by default sets the `all` lint in Clippy to `allow` to by-default disable warnings from Clippy. The goal of this PR is to enable selective access to Clippy lints for Wasmtime on CI. * Selectively enable `clippy::cast_sign_loss` This would have fixed #7558 so try to head off future issues with that by warning against this situation in a few crates. This lint is still quite noisy though for Cranelift for example so it's not worthwhile at this time to enable it for the whole workspace. * Fix CI error prtest:full
12 months ago
[lints]
workspace = true
[dependencies]
anyhow = { workspace = true }
clap = { workspace = true }
Gate many CLI/Wasmtime features behind Cargo features (#7282) * Move `wasmtime explore` behind a Cargo feature Enable this Cargo feature by default, but enable building the CLI without the `explore` subcommand. * Move the `wast` subcommand behind a Cargo feature * Move support for `wat` behind a CLI feature This was already conditional in crates such as `wasmtime` and this makes it an optional dependency of the CLI as well. * Move CLI cache support behind a Cargo feature Additionally refactor `wasmtime-cli-flags` to not unconditionally pull in caching support by removing its `default` feature and appropriately enabling it from the CLI. * Move `rayon` behind an optional feature * Move `http-body-util` dependency behind `serve` feature * Add a Cargo feature for compiling out log statements This sets the static features of `log` and `tracing` to statically remove all log statements from the binary to cut down on binary size. * Move logging support behind a Cargo feature Enables statically removing logging support in addition to the previous compiling out log statements themselves. * Move demangling support behind a Cargo feature * Enable building the CLI without cranelift Compile out the `compile` subcommand for example. * Gate all profiling support behind one feature flag This commit moves vtune/jitdump support behind a single `profiling` feature flag that additionally includes the guest profiler dependencies now too. * Move support for core dumps behind a feature flag * Move addr2line behind a feature * Fix rebase * Document cargo features and a minimal build * Tidy up the source a bit * Rename compile-out-logging * Document disabling logging * Note the host architecture as well * Fix tests * Fix tests * Mention debuginfo stripping * Fix CI configuration for checking features * Fix book tests * Update lock file after rebase * Enable coredump feature by default
1 year ago
file-per-thread-logger = { workspace = true, optional = true }
tracing-subscriber = { workspace = true, optional = true }
rayon = { version = "1.5.0", optional = true }
wasmtime = { workspace = true, features = ["gc"] }
Add compatibility shims for Wasmtime 13 CLI (#7385) * Add compatibility shims for Wasmtime 13 CLI This commit introduces a compatibility shim for the Wasmtime 13 CLI and prior. The goal of this commit is to address concerns raised in #7336 and other locations as well. While the new CLI cannot be un-shipped at this point this PR attempts to ameliorate the situation somewhat through a few avenues: * A complete copy of the old CLI parser is now included in `wasmtime` by default. * The `WASMTIME_NEW_CLI=0` environment variable can force usage of the old CLI parser for the `run` and `compile` commands. * The `WASMTIME_NEW_CLI=1` environment variable can force usage of the new CLI parser. * Otherwise both the old and the new CLI parser are executed. Depending on the result one is selected to be executed, possibly with a warning printed. * If both CLI parsers succeed but produce the same result, then no warning is emitted and execution continues as usual. * If both CLI parsers succeed but produce different results then a warning is emitted indicating this. The warning points to #7384 which has further examples of how to squash the warning. The warning also mentions the above env var to turn the warning off. In this situation the old semantics are used at this time instead of the new semantics. It's intended that eventually this will change in the future. * If the new CLI succeeds and the old CLI fails then the new semantics are executed without warning. * If the old CLI succeeds and the new CLI fails then a warning is issued and the old semantics are used. * If both the old and the new CLI fail to parse then the error message for the new CLI is emitted. Note that this doesn't add up to a perfect transition. The hope is that most of the major cases of change at the very least have something printed. My plan is to land this on `main` and then backport it to the 14.0.0 branch as a 14.0.3 release. * Wordsmith messages * Update messages * More wording updates * Fix grammar * More updates
1 year ago
humantime = { workspace = true }
[features]
pooling-allocator = []
component-model = ["wasmtime/component-model"]
Gate many CLI/Wasmtime features behind Cargo features (#7282) * Move `wasmtime explore` behind a Cargo feature Enable this Cargo feature by default, but enable building the CLI without the `explore` subcommand. * Move the `wast` subcommand behind a Cargo feature * Move support for `wat` behind a CLI feature This was already conditional in crates such as `wasmtime` and this makes it an optional dependency of the CLI as well. * Move CLI cache support behind a Cargo feature Additionally refactor `wasmtime-cli-flags` to not unconditionally pull in caching support by removing its `default` feature and appropriately enabling it from the CLI. * Move `rayon` behind an optional feature * Move `http-body-util` dependency behind `serve` feature * Add a Cargo feature for compiling out log statements This sets the static features of `log` and `tracing` to statically remove all log statements from the binary to cut down on binary size. * Move logging support behind a Cargo feature Enables statically removing logging support in addition to the previous compiling out log statements themselves. * Move demangling support behind a Cargo feature * Enable building the CLI without cranelift Compile out the `compile` subcommand for example. * Gate all profiling support behind one feature flag This commit moves vtune/jitdump support behind a single `profiling` feature flag that additionally includes the guest profiler dependencies now too. * Move support for core dumps behind a feature flag * Move addr2line behind a feature * Fix rebase * Document cargo features and a minimal build * Tidy up the source a bit * Rename compile-out-logging * Document disabling logging * Note the host architecture as well * Fix tests * Fix tests * Mention debuginfo stripping * Fix CI configuration for checking features * Fix book tests * Update lock file after rebase * Enable coredump feature by default
1 year ago
cache = ["wasmtime/cache"]
parallel-compilation = ["wasmtime/parallel-compilation", "dep:rayon"]
logging = ["dep:file-per-thread-logger", "dep:tracing-subscriber"]
cranelift = ["wasmtime/cranelift"]
coredump = ["wasmtime/coredump"]
gc = ["wasmtime/gc"]
threads = ["wasmtime/threads"]