title: How to write an Emscripten shim for a C library
body: <p>How do I write a custom Emscripten shim for a C library? Emscripten bundles shims for certain C libraries such as SDL and OpenAL, but for other libraries you're going to have to roll your own.</p>
  
  <p>By shim I mean, a JavaScript replacement for a C library that the code to be ported depends on.</p>