Got a basic WebAssembly module compiling with support for calling jsStdPrint through printf implementation (provided by stb_sprintf.h). We have a single function "HelloFromWasm" exported for testing purposes. Pulled in a bunch of standard library headers from PigCore's wasm layer.
This commit is contained in:
27
std/stdio.h
Normal file
27
std/stdio.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
File: stdio.h
|
||||
Author: Taylor Robbins
|
||||
Date: 08\28\2025
|
||||
*/
|
||||
|
||||
#ifndef _STDIO_H
|
||||
#define _STDIO_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
MAYBE_START_EXTERN_C
|
||||
|
||||
int vprintf(const char* formatStr, va_list args);
|
||||
// TODO: int vfprintf(FILE*, const char*, va_list args);
|
||||
int vsprintf(char* bufferPntr, const char* formatStr, va_list args);
|
||||
int vsnprintf(char* bufferPntr, size_t bufferSize, const char* formatStr, va_list args);
|
||||
|
||||
int printf(const char* formatStr, ...);
|
||||
// TODO: int fprintf(FILE*, const char*, ...);
|
||||
int sprintf(char* bufferPntr, const char* formatStr, ...);
|
||||
int snprintf(char* bufferPntr, size_t bufferSize, const char* formatStr, ...);
|
||||
|
||||
MAYBE_END_EXTERN_C
|
||||
|
||||
#endif // _STDIO_H
|
||||
Reference in New Issue
Block a user