mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-02 07:51:03 +00:00
* Move wasmer-runtime to wasmer-runtime-core * Add the runtime library * Fix issue with macros using wasmer_runtime, fmt * Make default compiler dependency optional * Add instantiate and validate functions
16 lines
389 B
Rust
16 lines
389 B
Rust
use libc::printf as _printf;
|
|
|
|
use wasmer_runtime_core::Instance;
|
|
|
|
/// putchar
|
|
pub use libc::putchar;
|
|
|
|
/// printf
|
|
pub extern "C" fn printf(memory_offset: i32, extra: i32, instance: &Instance) -> i32 {
|
|
debug!("emscripten::printf {}, {}", memory_offset, extra);
|
|
unsafe {
|
|
let addr = instance.memory_offset_addr(0, memory_offset as _) as _;
|
|
_printf(addr, extra)
|
|
}
|
|
}
|