Avatar
それで最初のissueの通りの解法になるのね、理解 #if os(WASI) import WASILibc typealias FILEPointer = OpaquePointer #else import Darwin typealias FILEPointer = UnsafeMutablePointer<FILE> #endif func fputs(_ string: String, file: FILEPointer) { _ = string.withCString { (cstr) in fputs(cstr, file) } } fputs("hello stdout", file: stdout) fputs("hello stderr", file: stderr)