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
void print_str(wasmer_instance_context_t *ctx, int32_t ptr, int32_t len) | |
{ | |
print_str_called = true; | |
wasmer_memory_t *memory = wasmer_instance_context_memory(ctx, 0); | |
uint32_t mem_len = wasmer_memory_length(memory); | |
uint8_t *mem_bytes = wasmer_memory_data(memory); | |
printf("%.*s", len, mem_bytes + ptr); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment