Bumps [libc](https://github.com/rust-lang/libc) from 0.2.169 to 0.2.171. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/libc/releases">libc's releases</a>.</em></p> <blockquote> <h2>0.2.171</h2> <h3>Added</h3> <ul> <li>Android: Add <code>if_nameindex</code>/<code>if_freenameindex</code> support (<a href="https://redirect.github.com/rust-lang/libc/pull/4247">#4247</a>)</li> <li>Apple: Add missing proc types and constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4310">#4310</a>)</li> <li>BSD: Add <code>devname</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4285">#4285</a>)</li> <li>Cygwin: Add PTY and group API (<a href="https://redirect.github.com/rust-lang/libc/pull/4309">#4309</a>)</li> <li>Cygwin: Add support (<a href="https://redirect.github.com/rust-lang/libc/pull/4279">#4279</a>)</li> <li>FreeBSD: Make <code>spawn.h</code> interfaces available on all FreeBSD-like systems (<a href="https://redirect.github.com/rust-lang/libc/pull/4294">#4294</a>)</li> <li>Linux: Add <code>AF_XDP</code> structs for all Linux environments (<a href="https://redirect.github.com/rust-lang/libc/pull/4163">#4163</a>)</li> <li>Linux: Add SysV semaphore constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4286">#4286</a>)</li> <li>Linux: Add <code>F_SEAL_EXEC</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4316">#4316</a>)</li> <li>Linux: Add <code>SO_PREFER_BUSY_POLL</code> and <code>SO_BUSY_POLL_BUDGET</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/3917">#3917</a>)</li> <li>Linux: Add <code>devmem</code> structs (<a href="https://redirect.github.com/rust-lang/libc/pull/4299">#4299</a>)</li> <li>Linux: Add socket constants up to <code>SO_DEVMEM_DONTNEED</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4299">#4299</a>)</li> <li>NetBSD, OpenBSD, DragonflyBSD: Add <code>closefrom</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4290">#4290</a>)</li> <li>NuttX: Add <code>pw_passwd</code> field to <code>passwd</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4222">#4222</a>)</li> <li>Solarish: define <code>IP_BOUND_IF</code> and <code>IPV6_BOUND_IF</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4287">#4287</a>)</li> <li>Wali: Add bindings for <code>wasm32-wali-linux-musl</code> target (<a href="https://redirect.github.com/rust-lang/libc/pull/4244">#4244</a>)</li> </ul> <h3>Changed</h3> <ul> <li>AIX: Use <code>sa_sigaction</code> instead of a union (<a href="https://redirect.github.com/rust-lang/libc/pull/4250">#4250</a>)</li> <li>Make <code>msqid_ds.__msg_cbytes</code> public (<a href="https://redirect.github.com/rust-lang/libc/pull/4301">#4301</a>)</li> <li>Unix: Make all <code>major</code>, <code>minor</code>, <code>makedev</code> into <code>const fn</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4208">#4208</a>)</li> </ul> <h3>Deprecated</h3> <ul> <li>Linux: Deprecate obsolete packet filter interfaces (<a href="https://redirect.github.com/rust-lang/libc/pull/4267">#4267</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Cygwin: Fix strerror_r (<a href="https://redirect.github.com/rust-lang/libc/pull/4308">#4308</a>)</li> <li>Cygwin: Fix usage of f! (<a href="https://redirect.github.com/rust-lang/libc/pull/4308">#4308</a>)</li> <li>Hermit: Make <code>stat::st_size</code> signed (<a href="https://redirect.github.com/rust-lang/libc/pull/4298">#4298</a>)</li> <li>Linux: Correct values for <code>SI_TIMER</code>, <code>SI_MESGQ</code>, <code>SI_ASYNCIO</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4292">#4292</a>)</li> <li>NuttX: Update <code>tm_zone</code> and <code>d_name</code> fields to use <code>c_char</code> type (<a href="https://redirect.github.com/rust-lang/libc/pull/4222">#4222</a>)</li> <li>Xous: Include the prelude to define <code>c_int</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4304">#4304</a>)</li> </ul> <h3>Other</h3> <ul> <li>Add labels to FIXMEs (<a href="https://redirect.github.com/rust-lang/libc/pull/4231">#4231</a>, <a href="https://redirect.github.com/rust-lang/libc/pull/4232">#4232</a>, <a href="https://redirect.github.com/rust-lang/libc/pull/4234">#4234</a>, <a href="https://redirect.github.com/rust-lang/libc/pull/4235">#4235</a>, <a href="https://redirect.github.com/rust-lang/libc/pull/4236">#4236</a>)</li> <li>CI: Fix "cannot find libc" error on Sparc64 (<a href="https://redirect.github.com/rust-lang/libc/pull/4317">#4317</a>)</li> <li>CI: Fix "cannot find libc" error on s390x (<a href="https://redirect.github.com/rust-lang/libc/pull/4317">#4317</a>)</li> <li>CI: Pass <code>--no-self-update</code> to <code>rustup update</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4306">#4306</a>)</li> <li>CI: Remove tests for the <code>i586-pc-windows-msvc</code> target (<a href="https://redirect.github.com/rust-lang/libc/pull/4311">#4311</a>)</li> <li>CI: Remove the <code>check_cfg</code> job (<a href="https://redirect.github.com/rust-lang/libc/pull/4312">#4322</a>)</li> <li>Change the range syntax that is giving <code>ctest</code> problems (<a href="https://redirect.github.com/rust-lang/libc/pull/4311">#4311</a>)</li> <li>Linux: Split out the stat struct for gnu/b32/mips (<a href="https://redirect.github.com/rust-lang/libc/pull/4276">#4276</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/libc/blob/0.2.171/CHANGELOG.md">libc's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/rust-lang/libc/compare/0.2.170...0.2.171">0.2.171</a> - 2025-03-11</h2> <h3>Added</h3> <ul> <li>Android: Add <code>if_nameindex</code>/<code>if_freenameindex</code> support (<a href="https://redirect.github.com/rust-lang/libc/pull/4247">#4247</a>)</li> <li>Apple: Add missing proc types and constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4310">#4310</a>)</li> <li>BSD: Add <code>devname</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4285">#4285</a>)</li> <li>Cygwin: Add PTY and group API (<a href="https://redirect.github.com/rust-lang/libc/pull/4309">#4309</a>)</li> <li>Cygwin: Add support (<a href="https://redirect.github.com/rust-lang/libc/pull/4279">#4279</a>)</li> <li>FreeBSD: Make <code>spawn.h</code> interfaces available on all FreeBSD-like systems (<a href="https://redirect.github.com/rust-lang/libc/pull/4294">#4294</a>)</li> <li>Linux: Add <code>AF_XDP</code> structs for all Linux environments (<a href="https://redirect.github.com/rust-lang/libc/pull/4163">#4163</a>)</li> <li>Linux: Add SysV semaphore constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4286">#4286</a>)</li> <li>Linux: Add <code>F_SEAL_EXEC</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4316">#4316</a>)</li> <li>Linux: Add <code>SO_PREFER_BUSY_POLL</code> and <code>SO_BUSY_POLL_BUDGET</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/3917">#3917</a>)</li> <li>Linux: Add <code>devmem</code> structs (<a href="https://redirect.github.com/rust-lang/libc/pull/4299">#4299</a>)</li> <li>Linux: Add socket constants up to <code>SO_DEVMEM_DONTNEED</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4299">#4299</a>)</li> <li>NetBSD, OpenBSD, DragonflyBSD: Add <code>closefrom</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4290">#4290</a>)</li> <li>NuttX: Add <code>pw_passwd</code> field to <code>passwd</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4222">#4222</a>)</li> <li>Solarish: define <code>IP_BOUND_IF</code> and <code>IPV6_BOUND_IF</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4287">#4287</a>)</li> <li>Wali: Add bindings for <code>wasm32-wali-linux-musl</code> target (<a href="https://redirect.github.com/rust-lang/libc/pull/4244">#4244</a>)</li> </ul> <h3>Changed</h3> <ul> <li>AIX: Use <code>sa_sigaction</code> instead of a union (<a href="https://redirect.github.com/rust-lang/libc/pull/4250">#4250</a>)</li> <li>Make <code>msqid_ds.__msg_cbytes</code> public (<a href="https://redirect.github.com/rust-lang/libc/pull/4301">#4301</a>)</li> <li>Unix: Make all <code>major</code>, <code>minor</code>, <code>makedev</code> into <code>const fn</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4208">#4208</a>)</li> </ul> <h3>Deprecated</h3> <ul> <li>Linux: Deprecate obsolete packet filter interfaces (<a href="https://redirect.github.com/rust-lang/libc/pull/4267">#4267</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Cygwin: Fix strerror_r (<a href="https://redirect.github.com/rust-lang/libc/pull/4308">#4308</a>)</li> <li>Cygwin: Fix usage of f! (<a href="https://redirect.github.com/rust-lang/libc/pull/4308">#4308</a>)</li> <li>Hermit: Make <code>stat::st_size</code> signed (<a href="https://redirect.github.com/rust-lang/libc/pull/4298">#4298</a>)</li> <li>Linux: Correct values for <code>SI_TIMER</code>, <code>SI_MESGQ</code>, <code>SI_ASYNCIO</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4292">#4292</a>)</li> <li>NuttX: Update <code>tm_zone</code> and <code>d_name</code> fields to use <code>c_char</code> type (<a href="https://redirect.github.com/rust-lang/libc/pull/4222">#4222</a>)</li> <li>Xous: Include the prelude to define <code>c_int</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4304">#4304</a>)</li> </ul> <h3>Other</h3> <ul> <li>Add labels to FIXMEs (<a href="https://redirect.github.com/rust-lang/libc/pull/4231">#4231</a>, <a href="https://redirect.github.com/rust-lang/libc/pull/4232">#4232</a>, <a href="https://redirect.github.com/rust-lang/libc/pull/4234">#4234</a>, <a href="https://redirect.github.com/rust-lang/libc/pull/4235">#4235</a>, <a href="https://redirect.github.com/rust-lang/libc/pull/4236">#4236</a>)</li> <li>CI: Fix "cannot find libc" error on Sparc64 (<a href="https://redirect.github.com/rust-lang/libc/pull/4317">#4317</a>)</li> <li>CI: Fix "cannot find libc" error on s390x (<a href="https://redirect.github.com/rust-lang/libc/pull/4317">#4317</a>)</li> <li>CI: Pass <code>--no-self-update</code> to <code>rustup update</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4306">#4306</a>)</li> <li>CI: Remove tests for the <code>i586-pc-windows-msvc</code> target (<a href="https://redirect.github.com/rust-lang/libc/pull/4311">#4311</a>)</li> <li>CI: Remove the <code>check_cfg</code> job (<a href="https://redirect.github.com/rust-lang/libc/pull/4312">#4322</a>)</li> <li>Change the range syntax that is giving <code>ctest</code> problems (<a href="https://redirect.github.com/rust-lang/libc/pull/4311">#4311</a>)</li> <li>Linux: Split out the stat struct for gnu/b32/mips (<a href="https://redirect.github.com/rust-lang/libc/pull/4276">#4276</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="78b0f8a739"><code>78b0f8a</code></a> chore: release v0.2.171</li> <li><a href="b988ca5bbe"><code>b988ca5</code></a> Merge pull request <a href="https://redirect.github.com/rust-lang/libc/issues/4318">#4318</a> from tgross35/backport-morel</li> <li><a href="5746f8e490"><code>5746f8e</code></a> Add missing macos proc types and constants</li> <li><a href="29a40e2cac"><code>29a40e2</code></a> linux: add devmem structs</li> <li><a href="85f6836e3b"><code>85f6836</code></a> linux: add socket constants up to SO_DEVMEM_DONTNEED</li> <li><a href="ff17476460"><code>ff17476</code></a> linux_like: add F_SEAL_EXEC</li> <li><a href="67352ee823"><code>67352ee</code></a> ci: sparc64: fix 'cannot find libc' error</li> <li><a href="10af5a6696"><code>10af5a6</code></a> ci: s390x: fix 'cannot find libc' error</li> <li><a href="c6ad4344f3"><code>c6ad434</code></a> Merge pull request <a href="https://redirect.github.com/rust-lang/libc/issues/4315">#4315</a> from tgross35/backport-porcini</li> <li><a href="5726b3cde2"><code>5726b3c</code></a> Cygwin: Add PTY and group API</li> <li>Additional commits viewable in <a href="https://github.com/rust-lang/libc/compare/0.2.169...0.2.171">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Rust development guide
Firezone uses Rust for all data plane components. This directory contains the Linux and Windows clients, and low-level networking implementations related to STUN/TURN.
We target the last stable release of Rust using rust-toolchain.toml.
If you are using rustup, that is automatically handled for you.
Otherwise, ensure you have the latest stable version of Rust installed.
Reading Client logs
The Client logs are written as JSONL for machine-readability.
To make them more human-friendly, pipe them through jq like this:
cd path/to/logs # e.g. `$HOME/.cache/dev.firezone.client/data/logs` on Linux
cat *.log | jq -r '"\(.time) \(.severity) \(.message)"'
Resulting in, e.g.
2024-04-01T18:25:47.237661392Z INFO started log
2024-04-01T18:25:47.238193266Z INFO GIT_VERSION = 1.0.0-pre.11-35-gcc0d43531
2024-04-01T18:25:48.295243016Z INFO No token / actor_name on disk, starting in signed-out state
2024-04-01T18:25:48.295360641Z INFO null
Benchmarking on Linux
The recommended way for benchmarking any of the Rust components is Linux' perf utility.
For example, to attach to a running application, do:
- Ensure the binary you are profiling is compiled with the
releaseprofile. sudo perf record -g --freq 10000 --pid $(pgrep <your-binary>).- Run the speed test or whatever load-inducing task you want to measure.
sudo perf script > profile.perf- Open profiler.firefox.com and load
profile.perf
Instead of attaching to a process with --pid, you can also specify the path to executable directly.
That is useful if you want to capture perf data for a test or a micro-benchmark.