Update salsa (#19258)

## Summary

Pulls in https://github.com/salsa-rs/salsa/pull/934.
This commit is contained in:
Ibraheem Ahmed 2025-07-18 12:14:28 -04:00 committed by GitHub
parent 64f9481fd0
commit e6e029a8b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 69 additions and 26 deletions

View file

@ -77,10 +77,31 @@ struct ExpandedEdit {
content: Option<String>,
}
/// Perform global constructor initialization.
#[cfg(target_family = "wasm")]
#[expect(unsafe_code)]
pub fn before_main() {
unsafe extern "C" {
fn __wasm_call_ctors();
}
// Salsa uses the `inventory` crate, which registers global constructors that may need to be
// called explicitly on WASM. See <https://github.com/dtolnay/inventory/blob/master/src/lib.rs#L105>
// for details.
unsafe {
__wasm_call_ctors();
}
}
#[cfg(not(target_family = "wasm"))]
pub fn before_main() {}
#[wasm_bindgen(start)]
pub fn run() {
use log::Level;
before_main();
// When the `console_error_panic_hook` feature is enabled, we can call the
// `set_panic_hook` function at least once during initialization, and then
// we will get better error messages if our code ever panics.