Skip to content

Commit

Permalink
Make set seed extern C
Browse files Browse the repository at this point in the history
  • Loading branch information
swernli committed Dec 12, 2024
1 parent ba8de24 commit 94432f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ thread_local! {
}

/// Sets the seed for the pseudo-random number generator used during measurements.
pub fn set_rng_seed(seed: u64) {
#[no_mangle]
pub extern "C" fn set_rng_seed(seed: u64) {
SIM_STATE.with(|sim_state| {
let state = &mut *sim_state.borrow_mut();
state.sim.set_rng_seed(seed);
Expand Down

0 comments on commit 94432f3

Please sign in to comment.