For now I've replaced
        let mut a = ApplicationData { some_value:1982 };
        let ptr = &mut a as *mut _ as *mut std::os::raw::c_void;

with
        let mut a = Box::new(ApplicationData { some_value:1982 });
        let static_ref: &'static mut Application = Box::leak(app);
        let ptr = static_ref a as *mut _ as *mut std::os::raw::c_void;

and it seems to work.... Basically I tell Rust to allocate the 
ApplicationData on the heap and to let it lives till the end of the 
program. I'm really new to Rust, so it might not be the best solution... If 
someone has a better idea, I'll take it.

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to