Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/bevy_reflect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,14 +793,14 @@ pub mod __macro_exports {
if INIT_DONE.swap(true, Ordering::Relaxed) {
return;
};
// SAFETY:
// This will call constructors on wasm platforms at most once (as long as `init` is the only function that calls `__wasm_call_ctors`).
//
// For more information see: https://docs.rs/inventory/latest/inventory/#webassembly-and-constructors
#[expect(
unsafe_code,
reason = "This function must be called to use inventory on wasm."
)]
// SAFETY:
// This will call constructors on wasm platforms at most once (as long as `init` is the only function that calls `__wasm_call_ctors`).
//
// For more information see: https://docs.rs/inventory/latest/inventory/#webassembly-and-constructors
unsafe {
__wasm_call_ctors();
}
Expand Down