33 lines
721 B
C
33 lines
721 B
C
/*
|
|
File: main.c
|
|
Author: Taylor Robbins
|
|
Date: 08\28\2025
|
|
Description:
|
|
** This file serves as the compilable file for all of CWasm. It may be #included by the app.c file
|
|
*/
|
|
|
|
#include "cwasm.h"
|
|
|
|
#include "std/src/std_main.c"
|
|
|
|
#include "cwasm_debug.c"
|
|
#include "cwasm_vectors.c"
|
|
#include "cwasm_matrices.c"
|
|
#include "cwasm_arena.c"
|
|
|
|
#include "cwasm_webgl_js_imports.h"
|
|
#include "cwasm_webgl_constants.h"
|
|
|
|
void InitializeCWasm(u32 scratchArenasSize)
|
|
{
|
|
InitGlobalArenas(scratchArenasSize);
|
|
}
|
|
|
|
WASM_EXPORT(cAllocMem) void* cAllocMem(Arena* arenaPntr, int numBytes, int alignment)
|
|
{
|
|
NotNull(arenaPntr);
|
|
Assert(numBytes >= 0);
|
|
Assert(alignment >= 0);
|
|
return AllocMemAligned(arenaPntr, (u32)numBytes, (u32)alignment);
|
|
}
|