<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Freebsd on Xerxes II's Blog</title><link>/en/tags/freebsd/</link><description>Recent content in Freebsd on Xerxes II's Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 06 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="/en/tags/freebsd/index.xml" rel="self" type="application/rss+xml"/><item><title>Cross-Compiling Rust Projects to FreeBSD with cargo-zigbuild</title><link>/en/posts/cross-compile-rust-freebsd-zigbuild/</link><pubDate>Mon, 06 Apr 2026 00:00:00 +0000</pubDate><guid>/en/posts/cross-compile-rust-freebsd-zigbuild/</guid><description>&lt;p&gt;Notes on cross-compiling a Rust project from Linux (x86_64) to FreeBSD x86_64 using &lt;code&gt;cargo-zigbuild&lt;/code&gt;, and the pitfalls I ran into along the way. The project is a Discord bot that depends on crates like &lt;code&gt;sysinfo&lt;/code&gt;, &lt;code&gt;tikv-jemallocator&lt;/code&gt;, and &lt;code&gt;sea-orm&lt;/code&gt; (SQLite).&lt;/p&gt;
&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;Zig ships with a multi-platform libc and cross-compilation toolchain. &lt;code&gt;cargo-zigbuild&lt;/code&gt; leverages Zig as the linker to enable Rust cross-compilation — usually much more convenient than setting up a cross toolchain yourself. That said, targeting FreeBSD comes with some unique gotchas.&lt;/p&gt;</description></item></channel></rss>