Repository: bytecodealliance/wasmtime
Pull request #8958 (2024-07-15 14:31:30)

Inherit lints in a few more crates
It's intended that all crates in this workspace have uniform lints, so add inheritance to a few forgotten crates.

<!--
Please make sure you include the following information:

- If this work has been discussed elsewhere, please include a link to that
  conversation. If it was discussed in an issue, just mention "issue #...".

- Explain why this change is needed. If the details are in an issue already,
  this can be brief.

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->



Patch:
diff --git a/crates/c-api-macros/src/lib.rs b/crates/c-api-macros/src/lib.rs
index 01ecf028a..4dbd9d599 100644
--- a/crates/c-api-macros/src/lib.rs
+++ b/crates/c-api-macros/src/lib.rs
@@ -22,8 +22,10 @@ pub fn declare_own(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
     let ty = extract_ident(input);
     let name = ty.to_string();
     let delete = quote::format_ident!("{}_delete", &name[..name.len() - 2]);
+    let docs = format!("Deletes the [`{name}`].");
 
     (quote! {
+        #[doc = #docs]
         #[no_mangle]
         pub extern fn #delete(_: Box<#ty>) {}
     })
@@ -34,11 +36,18 @@ pub fn declare_own(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
 pub fn declare_ty(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
     let ty = extract_ident(input);
     let name = ty.to_string();
-    let copy = quote::format_ident!("{}_copy", &name[..name.len() - 2]);
+    let prefix = &name[..name.len() - 2];
+    let copy = quote::format_ident!("{}_copy", &prefix);
+    let docs = format!(
+        "Creates a new [`{name}`] which matches the provided one.\n\n\
+        The caller is responsible for deleting the returned value via [`{prefix}_delete`].\n\n\
+    "
+    );
 
     (quote! {
         wasmtime_c_api_macros::declare_own!(#ty);
 
+        #[doc = #docs]
         #[no_mangle]
         pub extern fn #copy(src: &#ty) -> Box<#ty> {
             Box::new(src.clone())
@@ -52,39 +61,61 @@ pub fn declare_ref(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
     let ty = extract_ident(input);
     let name = ty.to_string();
     let prefix = &name[..name.len() - 2];
-    let copy = quote::format_ident!("{}_copy", prefix);
     let same = quote::format_ident!("{}_same", prefix);
+    let same_docs = format!(
+        "Returns `true` if the given references are pointing to the same [`{name}`].\n\n\
+        This is not yet supported and aborts the process upon use."
+    );
     let get_host_info = quote::format_ident!("{}_get_host_info", prefix);
+    let get_host_info_docs = format!(
+        "Returns the host information of the [`{name}`].\n\n\
+        This is not yet supported and always returns `NULL`."
+    );
     let set_host_info = quote::format_ident!("{}_set_host_info", prefix);
+    let set_host_info_docs = format!(
+        "Sets the host information of the [`{name}`].\n\n\
+        This is not yet supported and aborts the process upon use."
+    );
     let set_host_info_final = quote::format_ident!("{}_set_host_info_with_finalizer", prefix);
+    let set_host_info_final_docs = format!(
+        "Sets the host information finalizer of the [`{name}`].\n\n\
+        This is not yet supported and aborts the process upon use."
+    );
     let as_ref = quote::format_ident!("{}_as_ref", prefix);
+    let as_ref_docs = format!(
+        "Returns the [`{name}`] as mutable reference.\n\n\
+        This is not yet supported and aborts the process upon use."
+    );
     let as_ref_const = quote::format_ident!("{}_as_ref_const", prefix);
+    let as_ref_const_docs = format!(
+        "Returns the [`{name}`] as immutable reference.\n\n\
+        This is not yet supported and aborts the process upon use."
+    );
 
     (quote! {
-        wasmtime_c_api_macros::declare_own!(#ty);
-
-        #[no_mangle]
-        pub extern fn #copy(src: &#ty) -> Box<#ty> {
-            Box::new(src.clone())
-        }
+        wasmtime_c_api_macros::declare_ty!(#ty);
 
+        #[doc = #same_docs]
         #[no_mangle]
         pub extern fn #same(_a: &#ty, _b: &#ty) -> bool {
             eprintln!("`{}` is not implemented", stringify!(#same));
             std::process::abort();
         }
 
+        #[doc = #get_host_info_docs]
         #[no_mangle]
         pub extern fn #get_host_info(a: &#ty) -> *mut std::os::raw::c_void {
             std::ptr::null_mut()
         }
 
+        #[doc = #set_host_info_docs]
         #[no_mangle]
         pub extern fn #set_host_info(a: &#ty, info: *mut std::os::raw::c_void) {
             eprintln!("`{}` is not implemented", stringify!(#set_host_info));
             std::process::abort();
         }
 
+        #[doc = #set_host_info_final_docs]
         #[no_mangle]
         pub extern fn #set_host_info_final(
             a: &#ty,
@@ -95,12 +126,14 @@ pub fn declare_ref(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
             std::process::abort();
         }
 
+        #[doc = #as_ref_docs]
         #[no_mangle]
         pub extern fn #as_ref(a: &#ty) -> Box<crate::wasm_ref_t> {
             eprintln!("`{}` is not implemented", stringify!(#as_ref));
             std::process::abort();
         }
 
+        #[doc = #as_ref_const_docs]
         #[no_mangle]
         pub extern fn #as_ref_const(a: &#ty) -> Box<crate::wasm_ref_t> {
             eprintln!("`{}` is not implemented", stringify!(#as_ref_const));
diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs
index c720cf18e..3e048b664 100644
--- a/crates/cranelift/src/compiler.rs
+++ b/crates/cranelift/src/compiler.rs
@@ -528,7 +528,7 @@ impl wasmtime_environ::Compiler for Compiler {
 
         // Now it's time to delegate to the actual builtin. Builtins are stored
         // in an array in all `VMContext`s. First load the base pointer of the
-        // array and then load the entry of the array that correspons to this
+        // array and then load the entry of the array that corresponds to this
         // builtin.
         let mem_flags = ir::MemFlags::trusted().with_readonly();
         let array_addr = builder.ins().load(
diff --git a/crates/environ/Cargo.toml b/crates/environ/Cargo.toml
index 26f2da8bb..c42690f8d 100644
--- a/crates/environ/Cargo.toml
+++ b/crates/environ/Cargo.toml
@@ -2,7 +2,7 @@
 name = "wasmtime-environ"
 version.workspace = true
 authors.workspace = true
-description = "Standalone environment support for WebAsssembly code in Cranelift"
+description = "Standalone environment support for WebAssembly code in Cranelift"
 license = "Apache-2.0 WITH LLVM-exception"
 repository = "https://github.com/bytecodealliance/wasmtime"
 documentation = "https://docs.rs/wasmtime-environ/"
diff --git a/crates/environ/src/compile/mod.rs b/crates/environ/src/compile/mod.rs
index 05151c8f1..b764e5f04 100644
--- a/crates/environ/src/compile/mod.rs
+++ b/crates/environ/src/compile/mod.rs
@@ -346,7 +346,7 @@ pub trait Compiler: Send + Sync {
     /// Get a flag indicating whether branch protection is enabled.
     fn is_branch_protection_enabled(&self) -> bool;
 
-    /// Returns a suitable compiler usable for component-related compliations.
+    /// Returns a suitable compiler usable for component-related compilations.
     ///
     /// Note that the `ComponentCompiler` trait can also be implemented for
     /// `Self` in which case this function would simply return `self`.
diff --git a/crates/environ/src/component/dfg.rs b/crates/environ/src/component/dfg.rs
index f308aeaf3..9804de86a 100644
--- a/crates/environ/src/component/dfg.rs
+++ b/crates/environ/src/component/dfg.rs
@@ -87,7 +87,7 @@ pub struct ComponentDfg {
     ///
     /// This map is not filled in on the initial creation of a `ComponentDfg`.
     /// Instead these modules are filled in by the `inline::adapt` phase where
-    /// adapter modules are identifed and filled in here.
+    /// adapter modules are identified and filled in here.
     ///
     /// The payload here is the static module index representing the core wasm
     /// adapter module that was generated as well as the arguments to the
diff --git a/crates/environ/src/fact/trampoline.rs b/crates/environ/src/fact/trampoline.rs
index 424bc6172..7414ed724 100644
--- a/crates/environ/src/fact/trampoline.rs
+++ b/crates/environ/src/fact/trampoline.rs
@@ -164,7 +164,7 @@ pub(super) fn compile_helper(module: &mut Module<'_>, result: FunctionId, helper
                 .unwrap();
             Destination::Stack(&dst_flat, &helper.dst.opts)
         }
-        // This is the same as a memroy-based source but note that the address
+        // This is the same as a memory-based source but note that the address
         // of the destination is passed as the final parameter to the function.
         HelperLocation::Memory => {
             nlocals += 1;
diff --git a/crates/environ/src/gc.rs b/crates/environ/src/gc.rs
index c2b933d34..c28bfcff8 100644
--- a/crates/environ/src/gc.rs
+++ b/crates/environ/src/gc.rs
@@ -33,7 +33,7 @@ pub const NON_NULL_NON_I31_MASK: u64 = !I31_DISCRIMINANT;
 /// We say "abstract-ish" type because in addition to the abstract heap types
 /// (other than `i31`) we also have variants for `externref`s that have been
 /// converted into an `anyref` via `extern.convert_any` and `externref`s that
-/// have been convered into an `anyref` via `any.convert_extern`. Note that in
+/// have been converted into an `anyref` via `any.convert_extern`. Note that in
 /// the latter case, because `any.convert_extern $foo` produces a value that is
 /// not an instance of `eqref`, `VMGcKind::AnyOfExternRef & VMGcKind::EqRef !=
 /// VMGcKind::EqRef`.
diff --git a/crates/environ/src/module_artifacts.rs b/crates/environ/src/module_artifacts.rs
index 7b04420bd..8610029e6 100644
--- a/crates/environ/src/module_artifacts.rs
+++ b/crates/environ/src/module_artifacts.rs
@@ -15,7 +15,7 @@ pub struct CompiledFunctionInfo {
     /// The [`WasmFunctionInfo`] for this function.
     pub wasm_func_info: WasmFunctionInfo,
     /// The [`FunctionLoc`] indicating the location of this function in the text
-    /// section of the compition artifact.
+    /// section of the competition artifact.
     pub wasm_func_loc: FunctionLoc,
     /// A trampoline for array callers (e.g. `Func::new`) calling into this function (if needed).
     pub array_to_wasm_trampoline: Option<FunctionLoc>,
diff --git a/crates/environ/src/vmoffsets.rs b/crates/environ/src/vmoffsets.rs
index 852c76d09..0868629cd 100644
--- a/crates/environ/src/vmoffsets.rs
+++ b/crates/environ/src/vmoffsets.rs
@@ -173,7 +173,7 @@ pub trait PtrSize {
         self.vmruntime_limits_last_wasm_exit_fp() + self.size()
     }
 
-    /// Return the offset of the `last_enty_sp` field of `VMRuntimeLimits`.
+    /// Return the offset of the `last_wasm_entry_sp` field of `VMRuntimeLimits`.
     fn vmruntime_limits_last_wasm_entry_sp(&self) -> u8 {
         self.vmruntime_limits_last_wasm_exit_pc() + self.size()
     }
diff --git a/crates/slab/Cargo.toml b/crates/slab/Cargo.toml
index 22ff266e6..d9f265ffb 100644
--- a/crates/slab/Cargo.toml
+++ b/crates/slab/Cargo.toml
@@ -7,6 +7,7 @@ name = "wasmtime-slab"
 repository = "https://github.com/bytecodealliance/wasmtime"
 version.workspace = true
 
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+[lints]
+workspace = true
 
 [dependencies]
diff --git a/crates/slab/src/lib.rs b/crates/slab/src/lib.rs
index 784e144af..822973cee 100644
--- a/crates/slab/src/lib.rs
+++ b/crates/slab/src/lib.rs
@@ -55,13 +55,13 @@
 //! * Value `A` is allocated into the slab, yielding id `i`.
 //!
 //! * `A` is deallocated, and so `i`'s associated entry is added to the slab's
-//! free list.
+//!   free list.
 //!
 //! * Value `B` is allocated into the slab, reusing `i`'s associated entry,
-//! yielding id `i`.
+//!   yielding id `i`.
 //!
 //! * The "original" id `i` is used to access the arena, expecting the
-//! deallocated value `A`, but getting the new value `B`.
+//!   deallocated value `A`, but getting the new value `B`.
 //!
 //! That is, it does not detect and prevent against the memory-safe version of
 //! use-after-free bugs.
diff --git a/crates/wasi-common/witx/preview0/typenames.witx b/crates/wasi-common/witx/preview0/typenames.witx
index f4ba78802..c32137433 100644
--- a/crates/wasi-common/witx/preview0/typenames.witx
+++ b/crates/wasi-common/witx/preview0/typenames.witx
@@ -521,7 +521,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.
diff --git a/crates/wasi-common/witx/preview1/typenames.witx b/crates/wasi-common/witx/preview1/typenames.witx
index 893e5b288..e87239127 100644
--- a/crates/wasi-common/witx/preview1/typenames.witx
+++ b/crates/wasi-common/witx/preview1/typenames.witx
@@ -525,7 +525,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.
diff --git a/crates/wasi-nn/examples/classification-example-winml/src/main.rs b/crates/wasi-nn/examples/classification-example-winml/src/main.rs
index 277b73caa..a435fb5f5 100644
--- a/crates/wasi-nn/examples/classification-example-winml/src/main.rs
+++ b/crates/wasi-nn/examples/classification-example-winml/src/main.rs
@@ -41,7 +41,7 @@ pub fn main() {
     let mut output_buffer = vec![0f32; 1000];
     context.get_output(0, &mut output_buffer[..]).unwrap();
 
-    // Postprocessing. Calculating the softmax probablility scores.
+    // Postprocessing. Calculating the softmax probability scores.
     let result = postprocess(output_buffer);
 
     // Load labels for classification
diff --git a/crates/wasi/src/poll.rs b/crates/wasi/src/poll.rs
index 6e2923f34..8bb51ce28 100644
--- a/crates/wasi/src/poll.rs
+++ b/crates/wasi/src/poll.rs
@@ -81,7 +81,7 @@ pub trait Subscribe: Send + 'static {
     async fn ready(&mut self);
 }
 
-/// Creates a `pollable` resource which is susbcribed to the provided
+/// Creates a `pollable` resource which is subscribed to the provided
 /// `resource`.
 ///
 /// If `resource` is an owned resource then it will be deleted when the returned
diff --git a/crates/wasi/witx/preview0/typenames.witx b/crates/wasi/witx/preview0/typenames.witx
index f4ba78802..c32137433 100644
--- a/crates/wasi/witx/preview0/typenames.witx
+++ b/crates/wasi/witx/preview0/typenames.witx
@@ -521,7 +521,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.
diff --git a/crates/wasi/witx/preview1/typenames.witx b/crates/wasi/witx/preview1/typenames.witx
index 893e5b288..e87239127 100644
--- a/crates/wasi/witx/preview1/typenames.witx
+++ b/crates/wasi/witx/preview1/typenames.witx
@@ -525,7 +525,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index 841f56448..ecb14717f 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -1534,7 +1534,7 @@ impl Config {
         self
     }
 
-    /// Configure the version information used in serialized and deserialzied [`crate::Module`]s.
+    /// Configure the version information used in serialized and deserialized [`crate::Module`]s.
     /// This effects the behavior of [`crate::Module::serialize()`], as well as
     /// [`crate::Module::deserialize()`] and related functions.
     ///
@@ -2100,7 +2100,7 @@ impl fmt::Debug for Config {
 
         // Not every flag in WasmFeatures can be enabled as part of creating
         // a Config. This impl gives a complete picture of all WasmFeatures
-        // enabled, and doesn't require maintence by hand (which has become out
+        // enabled, and doesn't require maintenance by hand (which has become out
         // of date in the past), at the cost of possible confusion for why
         // a flag in this set doesn't have a Config setter.
         use bitflags::Flags;
diff --git a/crates/wasmtime/src/engine.rs b/crates/wasmtime/src/engine.rs
index 648d1c270..77b35bfd3 100644
--- a/crates/wasmtime/src/engine.rs
+++ b/crates/wasmtime/src/engine.rs
@@ -93,10 +93,7 @@ impl Engine {
             // configured. This is the per-program initialization required for
             // handling traps, such as configuring signals, vectored exception
             // handlers, etc.
-            crate::runtime::vm::init_traps(
-                crate::module::get_wasm_trap,
-                config.macos_use_mach_ports,
-            );
+            crate::runtime::vm::init_traps(config.macos_use_mach_ports);
             #[cfg(feature = "debug-builtins")]
             crate::runtime::vm::debug_builtins::ensure_exported();
         }
diff --git a/crates/wasmtime/src/runtime/code.rs b/crates/wasmtime/src/runtime/code.rs
index 2f453f01c..5030d2962 100644
--- a/crates/wasmtime/src/runtime/code.rs
+++ b/crates/wasmtime/src/runtime/code.rs
@@ -37,7 +37,7 @@ pub struct CodeObject {
 
 impl CodeObject {
     pub fn new(mmap: Arc<CodeMemory>, signatures: TypeCollection, types: Types) -> CodeObject {
-        // The corresopnding unregister for this is below in `Drop for
+        // The corresponding unregister for this is below in `Drop for
         // CodeObject`.
         crate::module::register_code(&mmap);
 
diff --git a/crates/wasmtime/src/runtime/code_memory.rs b/crates/wasmtime/src/runtime/code_memory.rs
index d85e1ff79..7a683d477 100644
--- a/crates/wasmtime/src/runtime/code_memory.rs
+++ b/crates/wasmtime/src/runtime/code_memory.rs
@@ -7,7 +7,7 @@ use core::ops::Range;
 use object::endian::NativeEndian;
 use object::read::{elf::ElfFile64, Object, ObjectSection};
 use object::ObjectSymbol;
-use wasmtime_environ::obj;
+use wasmtime_environ::{lookup_trap_code, obj, Trap};
 use wasmtime_jit_icache_coherence as icache_coherence;
 
 /// Management of executable memory within a `MmapVec`
@@ -317,6 +317,12 @@ impl CodeMemory {
         *self.unwind_registration = Some(registration);
         Ok(())
     }
+
+    /// Looks up the given offset within this module's text section and returns
+    /// the trap code associated with that instruction, if there is one.
+    pub fn lookup_trap_code(&self, text_offset: usize) -> Option<Trap> {
+        lookup_trap_code(self.trap_data(), text_offset)
+    }
 }
 
 /// Returns the range of `inner` within `outer`, such that `outer[range]` is the
diff --git a/crates/wasmtime/src/runtime/component/component.rs b/crates/wasmtime/src/runtime/component/component.rs
index 00cdb9e47..7dd4eca08 100644
--- a/crates/wasmtime/src/runtime/component/component.rs
+++ b/crates/wasmtime/src/runtime/component/component.rs
@@ -243,7 +243,7 @@ impl Component {
     /// An important point to note here is that the precise type of imports and
     /// exports of a component change when it is instantiated with respect to
     /// resources. For example a [`Component`] represents an un-instantiated
-    /// component meaning that its imported resources are represeted as abstract
+    /// component meaning that its imported resources are represented as abstract
     /// resource types. These abstract types are not equal to any other
     /// component's types.
     ///
diff --git a/crates/wasmtime/src/runtime/component/func/typed.rs b/crates/wasmtime/src/runtime/component/func/typed.rs
index e312a986a..890385f5b 100644
--- a/crates/wasmtime/src/runtime/component/func/typed.rs
+++ b/crates/wasmtime/src/runtime/component/func/typed.rs
@@ -152,7 +152,7 @@ where
     /// # Panics
     ///
     /// Panics if this is called on a function in an asynchronous store. This
-    /// only works with functions defined within a synchonous store. Also
+    /// only works with functions defined within a synchronous store. Also
     /// panics if `store` does not own this function.
     pub fn call(&self, store: impl AsContextMut, params: Params) -> Result<Return> {
         assert!(
diff --git a/crates/wasmtime/src/runtime/gc/enabled/rooting.rs b/crates/wasmtime/src/runtime/gc/enabled/rooting.rs
index 7f218df6d..fcbeaf2a8 100644
--- a/crates/wasmtime/src/runtime/gc/enabled/rooting.rs
+++ b/crates/wasmtime/src/runtime/gc/enabled/rooting.rs
@@ -730,7 +730,7 @@ impl<T: GcRef> Rooted<T> {
     /// Create a new `Rooted<T>` from a `GcRootIndex`.
     ///
     /// Note that `Rooted::from_gc_root_index(my_rooted.index)` is not
-    /// necessarily an identity funciton, as it allows changing the `T` type
+    /// necessarily an identity function, as it allows changing the `T` type
     /// parameter.
     ///
     /// The given index should be a LIFO index of a GC reference pointing to an
diff --git a/crates/wasmtime/src/runtime/module.rs b/crates/wasmtime/src/runtime/module.rs
index 1d778d3bb..128355ad0 100644
--- a/crates/wasmtime/src/runtime/module.rs
+++ b/crates/wasmtime/src/runtime/module.rs
@@ -24,7 +24,7 @@ use wasmtime_environ::{
 mod registry;
 
 pub use registry::{
-    get_wasm_trap, register_code, unregister_code, ModuleRegistry, RegisteredModuleId,
+    lookup_code, register_code, unregister_code, ModuleRegistry, RegisteredModuleId,
 };
 
 /// A compiled WebAssembly module, ready to be instantiated.
diff --git a/crates/wasmtime/src/runtime/module/registry.rs b/crates/wasmtime/src/runtime/module/registry.rs
index e83717602..8c7293e66 100644
--- a/crates/wasmtime/src/runtime/module/registry.rs
+++ b/crates/wasmtime/src/runtime/module/registry.rs
@@ -6,7 +6,7 @@ use crate::component::Component;
 use crate::prelude::*;
 use crate::runtime::vm::VMWasmCallFunction;
 use crate::sync::{OnceLock, RwLock};
-use crate::{code_memory::CodeMemory, FrameInfo, Module, Trap};
+use crate::{code_memory::CodeMemory, FrameInfo, Module};
 use alloc::collections::btree_map::{BTreeMap, Entry};
 use alloc::sync::Arc;
 use core::ptr::NonNull;
@@ -254,23 +254,13 @@ fn global_code() -> &'static RwLock<GlobalRegistry> {
 
 type GlobalRegistry = BTreeMap<usize, (usize, Arc<CodeMemory>)>;
 
-/// Returns whether the `pc`, according to globally registered information,
-/// is a wasm trap or not.
-pub fn get_wasm_trap(pc: usize) -> Option<Trap> {
-    let (code, text_offset) = {
-        let all_modules = global_code().read();
-
-        let (end, (start, module)) = match all_modules.range(pc..).next() {
-            Some(info) => info,
-            None => return None,
-        };
-        if pc < *start || *end < pc {
-            return None;
-        }
-        (module.clone(), pc - *start)
-    };
-
-    wasmtime_environ::lookup_trap_code(code.trap_data(), text_offset)
+/// Find which registered region of code contains the given program counter, and
+/// what offset that PC is within that module's code.
+pub fn lookup_code(pc: usize) -> Option<(Arc<CodeMemory>, usize)> {
+    let all_modules = global_code().read();
+    let (_end, (start, module)) = all_modules.range(pc..).next()?;
+    let text_offset = pc.checked_sub(*start)?;
+    Some((module.clone(), text_offset))
 }
 
 /// Registers a new region of code.
diff --git a/crates/wasmtime/src/runtime/vm/sys/custom/traphandlers.rs b/crates/wasmtime/src/runtime/vm/sys/custom/traphandlers.rs
index 493faac1a..c5964491e 100644
--- a/crates/wasmtime/src/runtime/vm/sys/custom/traphandlers.rs
+++ b/crates/wasmtime/src/runtime/vm/sys/custom/traphandlers.rs
@@ -20,10 +20,8 @@ pub unsafe fn wasmtime_setjmp(
     capi::wasmtime_setjmp(jmp_buf, callback, payload, callee.cast())
 }
 
-pub fn platform_init(_macos_use_mach_ports: bool) {
-    unsafe {
-        capi::wasmtime_init_traps(handle_trap);
-    }
+pub unsafe fn platform_init(_macos_use_mach_ports: bool) {
+    capi::wasmtime_init_traps(handle_trap);
 }
 
 extern "C" fn handle_trap(ip: usize, fp: usize, has_faulting_addr: bool, faulting_addr: usize) {
diff --git a/crates/wasmtime/src/runtime/vm/sys/miri/traphandlers.rs b/crates/wasmtime/src/runtime/vm/sys/miri/traphandlers.rs
index 00e22fc55..912542ae0 100644
--- a/crates/wasmtime/src/runtime/vm/sys/miri/traphandlers.rs
+++ b/crates/wasmtime/src/runtime/vm/sys/miri/traphandlers.rs
@@ -37,7 +37,7 @@ pub fn wasmtime_longjmp(_jmp_buf: *const u8) -> ! {
 #[allow(missing_docs)]
 pub type SignalHandler<'a> = dyn Fn() + Send + Sync + 'a;
 
-pub fn platform_init(_macos_use_mach_ports: bool) {}
+pub unsafe fn platform_init(_macos_use_mach_ports: bool) {}
 
 pub fn lazy_per_thread_init() {}
 
diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs
index 113f5b722..83a4b948d 100644
--- a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs
+++ b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs
@@ -33,6 +33,7 @@
 
 #![allow(non_snake_case, clippy::cast_sign_loss)]
 
+use crate::runtime::module::lookup_code;
 use crate::runtime::vm::sys::traphandlers::wasmtime_longjmp;
 use crate::runtime::vm::traphandlers::tls;
 use mach2::exc::*;
@@ -325,9 +326,12 @@ unsafe fn handle_exception(request: &mut ExceptionRequest) -> bool {
     // pointer value and if `MAP` changes happen after we read our entry that's
     // ok since they won't invalidate our entry.
     let (pc, fp) = get_pc_and_fp(&thread_state);
-    let trap = match crate::runtime::vm::traphandlers::GET_WASM_TRAP(pc as usize) {
-        Some(trap) => trap,
-        None => return false,
+    let Some((code, text_offset)) = lookup_code(pc as usize) else {
+        return false;
+    };
+
+    let Some(trap) = code.lookup_trap_code(text_offset) else {
+        return false;
     };
 
     // We have determined that this is a wasm trap and we need to actually
diff --git a/crates/wasmtime/src/runtime/vm/traphandlers.rs b/crates/wasmtime/src/runtime/vm/traphandlers.rs
index 1c0d8186d..365354e42 100644
--- a/crates/wasmtime/src/runtime/vm/traphandlers.rs
+++ b/crates/wasmtime/src/runtime/vm/traphandlers.rs
@@ -11,6 +11,7 @@ mod coredump;
 mod coredump;
 
 use crate::prelude::*;
+use crate::runtime::module::lookup_code;
 use crate::runtime::vm::sys::traphandlers;
 use crate::runtime::vm::{Instance, VMContext, VMRuntimeLimits};
 use crate::sync::OnceLock;
@@ -24,22 +25,10 @@ pub use self::tls::{tls_eager_initialize, AsyncWasmCallState, PreviousAsyncWasmC
 
 pub use traphandlers::SignalHandler;
 
-/// Globally-set callback to determine whether a program counter is actually a
-/// wasm trap.
-///
-/// This is initialized during `init_traps` below. The definition lives within
-/// `wasmtime` currently.
-pub(crate) static mut GET_WASM_TRAP: fn(usize) -> Option<wasmtime_environ::Trap> = |_| None;
-
 /// This function is required to be called before any WebAssembly is entered.
 /// This will configure global state such as signal handlers to prepare the
 /// process to receive wasm traps.
 ///
-/// The `get_wasm_trap` argument is used when a trap happens to determine if a
-/// program counter is the pc of an actual wasm trap or not. This is then used
-/// to disambiguate faults that happen due to wasm and faults that happen due to
-/// bugs in Rust or elsewhere.
-///
 /// # Panics
 ///
 /// This function will panic on macOS if it is called twice or more times with
@@ -47,14 +36,10 @@ pub(crate) static mut GET_WASM_TRAP: fn(usize) -> Option<wasmtime_environ::Trap>
 ///
 /// This function will also panic if the `std` feature is disabled and it's
 /// called concurrently.
-pub fn init_traps(
-    get_wasm_trap: fn(usize) -> Option<wasmtime_environ::Trap>,
-    macos_use_mach_ports: bool,
-) {
+pub fn init_traps(macos_use_mach_ports: bool) {
     static INIT: OnceLock<()> = OnceLock::new();
 
     INIT.get_or_init(|| unsafe {
-        GET_WASM_TRAP = get_wasm_trap;
         traphandlers::platform_init(macos_use_mach_ports);
     });
 
@@ -460,9 +445,12 @@ impl CallThreadState {
         }
 
         // If this fault wasn't in wasm code, then it's not our problem
-        let trap = match unsafe { GET_WASM_TRAP(pc as usize) } {
-            Some(trap) => trap,
-            None => return TrapTest::NotWasm,
+        let Some((code, text_offset)) = lookup_code(pc as usize) else {
+            return TrapTest::NotWasm;
+        };
+
+        let Some(trap) = code.lookup_trap_code(text_offset) else {
+            return TrapTest::NotWasm;
         };
 
         // If all that passed then this is indeed a wasm trap, so return the
diff --git a/crates/wiggle/macro/Cargo.toml b/crates/wiggle/macro/Cargo.toml
index 7609ea4b7..ab3f39f3f 100644
--- a/crates/wiggle/macro/Cargo.toml
+++ b/crates/wiggle/macro/Cargo.toml
@@ -9,6 +9,9 @@ categories = ["wasm"]
 keywords = ["webassembly", "wasm"]
 repository = "https://github.com/bytecodealliance/wasmtime"
 
+[lints]
+workspace = true
+
 [lib]
 proc-macro = true
 test = false
diff --git a/crates/wiggle/macro/src/lib.rs b/crates/wiggle/macro/src/lib.rs
index 474b71d6e..aa3732a5b 100644
--- a/crates/wiggle/macro/src/lib.rs
+++ b/crates/wiggle/macro/src/lib.rs
@@ -1,5 +1,3 @@
-extern crate proc_macro;
-
 use proc_macro::TokenStream;
 use quote::quote;
 use syn::parse_macro_input;
@@ -27,8 +25,8 @@ use syn::parse_macro_input;
 ///       and return `Result<($return_types),$error_type>`
 ///
 ///     * When the `wiggle` crate is built with the `wasmtime_integration`
-///     feature, each module contains an `add_to_linker` function to add it to
-///     a `wasmtime::Linker`.
+///       feature, each module contains an `add_to_linker` function to add it to
+///       a `wasmtime::Linker`.
 ///
 /// Arguments are provided using Rust struct value syntax.
 ///
@@ -96,7 +94,7 @@ use syn::parse_macro_input;
 /// /// is an asynchronous method. Therefore, we use the `async_trait` proc macro
 /// /// to define this trait, so that `double_int_return_float` can be an `async fn`.
 /// /// `wiggle::async_trait` is defined as `#[async_trait::async_trait(?Send)]` -
-/// /// in wiggle, async methods do not have the Send constaint.
+/// /// in wiggle, async methods do not have the Send constraint.
 /// impl example::Example for YourCtxType {
 ///     /// The arrays module has two methods, shown here.
 ///     /// Note that the `GuestPtr` type comes from `wiggle`,
diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs
index 6e1a6a993..bbbcceb22 100644
--- a/crates/wiggle/src/lib.rs
+++ b/crates/wiggle/src/lib.rs
@@ -90,7 +90,7 @@ impl<'a> GuestMemory<'a> {
     /// Acquires a slice or owned copy of the memory pointed to by `ptr`.
     ///
     /// This method will attempt to borrow `ptr` directly from linear memory. If
-    /// memory is shared and cannot be borrowed directy then an owned copy is
+    /// memory is shared and cannot be borrowed directly then an owned copy is
     /// returned instead.
     ///
     /// # Errors
diff --git a/crates/wit-bindgen/src/lib.rs b/crates/wit-bindgen/src/lib.rs
index b8bf2bdda..c9c3318aa 100644
--- a/crates/wit-bindgen/src/lib.rs
+++ b/crates/wit-bindgen/src/lib.rs
@@ -442,7 +442,7 @@ impl Wasmtime {
                     // If this interface is remapped then that means that it was
                     // provided via the `with` key in the bindgen configuration.
                     // That means that bindings generation is skipped here. To
-                    // accomodate future bindgens depending on this bindgen
+                    // accommodate future bindgens depending on this bindgen
                     // though we still generate a module which reexports the
                     // original module. This helps maintain the same output
                     // structure regardless of whether `with` is used.
@@ -734,7 +734,7 @@ pub fn new(
             self.src,
             "
             /// Auto-generated bindings for a pre-instantiated version of a
-            /// copmonent which implements the world `{world_name}`.
+            /// component which implements the world `{world_name}`.
             ///
             /// This structure is created through [`{camel}Pre::new`] which
             /// takes a [`InstancePre`]({wt}::component::InstancePre) that
@@ -791,7 +791,7 @@ pub fn new(
                 /// Creates a new copy of `{camel}Pre` bindings which can then
                 /// be used to instantiate into a particular store.
                 ///
-                /// This method may fail if the compoennt behind `instance_pre`
+                /// This method may fail if the component behind `instance_pre`
                 /// does not have the required exports.
                 pub fn new(
                     instance_pre: {wt}::component::InstancePre<_T>,
diff --git a/winch/codegen/src/abi/mod.rs b/winch/codegen/src/abi/mod.rs
index 7473c76f4..b5f46ee63 100644
--- a/winch/codegen/src/abi/mod.rs
+++ b/winch/codegen/src/abi/mod.rs
@@ -309,7 +309,7 @@ impl RetArea {
         }
     }
 
-    /// Returns true if the return area is uninitiliazed.
+    /// Returns true if the return area is uninitialized.
     pub fn is_uninit(&self) -> bool {
         match self {
             Self::Uninit => true,
diff --git a/winch/codegen/src/codegen/control.rs b/winch/codegen/src/codegen/control.rs
index d7b7e87a9..a23acfacd 100644
--- a/winch/codegen/src/codegen/control.rs
+++ b/winch/codegen/src/codegen/control.rs
@@ -176,7 +176,7 @@ pub(crate) struct StackState {
     /// The base stack pointer offset.
     /// This offset is set when entering the block, after saving any live
     /// registers and locals.
-    /// It is calcuated by subtracting the size, in bytes, of any block params
+    /// It is calculated by subtracting the size, in bytes, of any block params
     /// to the current stack pointer offset.
     pub base_offset: SPOffset,
     /// The target stack pointer offset.
diff --git a/winch/codegen/src/frame/mod.rs b/winch/codegen/src/frame/mod.rs
index 603f120ed..1ebdace8d 100644
--- a/winch/codegen/src/frame/mod.rs
+++ b/winch/codegen/src/frame/mod.rs
@@ -122,7 +122,7 @@ impl Frame {
                     )),
                     defined_locals_end,
                 ),
-                // If the resuls operand is a register, we give this register
+                // If the results operand is a register, we give this register
                 // the same treatment as all the other argument registers and
                 // spill it, therefore, we need to increase the locals size by
                 // one slot.
diff --git a/winch/codegen/src/isa/x64/asm.rs b/winch/codegen/src/isa/x64/asm.rs
index 5d2e3cc18..85a994c6f 100644
--- a/winch/codegen/src/isa/x64/asm.rs
+++ b/winch/codegen/src/isa/x64/asm.rs
@@ -1276,7 +1276,7 @@ impl Assembler {
         // emitting to binary.
         //
         // See [wasmtime::engine::Engine::check_compatible_with_shared_flag] and
-        // [wasmtime_cranelift::obj::ModuleTextBuilder::apend_func]
+        // [wasmtime_cranelift::obj::ModuleTextBuilder::append_func]
         self.emit(Inst::LoadExtName {
             dst: Writable::from_reg(dst.into()),
             name: Box::new(dest),
diff --git a/winch/codegen/src/masm.rs b/winch/codegen/src/masm.rs
index ffcc37c91..2139a0ce0 100644
--- a/winch/codegen/src/masm.rs
+++ b/winch/codegen/src/masm.rs
@@ -536,7 +536,7 @@ pub(crate) trait MacroAssembler {
     fn store_ptr(&mut self, src: Reg, dst: Self::Address);
 
     /// Perform a WebAssembly store.
-    /// A WebAssebly store introduces several additional invariants compared to
+    /// A WebAssembly store introduces several additional invariants compared to
     /// [Self::store], more precisely, it can implicitly trap, in certain
     /// circumstances, even if explicit bounds checks are elided, in that sense,
     /// we consider this type of load as untrusted. It can also differ with
@@ -549,7 +549,7 @@ pub(crate) trait MacroAssembler {
     fn load(&mut self, src: Self::Address, dst: Reg, size: OperandSize);
 
     /// Perform a WebAssembly load.
-    /// A WebAssebly load introduces several additional invariants compared to
+    /// A WebAssembly load introduces several additional invariants compared to
     /// [Self::load], more precisely, it can implicitly trap, in certain
     /// circumstances, even if explicit bounds checks are elided, in that sense,
     /// we consider this type of load as untrusted. It can also differ with


Test patch:
diff --git a/crates/component-macro/tests/expanded/char.rs b/crates/component-macro/tests/expanded/char.rs
index f5bae77cf..a8b1a428d 100644
--- a/crates/component-macro/tests/expanded/char.rs
+++ b/crates/component-macro/tests/expanded/char.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/char_async.rs b/crates/component-macro/tests/expanded/char_async.rs
index 169eeb6e2..e565be5dc 100644
--- a/crates/component-macro/tests/expanded/char_async.rs
+++ b/crates/component-macro/tests/expanded/char_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/conventions.rs b/crates/component-macro/tests/expanded/conventions.rs
index 464ba2874..1857ae385 100644
--- a/crates/component-macro/tests/expanded/conventions.rs
+++ b/crates/component-macro/tests/expanded/conventions.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/conventions_async.rs b/crates/component-macro/tests/expanded/conventions_async.rs
index 3106702f8..872695740 100644
--- a/crates/component-macro/tests/expanded/conventions_async.rs
+++ b/crates/component-macro/tests/expanded/conventions_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/dead-code.rs b/crates/component-macro/tests/expanded/dead-code.rs
index 483d63899..c0fb29841 100644
--- a/crates/component-macro/tests/expanded/dead-code.rs
+++ b/crates/component-macro/tests/expanded/dead-code.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `imports`.
+/// component which implements the world `imports`.
 ///
 /// This structure is created through [`ImportsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `ImportsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/dead-code_async.rs b/crates/component-macro/tests/expanded/dead-code_async.rs
index de469d126..46110f3cd 100644
--- a/crates/component-macro/tests/expanded/dead-code_async.rs
+++ b/crates/component-macro/tests/expanded/dead-code_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `imports`.
+/// component which implements the world `imports`.
 ///
 /// This structure is created through [`ImportsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `ImportsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/direct-import.rs b/crates/component-macro/tests/expanded/direct-import.rs
index 5ffabde6a..baa6709a2 100644
--- a/crates/component-macro/tests/expanded/direct-import.rs
+++ b/crates/component-macro/tests/expanded/direct-import.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -49,7 +49,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/direct-import_async.rs b/crates/component-macro/tests/expanded/direct-import_async.rs
index 77abe5e4c..cae02be19 100644
--- a/crates/component-macro/tests/expanded/direct-import_async.rs
+++ b/crates/component-macro/tests/expanded/direct-import_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -51,7 +51,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/empty.rs b/crates/component-macro/tests/expanded/empty.rs
index 512c492bb..048156cd1 100644
--- a/crates/component-macro/tests/expanded/empty.rs
+++ b/crates/component-macro/tests/expanded/empty.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `empty`.
+/// component which implements the world `empty`.
 ///
 /// This structure is created through [`EmptyPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `EmptyPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/empty_async.rs b/crates/component-macro/tests/expanded/empty_async.rs
index cc26b32a4..1c4b3fc92 100644
--- a/crates/component-macro/tests/expanded/empty_async.rs
+++ b/crates/component-macro/tests/expanded/empty_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `empty`.
+/// component which implements the world `empty`.
 ///
 /// This structure is created through [`EmptyPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `EmptyPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/flags.rs b/crates/component-macro/tests/expanded/flags.rs
index 82d457849..75b842bdd 100644
--- a/crates/component-macro/tests/expanded/flags.rs
+++ b/crates/component-macro/tests/expanded/flags.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-flags`.
+/// component which implements the world `the-flags`.
 ///
 /// This structure is created through [`TheFlagsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheFlagsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/flags_async.rs b/crates/component-macro/tests/expanded/flags_async.rs
index b61c765c4..8a3ba252f 100644
--- a/crates/component-macro/tests/expanded/flags_async.rs
+++ b/crates/component-macro/tests/expanded/flags_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-flags`.
+/// component which implements the world `the-flags`.
 ///
 /// This structure is created through [`TheFlagsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheFlagsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/floats.rs b/crates/component-macro/tests/expanded/floats.rs
index 7f2439aa6..f3edd4174 100644
--- a/crates/component-macro/tests/expanded/floats.rs
+++ b/crates/component-macro/tests/expanded/floats.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/floats_async.rs b/crates/component-macro/tests/expanded/floats_async.rs
index 49e359b3b..84c9127d1 100644
--- a/crates/component-macro/tests/expanded/floats_async.rs
+++ b/crates/component-macro/tests/expanded/floats_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/function-new.rs b/crates/component-macro/tests/expanded/function-new.rs
index 4ac8dd163..a43b6bf26 100644
--- a/crates/component-macro/tests/expanded/function-new.rs
+++ b/crates/component-macro/tests/expanded/function-new.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/function-new_async.rs b/crates/component-macro/tests/expanded/function-new_async.rs
index ee824225f..a73d9e58b 100644
--- a/crates/component-macro/tests/expanded/function-new_async.rs
+++ b/crates/component-macro/tests/expanded/function-new_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/integers.rs b/crates/component-macro/tests/expanded/integers.rs
index fff62d87b..5c3f8b4c5 100644
--- a/crates/component-macro/tests/expanded/integers.rs
+++ b/crates/component-macro/tests/expanded/integers.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/integers_async.rs b/crates/component-macro/tests/expanded/integers_async.rs
index 00f512a34..3679c95b9 100644
--- a/crates/component-macro/tests/expanded/integers_async.rs
+++ b/crates/component-macro/tests/expanded/integers_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/lists.rs b/crates/component-macro/tests/expanded/lists.rs
index 50d810de2..ae79038a4 100644
--- a/crates/component-macro/tests/expanded/lists.rs
+++ b/crates/component-macro/tests/expanded/lists.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-lists`.
+/// component which implements the world `the-lists`.
 ///
 /// This structure is created through [`TheListsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheListsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/lists_async.rs b/crates/component-macro/tests/expanded/lists_async.rs
index 41a7595e6..aa250df5f 100644
--- a/crates/component-macro/tests/expanded/lists_async.rs
+++ b/crates/component-macro/tests/expanded/lists_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-lists`.
+/// component which implements the world `the-lists`.
 ///
 /// This structure is created through [`TheListsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheListsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/many-arguments.rs b/crates/component-macro/tests/expanded/many-arguments.rs
index faf5f98a1..ea02f665f 100644
--- a/crates/component-macro/tests/expanded/many-arguments.rs
+++ b/crates/component-macro/tests/expanded/many-arguments.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/many-arguments_async.rs b/crates/component-macro/tests/expanded/many-arguments_async.rs
index 24d971491..a69503d28 100644
--- a/crates/component-macro/tests/expanded/many-arguments_async.rs
+++ b/crates/component-macro/tests/expanded/many-arguments_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/multi-return.rs b/crates/component-macro/tests/expanded/multi-return.rs
index 1e01f9d27..b882e7404 100644
--- a/crates/component-macro/tests/expanded/multi-return.rs
+++ b/crates/component-macro/tests/expanded/multi-return.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/multi-return_async.rs b/crates/component-macro/tests/expanded/multi-return_async.rs
index 1d7d4e888..83fd418ba 100644
--- a/crates/component-macro/tests/expanded/multi-return_async.rs
+++ b/crates/component-macro/tests/expanded/multi-return_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/multiversion.rs b/crates/component-macro/tests/expanded/multiversion.rs
index f8e209a6a..0bb990448 100644
--- a/crates/component-macro/tests/expanded/multiversion.rs
+++ b/crates/component-macro/tests/expanded/multiversion.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -36,7 +36,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/multiversion_async.rs b/crates/component-macro/tests/expanded/multiversion_async.rs
index bd5b54746..a35a919d8 100644
--- a/crates/component-macro/tests/expanded/multiversion_async.rs
+++ b/crates/component-macro/tests/expanded/multiversion_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -36,7 +36,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/records.rs b/crates/component-macro/tests/expanded/records.rs
index 5c14c14c7..428f92221 100644
--- a/crates/component-macro/tests/expanded/records.rs
+++ b/crates/component-macro/tests/expanded/records.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/records_async.rs b/crates/component-macro/tests/expanded/records_async.rs
index 16a9151c8..f02a92c52 100644
--- a/crates/component-macro/tests/expanded/records_async.rs
+++ b/crates/component-macro/tests/expanded/records_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/rename.rs b/crates/component-macro/tests/expanded/rename.rs
index a6b804943..def16f934 100644
--- a/crates/component-macro/tests/expanded/rename.rs
+++ b/crates/component-macro/tests/expanded/rename.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `neptune`.
+/// component which implements the world `neptune`.
 ///
 /// This structure is created through [`NeptunePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `NeptunePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/rename_async.rs b/crates/component-macro/tests/expanded/rename_async.rs
index facb43d20..09a9efe5d 100644
--- a/crates/component-macro/tests/expanded/rename_async.rs
+++ b/crates/component-macro/tests/expanded/rename_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `neptune`.
+/// component which implements the world `neptune`.
 ///
 /// This structure is created through [`NeptunePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `NeptunePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/resources-export.rs b/crates/component-macro/tests/expanded/resources-export.rs
index 043aa5fa8..c83dc360c 100644
--- a/crates/component-macro/tests/expanded/resources-export.rs
+++ b/crates/component-macro/tests/expanded/resources-export.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `w`.
+/// component which implements the world `w`.
 ///
 /// This structure is created through [`WPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -42,7 +42,7 @@ const _: () = {
         /// Creates a new copy of `WPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/resources-export_async.rs b/crates/component-macro/tests/expanded/resources-export_async.rs
index 138962f34..45c7f3d10 100644
--- a/crates/component-macro/tests/expanded/resources-export_async.rs
+++ b/crates/component-macro/tests/expanded/resources-export_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `w`.
+/// component which implements the world `w`.
 ///
 /// This structure is created through [`WPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -42,7 +42,7 @@ const _: () = {
         /// Creates a new copy of `WPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/resources-import.rs b/crates/component-macro/tests/expanded/resources-import.rs
index 726c98182..69e24379a 100644
--- a/crates/component-macro/tests/expanded/resources-import.rs
+++ b/crates/component-macro/tests/expanded/resources-import.rs
@@ -26,7 +26,7 @@ impl<_T: HostWorldResource + ?Sized> HostWorldResource for &mut _T {
     }
 }
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -83,7 +83,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/resources-import_async.rs b/crates/component-macro/tests/expanded/resources-import_async.rs
index 80fe5d48f..ff815fa1c 100644
--- a/crates/component-macro/tests/expanded/resources-import_async.rs
+++ b/crates/component-macro/tests/expanded/resources-import_async.rs
@@ -28,7 +28,7 @@ impl<_T: HostWorldResource + ?Sized + Send> HostWorldResource for &mut _T {
     }
 }
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -87,7 +87,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/share-types.rs b/crates/component-macro/tests/expanded/share-types.rs
index bb96f9779..5818b3c48 100644
--- a/crates/component-macro/tests/expanded/share-types.rs
+++ b/crates/component-macro/tests/expanded/share-types.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `http-interface`.
+/// component which implements the world `http-interface`.
 ///
 /// This structure is created through [`HttpInterfacePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `HttpInterfacePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/share-types_async.rs b/crates/component-macro/tests/expanded/share-types_async.rs
index ce4e84280..b126ec596 100644
--- a/crates/component-macro/tests/expanded/share-types_async.rs
+++ b/crates/component-macro/tests/expanded/share-types_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `http-interface`.
+/// component which implements the world `http-interface`.
 ///
 /// This structure is created through [`HttpInterfacePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `HttpInterfacePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-functions.rs b/crates/component-macro/tests/expanded/simple-functions.rs
index 48c638b89..a8ea93c6e 100644
--- a/crates/component-macro/tests/expanded/simple-functions.rs
+++ b/crates/component-macro/tests/expanded/simple-functions.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-functions_async.rs b/crates/component-macro/tests/expanded/simple-functions_async.rs
index 0cdedfd2b..ae674433e 100644
--- a/crates/component-macro/tests/expanded/simple-functions_async.rs
+++ b/crates/component-macro/tests/expanded/simple-functions_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-lists.rs b/crates/component-macro/tests/expanded/simple-lists.rs
index 8d9d9515b..26d93b444 100644
--- a/crates/component-macro/tests/expanded/simple-lists.rs
+++ b/crates/component-macro/tests/expanded/simple-lists.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `my-world`.
+/// component which implements the world `my-world`.
 ///
 /// This structure is created through [`MyWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `MyWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-lists_async.rs b/crates/component-macro/tests/expanded/simple-lists_async.rs
index a71e897e6..7c44e359a 100644
--- a/crates/component-macro/tests/expanded/simple-lists_async.rs
+++ b/crates/component-macro/tests/expanded/simple-lists_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `my-world`.
+/// component which implements the world `my-world`.
 ///
 /// This structure is created through [`MyWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `MyWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-wasi.rs b/crates/component-macro/tests/expanded/simple-wasi.rs
index cd13ac943..b35cd47d4 100644
--- a/crates/component-macro/tests/expanded/simple-wasi.rs
+++ b/crates/component-macro/tests/expanded/simple-wasi.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `wasi`.
+/// component which implements the world `wasi`.
 ///
 /// This structure is created through [`WasiPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `WasiPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-wasi_async.rs b/crates/component-macro/tests/expanded/simple-wasi_async.rs
index 39b6f7f5d..0d8706e7f 100644
--- a/crates/component-macro/tests/expanded/simple-wasi_async.rs
+++ b/crates/component-macro/tests/expanded/simple-wasi_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `wasi`.
+/// component which implements the world `wasi`.
 ///
 /// This structure is created through [`WasiPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `WasiPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/small-anonymous.rs b/crates/component-macro/tests/expanded/small-anonymous.rs
index abd81339f..309b6b999 100644
--- a/crates/component-macro/tests/expanded/small-anonymous.rs
+++ b/crates/component-macro/tests/expanded/small-anonymous.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/small-anonymous_async.rs b/crates/component-macro/tests/expanded/small-anonymous_async.rs
index 753e5d663..2e4d950ed 100644
--- a/crates/component-macro/tests/expanded/small-anonymous_async.rs
+++ b/crates/component-macro/tests/expanded/small-anonymous_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke-default.rs b/crates/component-macro/tests/expanded/smoke-default.rs
index a2db160bc..6d971d718 100644
--- a/crates/component-macro/tests/expanded/smoke-default.rs
+++ b/crates/component-macro/tests/expanded/smoke-default.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke-default_async.rs b/crates/component-macro/tests/expanded/smoke-default_async.rs
index e1f8d2640..d37c7f36d 100644
--- a/crates/component-macro/tests/expanded/smoke-default_async.rs
+++ b/crates/component-macro/tests/expanded/smoke-default_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke-export.rs b/crates/component-macro/tests/expanded/smoke-export.rs
index 0e292da5f..a32cdef51 100644
--- a/crates/component-macro/tests/expanded/smoke-export.rs
+++ b/crates/component-macro/tests/expanded/smoke-export.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke-export_async.rs b/crates/component-macro/tests/expanded/smoke-export_async.rs
index b84ad0471..381e8e72a 100644
--- a/crates/component-macro/tests/expanded/smoke-export_async.rs
+++ b/crates/component-macro/tests/expanded/smoke-export_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke.rs b/crates/component-macro/tests/expanded/smoke.rs
index f05cf9584..302cdfa0a 100644
--- a/crates/component-macro/tests/expanded/smoke.rs
+++ b/crates/component-macro/tests/expanded/smoke.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke_async.rs b/crates/component-macro/tests/expanded/smoke_async.rs
index 5faac73d9..38ea2a90c 100644
--- a/crates/component-macro/tests/expanded/smoke_async.rs
+++ b/crates/component-macro/tests/expanded/smoke_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/strings.rs b/crates/component-macro/tests/expanded/strings.rs
index 3d69053d7..858ecc156 100644
--- a/crates/component-macro/tests/expanded/strings.rs
+++ b/crates/component-macro/tests/expanded/strings.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/strings_async.rs b/crates/component-macro/tests/expanded/strings_async.rs
index 41eef14bd..3450c3cf8 100644
--- a/crates/component-macro/tests/expanded/strings_async.rs
+++ b/crates/component-macro/tests/expanded/strings_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/unversioned-foo.rs b/crates/component-macro/tests/expanded/unversioned-foo.rs
index ea3e2435d..33bb74af8 100644
--- a/crates/component-macro/tests/expanded/unversioned-foo.rs
+++ b/crates/component-macro/tests/expanded/unversioned-foo.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `nope`.
+/// component which implements the world `nope`.
 ///
 /// This structure is created through [`NopePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `NopePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/unversioned-foo_async.rs b/crates/component-macro/tests/expanded/unversioned-foo_async.rs
index 37b181e42..5e4bc7b9e 100644
--- a/crates/component-macro/tests/expanded/unversioned-foo_async.rs
+++ b/crates/component-macro/tests/expanded/unversioned-foo_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `nope`.
+/// component which implements the world `nope`.
 ///
 /// This structure is created through [`NopePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `NopePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/use-paths.rs b/crates/component-macro/tests/expanded/use-paths.rs
index 6991bd6a4..cda46ef26 100644
--- a/crates/component-macro/tests/expanded/use-paths.rs
+++ b/crates/component-macro/tests/expanded/use-paths.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `d`.
+/// component which implements the world `d`.
 ///
 /// This structure is created through [`DPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `DPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/use-paths_async.rs b/crates/component-macro/tests/expanded/use-paths_async.rs
index 6ca659760..470bd5720 100644
--- a/crates/component-macro/tests/expanded/use-paths_async.rs
+++ b/crates/component-macro/tests/expanded/use-paths_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `d`.
+/// component which implements the world `d`.
 ///
 /// This structure is created through [`DPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `DPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/variants.rs b/crates/component-macro/tests/expanded/variants.rs
index b85acf569..6ef1217a7 100644
--- a/crates/component-macro/tests/expanded/variants.rs
+++ b/crates/component-macro/tests/expanded/variants.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `my-world`.
+/// component which implements the world `my-world`.
 ///
 /// This structure is created through [`MyWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `MyWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/variants_async.rs b/crates/component-macro/tests/expanded/variants_async.rs
index 1295127ea..a5b16f188 100644
--- a/crates/component-macro/tests/expanded/variants_async.rs
+++ b/crates/component-macro/tests/expanded/variants_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `my-world`.
+/// component which implements the world `my-world`.
 ///
 /// This structure is created through [`MyWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `MyWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/wat.rs b/crates/component-macro/tests/expanded/wat.rs
index f9bdb92e3..767ed4972 100644
--- a/crates/component-macro/tests/expanded/wat.rs
+++ b/crates/component-macro/tests/expanded/wat.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `example`.
+/// component which implements the world `example`.
 ///
 /// This structure is created through [`ExamplePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `ExamplePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/wat_async.rs b/crates/component-macro/tests/expanded/wat_async.rs
index 1c263394c..0fc5295cd 100644
--- a/crates/component-macro/tests/expanded/wat_async.rs
+++ b/crates/component-macro/tests/expanded/wat_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `example`.
+/// component which implements the world `example`.
 ///
 /// This structure is created through [`ExamplePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `ExamplePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/worlds-with-types.rs b/crates/component-macro/tests/expanded/worlds-with-types.rs
index cbe2972f6..151154374 100644
--- a/crates/component-macro/tests/expanded/worlds-with-types.rs
+++ b/crates/component-macro/tests/expanded/worlds-with-types.rs
@@ -24,7 +24,7 @@ const _: () = {
     assert!(1 == < R as wasmtime::component::ComponentType >::ALIGN32);
 };
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -58,7 +58,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/worlds-with-types_async.rs b/crates/component-macro/tests/expanded/worlds-with-types_async.rs
index 57cd78cae..e771f3395 100644
--- a/crates/component-macro/tests/expanded/worlds-with-types_async.rs
+++ b/crates/component-macro/tests/expanded/worlds-with-types_async.rs
@@ -24,7 +24,7 @@ const _: () = {
     assert!(1 == < R as wasmtime::component::ComponentType >::ALIGN32);
 };
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -58,7 +58,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/test-programs/src/bin/preview1_poll_oneoff_files.rs b/crates/test-programs/src/bin/preview1_poll_oneoff_files.rs
index 57778f88b..21d81e2fa 100644
--- a/crates/test-programs/src/bin/preview1_poll_oneoff_files.rs
+++ b/crates/test-programs/src/bin/preview1_poll_oneoff_files.rs
@@ -13,7 +13,7 @@ unsafe fn poll_oneoff_impl(r#in: &[wasi::Subscription]) -> Result<Vec<wasi::Even
     Ok(out)
 }
 
-/// Repeatedly call `poll_oneoff` until all the subcriptions in `in` have
+/// Repeatedly call `poll_oneoff` until all the subscriptions in `in` have
 /// seen their events occur.
 unsafe fn poll_oneoff_with_retry(
     r#in: &[wasi::Subscription],
diff --git a/crates/wiggle/tests/typenames.witx b/crates/wiggle/tests/typenames.witx
index df60c5c34..5cb1c0a13 100644
--- a/crates/wiggle/tests/typenames.witx
+++ b/crates/wiggle/tests/typenames.witx
@@ -523,7 +523,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.