summaryrefslogtreecommitdiffstats
path: root/tests/run-make/wasm-symbols-different-module/log.rs
blob: ea3e0b4b2be91c001a2dc10864936a9309910059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Issue #56309

#![crate_type = "cdylib"]

#[link(wasm_import_module = "test")]
extern "C" {
    fn log(message_data: u32, message_size: u32);
}

#[no_mangle]
pub fn main() {
    let message = "Hello, world!";
    unsafe {
        log(message.as_ptr() as u32, message.len() as u32);
    }
}