ghosrt / flux-screensavers

Native screensavers for Flux

Home Page:https://flux.sandydoo.me/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flux

Screensavers for Flux

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

macOS

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

Windows

This repo is set up to cross-compile Windows binaries from Linux using Nix.

Build the MSI installer:

nix build .#windows.installer

Build the screensaver:

nix build .#windows.flux

There’s also a cross-compilation development shell.

nix develop
cd windows
cargo build --target x86_64-pc-windows-gnu --release

Depending on the version of Nix installed, you may need to add --extra-experimental-features "flakes nix-command" to the above commands.

Native Windows builds are currently untested. You’ll need Rust and a static build of SDL2 linked at build time.

About

Native screensavers for Flux

https://flux.sandydoo.me/


Languages

Language:Rust 76.9%Language:Swift 12.6%Language:Nix 5.5%Language:NSIS 4.3%Language:C 0.6%Language:Objective-C 0.2%