Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukewilliamboswell/roc-graphics-mach
https://github.com/lukewilliamboswell/roc-graphics-mach
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/lukewilliamboswell/roc-graphics-mach
- Owner: lukewilliamboswell
- Created: 2023-10-04T00:14:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-21T07:26:59.000Z (about 1 year ago)
- Last Synced: 2024-04-19T19:02:11.239Z (9 months ago)
- Language: Zig
- Size: 233 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- roc-awesome - lukewilliamboswell/roc-graphics-mach - core (Experiments ðŸ”)
README
# Roc 💜 Zig + Mach 🟰 Graphics 🎉
An experiment to build a minimal graphics platform for Roc using [hexops/mach-core](https://github.com/hexops/mach-core).
## Setup
1. Roc cli built using the `zig-11-llvm-16` branch
2. Zig version `0.12.0-dev.294+4d1432299`> **WARNING** Upgrading Zig versions requires careful coordination with mach-core dependencies and can be really difficult for now. Mach is still under heavy development and is stabilising. I am still learning the Zig build system, and unfortunaetly I wasn't able to get zig v0.11 to work with Mach and Roc.
## Build Platform
Run an example using `bash run.sh examples/rocLovesGraphics.roc`.
This builds the Roc app into a dynamic library, and then build the Zig app.
> **NOTE** normally a platform is pre-built into an object and then Roc will link the app into that; however in this case we are doing things in reverse to simplify the build process.
## Run without rebuilding the platform
Once you have the (platform) executable built, you can skip rebuilding it every time you make a change.
You can rebuild your roc app into another dylib using e.g. `roc build --lib examples/rocLovesGraphics.roc`, and restart the executable `./zig-out/bin/myapp` to see your changes.