h-raylib: Raylib bindings for Haskell

[ apache, graphics, library ] [ Propose Tags ]

This library includes Haskell bindings to the Raylib library. It supports Windows, Mac, Linux, and BSD.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
detect-platform

Detect platform and automatically add platform-specific configuration

Enabled
platform-windows

Build for Windows

Disabled
platform-mac

Build for macOS/OSX

Disabled
platform-linux

Build for Linux

Disabled
platform-bsd

Build for FreeBSD, OpenBSD, or NetBSD

Disabled
mingw-cross

Cross-compiling for mingw (used in combination with Windows)

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 4.5.0.1, 4.5.0.2, 4.5.0.3, 4.5.0.4, 4.5.0.5, 4.5.0.6, 4.5.0.7
Change log CHANGELOG.md
Dependencies base (>=4.0 && <4.17.0) [details]
License Apache-2.0
Author Anut
Maintainer Anut
Category graphics
Bug tracker https://github.com/Anut-py/h-raylib/issues
Uploaded by Anut at 2022-11-24T18:23:50Z
Distributions NixOS:4.5.0.3
Downloads 126 total (77 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for h-raylib-4.5.0.6

[back to package description]

h-raylib: Haskell bindings for Raylib

This library includes Haskell bindings to the Raylib library.

Usage

To use this package, include it as a dependency in your cabal file.

build-depends:
  base,
  # ...
  h-raylib

Your platform-specific dependencies will automatically be built by default. You may want to disable this behavior. You can disable the detect-platform flag to achieve this.

You can do this through the command line when running your project, like so

cabal run --constraint="h-raylib -detect-platform"

Or you can add it to your cabal.project file.

package h-raylib
  flags: -detect-platform

The flags platform-windows, platform-mac, platform-linux, and platform-bsd are also supported if you want to build for a different platform.

Platform specific requirements

This library has been tested on Windows and Ubuntu through WSL. It may not work properly on other platforms, so don't hesitate to report issues on the GitHub repository.

Windows

h-raylib should automatically work if you do not disable the detect-platform flag. In that case, you may skip this step.

If you do disable the detect-platform flag when building:

Add the following in your cabal file, or use the platform-windows flag when building.

extra-libraries: gdi32 opengl32 winmm kernel32

Ubuntu/Debian based systems

You may need to run the following to install X11 (a window manager for Linux).

sudo apt-get install libx11-dev libxrandr-dev libxi-dev libxcursor-dev libxinerama-dev

Now, h-raylib should automatically work if you do not disable the detect-platform flag. In that case, you may skip the following.

If you do disable the detect-platform flag when building:

Include the following in your cabal file, or use the platform-linux flag when building

extra-libraries: GL c m pthread dl rt X11 Xinerama Xcursor Xrandr Xi

Other platforms

This library has not yet been tested on platforms other than Windows and Ubuntu. Anybody willing to try is welcome.

If you get it working on other platforms, please create a pull request in the GitHub repository and update h-raylib.cabal with the relevant config.

Contributing

Anybody willing to contribute to the project is welcome to do so. This library is very new, so please report any bugs in the GitHub issue tracker.

You can run the examples by using cabal run in the example project directory.

License

This project is licensed under the Apache License 2.0. See more in LICENSE.