r/rust • • 7d ago

[ Removed by moderator ]

[removed] — view removed post

0 Upvotes

1 comment sorted by

2

u/nicoburns 7d ago edited 7d ago

Looks like Winit and Softbuffer, WGPU, and Skia all work on FreeBSD, so likely not too hard. It'd probably be a case of going through a bunch of dependencies and patching them to also include FreeBSD where they were previously conditionally compiling for Linux.

UPDATE: Actually, turns out rust ecosystem support for FreeBSD is pretty good and Vello CPU and Vello GPU just work out of the box.

Skia requires a small patch (https://github.com/rust-skia/rust-skia/pull/1379)

I had an AI check this in a VM (FreeBSD 14.5), and it turns it just works.

Edited notes from the AI on prerequisites:

1. Build dependencies

pkg install rust pkgconf fontconfig python3 cmake git
  • python3 metapackage is required: installing only python312 provides python3.12 without a python3 symlink, causing stylo's build.rs to fail unless the PYTHON3 env var is set.
  • rust from quarterly pkg is 1.98.1 (meets Blitz's 1.91.0 MSRV).
  • cmake is only needed when the net is enabled (for aws-lc-sys).

2. Runtime dependencies

# X11 + fonts (already present on a FreeBSD desktop; Wayland uses wayland + libxkbcommon)
pkg install libX11 libXcursor libXrandr libXi libxkbcommon liberation-fonts-ttf dejavu

# For vello_gpu backend (Vulkan / GLES):
pkg install vulkan-loader mesa-dri mesa-libs

3. Build & run todomvc

# CPU renderer (no GPU/Vulkan needed)
 cargo run -p todomvc --bin todomvc_native --no-default-features --features cpu-softbuffer

# GPU renderer (default vello-gpu)
cargo run -p todomvc --bin todomvc_native

The Dioxus CLI (not required for regular builds, but needed for hot reloading) needs some tweaks to work on FreeBSD (https://github.com/DioxusLabs/dioxus/pull/6104)