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.

23 lines
566 B

[package]
name = "wasmtime-wit-bindgen"
version.workspace = true
authors.workspace = true
description = "Internal `*.wit` support for the `wasmtime` crate's macros"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
documentation = "https://docs.rs/wasmtime-wit-bindgen/"
edition.workspace = true
rust-version.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 }
heck = { workspace = true }
wit-parser = { workspace = true }
indexmap = { workspace = true }
Add support for `#![no_std]` to the `wasmtime` crate (#8533) * Always fall back to custom platform for Wasmtime This commit updates Wasmtime's platform support to no longer require an opt-in `RUSTFLAGS` `--cfg` flag to be specified. With `no_std` becoming officially supported this should provide a better onboarding experience where the fallback custom platform is used. This will cause linker errors if the symbols aren't implemented and searching/googling should lead back to our docs/repo (eventually, hopefully). * Change Wasmtime's TLS state to a single pointer This commit updates the management of TLS to rely on just a single pointer rather than a pair of a pointer and a `bool`. Additionally management of the TLS state is pushed into platform-specific modules to enable different means of managing it, namely the "custom" platform now has a C function required to implement TLS state for Wasmtime. * Delay conversion to `Instant` in atomic intrinsics The `Duration` type is available in `no_std` but the `Instant` type is not. The intention is to only support the `threads` proposal if `std` is active but to assist with this split push the `Duration` further into Wasmtime to avoid using a type that can't be mentioned in `no_std`. * Gate more parts of Wasmtime on the `profiling` feature Move `serde_json` to an optional dependency and gate the guest profiler entirely on the `profiling` feature. * Refactor conversion to `anyhow::Error` in `wasmtime-environ` Have a dedicated trait for consuming `self` in addition to a `Result`-friendly trait. * Gate `gimli` in Wasmtime on `addr2line` Cut down the dependency list if `addr2line` isn't enabled since then the dependency is not used. While here additionally lift the version requirement for `addr2line` up to the workspace level. * Update `bindgen!` to have `no_std`-compatible output Pull most types from Wasmtime's `__internal` module as the source of truth. * Use an `Option` for `gc_store` instead of `OnceCell` No need for synchronization here when mutability is already available in the necessary contexts. * Enable embedder-defined host feature detection * Add `#![no_std]` support to the `wasmtime` crate This commit enables compiling the `runtime`, `gc`, and `component-model` features of the `wasmtime` crate on targets that do not have `std`. This tags the crate as `#![no_std]` and then updates everything internally to import from `core` or `alloc` and adapt for the various idioms. This ended up requiring some relatively extensive changes, but nothing too too bad in the grand scheme of things. * Require `std` for the perfmap profiling agent prtest:full * Fix build on wasm * Fix windows build * Remove unused import * Fix Windows/Unix build without `std` feature * Fix some doc links * Remove unused import * Fix build of wasi-common in isolation * Fix no_std build on macos * Re-fix build * Fix standalone build of wasmtime-cli-flags * Resolve a merge conflict * Review comments * Remove unused import
6 months ago
[features]
std = []