Skip to main content


SDL bindings for TypeScript.

Currently working via deno on Windows and Linux using FFI (Foreign Function Interface).


  • Resembling the C API as much as possible. If someone reads a SDL tutorial (for example LazyFoo) then they should be able to easily translate the tutorial to the equivalent in this library.

Non Goals

  • Creating a higher level API or Game Framework. This library’s only purpose is to expose the SDL API to deno.

Getting Started

Creating a Project

To aid in creating a new project which uses SDL_ts there is an init.ts script to aid in getting your project set up:

deno run --allow-net --allow-read=/path/to/project --allow-write=/path/to/project --import-map /path/to/project

Replace /path/to/project with the desired project path. After that the new project can be started via a deno task:

deno task start

You should be presented with a window titled “SDL_ts”.


Deno images taken from

Thanks to: