2
0
Jeroen van Rijn 998fbdc5c0 Doc lines for vendor:* 1 долоо хоног өмнө
..
include e086151fcd box2d: update to 3.1.0 6 сар өмнө
README.md 5ae27c6ebc wasm: support more vendor libraries 1 жил өмнө
assert.odin 5ae27c6ebc wasm: support more vendor libraries 1 жил өмнө
ctype.odin 140c902eff vendor/libc: a bunch of additions 7 сар өмнө
libc.odin 0f5ced52a0 Assign `context` in scope 2 сар өмнө
math.odin 140c902eff vendor/libc: a bunch of additions 7 сар өмнө
sched.odin 38f56c0ede box2d: update windows libs to 3.1.0 and call thread.yield in vendor/libc 6 сар өмнө
stdio.odin 140c902eff vendor/libc: a bunch of additions 7 сар өмнө
stdlib.odin 998fbdc5c0 Doc lines for vendor:* 1 долоо хоног өмнө
string.odin 140c902eff vendor/libc: a bunch of additions 7 сар өмнө
time.odin 140c902eff vendor/libc: a bunch of additions 7 сар өмнө

README.md

vendor:libc

A (very small) subset of a libc implementation over Odin libraries. This is mainly intended for use in Odin WASM builds to allow using libraries like box2d, cgltf etc. without emscripten hacks.

You can use this with clang by doing clang -c --target=wasm32 --sysroot=$(odin root)/vendor/libc (+ all other flags and inputs). This will (if all the libc usage of the library is implemented) spit out a .o file you can use with the foreign import system. If you then also make sure this package is included in the Odin side of the project (@(require) import "vendor:libc") you will be able compile to WASM like Odin expects.

This is currently used by vendor:box2d, vendor:stb/image, vendor:stb/truetype, vendor:stb/rect_pack, and vendor:cgltf. You can see how building works by looking at those.