Skip to content

Kaiepi/id-sixel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sixel

Idris 2 bindings for libsixel.

Refer to examples/ for usage.

Dependencies

Refer to libsixel's README for instructions for your platform. Ensure libsixel.so (wherever it may be) is loadable by idris2; if it isn't by default, append its directory to the IDRIS2_LIBS environment variable.

Builds and installation of this module depend on cmake.

Install

$ cmake .
$ cmake --build .
$ cmake --install .

Notes

  • Bindings should match the level of support of those for Python. This implies sixel_decode_raw is NYI.
  • In general, bindings are named after a libsixel function stripped of any namespace, with the exception of constructors, which are given a Mk-prefixed name, e.g. sixel_allocator_new becomes MkAllocator and sixel_allocator_malloc becomes malloc.
  • With the exception of Allocator, libsixel structures are garbage collected. Allocators can be freed with destroy.
  • Reference count bounds are enforced statically, so too many unrefs will throw a typechecking error.
  • Tested on OpenBSD -current amd64 as of 2021/06.