- __syscall1 - exit
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|=== <Program> ===| | |
#__crystal_get_exception(Pointer(LibUnwind::Exception)) | |
#__crystal_malloc(UInt32) | |
#__crystal_malloc_atomic(UInt32) | |
#__crystal_personality(Int32, LibUnwind::Action, UInt64, Pointer(LibUnwind::Exception), Pointer(Void)) | |
#__crystal_raise(Pointer(LibUnwind::Exception)) | |
#__crystal_raise_string(Pointer(UInt8)) | |
#__crystal_realloc(Pointer(Void), UInt32) | |
#__crystal_sigfault_handler(Int32, Pointer(Void)) | |
#_fiber_get_stack_top() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import cdll, c_int, c_uint, c_void_p, CFUNCTYPE | |
# Load library and get library | |
lib = cdll.LoadLibrary('./libwasmer.so') | |
# Get compile function | |
compile = lib.compile | |
compile.restype = c_void_p # vmctx_addr | |
# NOTE: Ideally we will pass import objects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(type $t1 (func (param i32))) | |
(type $t2 (func (param i32 i32 i32) (result i32))) | |
(type $t3 (func (param i32) (result i32))) | |
(type $t4 (func (param i32 i32) (result i32))) | |
(func $putchar (import "env" "putchar") (type $t1)) | |
(func $printf (import "env" "printf") (type $t4)) | |
(func $sys_open (import "env" "sys_open") (type $t2)) | |
(func $sys_read (import "env" "sys_read") (type $t2)) | |
(func $sys_close (import "env" "sys_close") (type $t3)) |
Test
Test
Test
Test
Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(import "wasi_unstable" "fd_write" (func $fd_write (param i32 i32 i32 i32) (result i32))) | |
(import "wasi_unstable" "fd_read" (func $fd_read (param i32 i32 i32 i32) (result i32))) | |
(memory 10) | |
(export "memory" (memory 0)) | |
;; prompt __wasi_ciovec_t struct | |
(data (i32.const 0) "\08\00\00\00") ;; buf: pointer to prompt string | |
(data (i32.const 4) "\02\00\00\00") ;; buf_len: 2 characters |
OlderNewer