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:
Taylor Robbins (Piggybank Studios)
2025-08-28 09:44:32 -07:00
parent aa2faca658
commit deae3ccd12
20 changed files with 2882 additions and 85 deletions

14
std/assert.h Normal file
View File

@@ -0,0 +1,14 @@
/*
File: assert.h
Author: Taylor Robbins
Date: 08\28\2025
*/
#ifndef _ASSERT_H
#define _ASSERT_H
#define assert(condition) do { if (!(condition)) { jsStdAssertFailure(__FILE__, __LINE__, __func__, #condition, nullptr); } } while(0)
//NOTE: assert_msg is not a standard function but we want to be able to pass a message to jsStdAssertFailure so we added this variant
#define assert_msg(condition, message) do { if (!(condition)) { jsStdAssertFailure(__FILE__, __LINE__, __func__, #condition, (message)); } } while(0)
#endif // _ASSERT_H