https://github.com/kaiepi/id-sixel
Idris 2 libsixel bindings
https://github.com/kaiepi/id-sixel
idris2 libsixel sixel
Last synced: 4 months ago
JSON representation
Idris 2 libsixel bindings
- Host: GitHub
- URL: https://github.com/kaiepi/id-sixel
- Owner: Kaiepi
- License: bsd-3-clause
- Created: 2021-06-20T01:15:06.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-20T16:04:35.000Z (almost 5 years ago)
- Last Synced: 2025-04-10T05:56:21.169Z (about 1 year ago)
- Topics: idris2, libsixel, sixel
- Language: Idris
- Homepage:
- Size: 5.54 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# Sixel
Idris 2 bindings for [libsixel](https://github.com/saitoha/libsixel/).
Refer to `examples/` for usage.
## Dependencies
Refer to [libsixel's README](https://github.com/saitoha/libsixel#install) 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](https://cmake.org/install/).
## Install
```sh
$ 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 `unref`s will
throw a typechecking error.
- Tested on OpenBSD -current amd64 as of 2021/06.