Help support development by letting your PC idle with style. More platforms coming soon!
I’m working on creating native screensavers for Flux — a fluid simulation inspired by the macOS Drift screensaver.
This repository contains:
flux-ffi
— a foreign function interface for the Flux library.- Native screensavers for the following platforms:
Build with XCode.
cd macos
xcodebuild -project Flux.xcodeproj/ -scheme Flux build
XCode should automatically build the FFI crate. In case it doesn’t, here’s how to do it manually.
cd flux-ffi
export MACOSX_DEPLOYMENT_TARGET=10.10
cargo build --release --target aarch64-apple-darwin
cargo build --release --target x86_64-apple-darwin
lipo target/aarch64-apple-darwin/release/libflux.a target/x86_64-apple-darwin/release/libflux.a -create -output libflux.a
This repo is set up to cross-compile Windows binaries from Linux using Nix.
nix build ./#flux-screensaver-windows
There’s also a cross-compilation development shell.
nix develop ./#cross-windows
cd windows
cargo build --target x86_64-pc-windows-gnu --release
Native Windows builds are currently untested. You’ll need Rust and a static build of SDL2 linked at build time.