mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +00:00
cgo: add support for stdio in picolibc and wasi-libc
This adds support for stdio in picolibc and fixes wasm_exec.js so that it can also support C puts. With this, C stdout works on all supported platforms.
This commit is contained in:
committed by
Ron Evans
parent
1645f45c1a
commit
14bb90c3c0
@@ -46,6 +46,11 @@ func libc_free(ptr unsafe.Pointer) {
|
||||
free(ptr)
|
||||
}
|
||||
|
||||
//export runtime_putchar
|
||||
func runtime_putchar(c byte) {
|
||||
putchar(c)
|
||||
}
|
||||
|
||||
//go:linkname syscall_Exit syscall.Exit
|
||||
func syscall_Exit(code int) {
|
||||
exit(code)
|
||||
|
||||
Reference in New Issue
Block a user