Low(ish)-level AGS bindings for PureScript.
Standalone subprojects in the examples/
directory demonstrate how to use AGS with PureScript.
Head over to examples/README.md
for more information.
This library can be used in different ways. An example setup would look as follows:
Add a module which would serve as entrypoint to AGS.
It should export a value called main
which would have the type Effect { windows ∷ Array Window }
.
Then, create a file entrypoint.js
which would setup AGS and re-export the windows from the PureScript module.
import { main } from "./index.js"
// Any necessary AGS setup would go here
//
//
export default { windows: main().windows }
> spago bundle --bundle-type module --bundler-args '--external:gi://*' --module '<entrypoint module>'
> ags -c ./entrypoint.js
Or to run with GTK inspector:
> ags -c ./entrypoint.js -i