Skip to content

dbuenzli/tsdl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

049bf75 · Mar 3, 2025
Sep 13, 2024
Sep 12, 2024
Mar 3, 2025
Mar 3, 2025
Mar 3, 2025
May 31, 2022
Sep 13, 2023
Mar 15, 2015
Sep 12, 2024
May 31, 2022
Jan 4, 2025
Dec 27, 2017
Sep 12, 2024
Sep 12, 2024
Oct 25, 2024
Dec 29, 2024

Repository files navigation

Tsdl — Thin bindings to SDL for OCaml

Tsdl is an OCaml library providing thin bindings to the cross-platform SDL library.

Tsdl depends on the C library SDL 2.0.18 (or later), ocaml-ctypes. Tsdl is distributed under the ISC license.

Home page: http://erratique.ch/software/tsdl

Installation

Tsdl needs the C library SDL 2.0.18 or later installed on your system. Tsdl can be installed with opam:

opam install tsdl

If you don't use opam consult the opam file for build instructions and a complete specification of the dependencies.

Documentation

The documentation can be consulted online or via odig doc tsdl.

Questions are welcome but better asked on the OCaml forum than on the issue tracker.

Sample programs

Sample programs are located in the test directory of the distribution. They can be built with:

./pkg/pkg.ml build --tests true

and listed with

./pkg/pkg.ml test --list

The resulting binaries are in _build/test :

  • test_tsdl.native, tests the bindings, the executable should exit with 0.
  • sdlevents.native, traces SDL events.
  • min.native a minimal SDL example.