pepebecker / multi-target-c-project

Home Page:https://pepe.asia/multi-target-c-project/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-Target C Project

This is a personal project to learn how to create a C API with multiple targets such as native and WebAssembly.

Prerequisites

  • SDL2
  • SDL2_gfx
  • Clang (Recent version which supports the wasm compilation target)

Compile & Run Natively

make

Compile to WebAssembly

make wasm

Now serve the web directory locally and open the page in your browser.

Example Server

cd web # Navigate into the web directory
python3 -m http.server # Start the server

Now navigate to http://localhost:8000 in your browser.

About

https://pepe.asia/multi-target-c-project/


Languages

Language:C 51.3%Language:JavaScript 32.8%Language:CSS 11.4%Language:Makefile 2.9%Language:HTML 1.6%