https://github.com/rtlevy/raffa_gen
My attempt to make fast-rendering generative art in Rust. Also just a playground project for me to learn about 2D graphics.
https://github.com/rtlevy/raffa_gen
Last synced: 12 months ago
JSON representation
My attempt to make fast-rendering generative art in Rust. Also just a playground project for me to learn about 2D graphics.
- Host: GitHub
- URL: https://github.com/rtlevy/raffa_gen
- Owner: rtlevy
- License: mit
- Created: 2018-08-14T00:36:35.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-14T00:36:46.000Z (almost 8 years ago)
- Last Synced: 2024-05-31T21:22:46.449Z (about 2 years ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
My attempt to make fast-rendering generative art in Rust. Also just a playground project for me to learn about 2D graphics. Currently only runs on MacOS using a Quartz backend.
raffa_gen makes use of the bindings to Cocoa, Core Foundation, and Cairo provided by the Servo Project and gtk-rs in order to call into these librarys from Rust.
Much of the drawing is performed on a raw image buffer inside of a Cairo image surface.
Will probably look weird on non-Retina displays.
# Building
To build and run the project, run the following command in the project directory:
sh run.sh
The build script starts by compiling `src/setup.m`, the Objective-C file which sets up the Quartz environment, using Clang. It is then archived into the static library `libsetup.a`. The bulk of the project, written in Rust, is built using Cargo. Finally, the script runs the executable, which is symlinked into `Rustt.app`. (Bundling the executable into a `.app` seems to be necessary to get the menu bar to work.)