Bumps [libc](https://github.com/rust-lang/libc) from 0.2.171 to 0.2.172. <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.172</h2> <h3>Added</h3> <ul> <li>Android: Add <code>getauxval</code> for 32-bit targets (<a href="https://redirect.github.com/rust-lang/libc/pull/4338">#4338</a>)</li> <li>Android: Add <code>if_tun.h</code> ioctls (<a href="https://redirect.github.com/rust-lang/libc/pull/4379">#4379</a>)</li> <li>Android: Define <code>SO_BINDTOIFINDEX</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4391">#4391</a>)</li> <li>Cygwin: Add <code>posix_spawn_file_actions_add[f]chdir[_np]</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4387">#4387</a>)</li> <li>Cygwin: Add new socket options (<a href="https://redirect.github.com/rust-lang/libc/pull/4350">#4350</a>)</li> <li>Cygwin: Add statfs & fcntl (<a href="https://redirect.github.com/rust-lang/libc/pull/4321">#4321</a>)</li> <li>FreeBSD: Add <code>filedesc</code> and <code>fdescenttbl</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4327">#4327</a>)</li> <li>Glibc: Add unstable support for _FILE_OFFSET_BITS=64 (<a href="https://redirect.github.com/rust-lang/libc/pull/4345">#4345</a>)</li> <li>Hermit: Add <code>AF_UNSPEC</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li> <li>Hermit: Add <code>AF_VSOCK</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li> <li>Illumos, NetBSD: Add <code>timerfd</code> APIs (<a href="https://redirect.github.com/rust-lang/libc/pull/4333">#4333</a>)</li> <li>Linux: Add <code>_IO</code>, <code>_IOW</code>, <code>_IOR</code>, <code>_IOWR</code> to the exported API (<a href="https://redirect.github.com/rust-lang/libc/pull/4325">#4325</a>)</li> <li>Linux: Add <code>tcp_info</code> to uClibc bindings (<a href="https://redirect.github.com/rust-lang/libc/pull/4347">#4347</a>)</li> <li>Linux: Add further BPF program flags (<a href="https://redirect.github.com/rust-lang/libc/pull/4356">#4356</a>)</li> <li>Linux: Add missing INPUT_PROP_XXX flags from <code>input-event-codes.h</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4326">#4326</a>)</li> <li>Linux: Add missing TLS bindings (<a href="https://redirect.github.com/rust-lang/libc/pull/4296">#4296</a>)</li> <li>Linux: Add more constants from <code>seccomp.h</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4330">#4330</a>)</li> <li>Linux: Add more glibc <code>ptrace_sud_config</code> and related <code>PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG</code>. (<a href="https://redirect.github.com/rust-lang/libc/pull/4386">#4386</a>)</li> <li>Linux: Add new netlink flags (<a href="https://redirect.github.com/rust-lang/libc/pull/4288">#4288</a>)</li> <li>Linux: Define ioctl codes on more architectures (<a href="https://redirect.github.com/rust-lang/libc/pull/4382">#4382</a>)</li> <li>Linux: Add missing <code>pthread_attr_setstack</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4349">#4349</a>)</li> <li>Musl: Add missing <code>utmpx</code> API (<a href="https://redirect.github.com/rust-lang/libc/pull/4332">#4332</a>)</li> <li>Musl: Enable <code>getrandom</code> on all platforms (<a href="https://redirect.github.com/rust-lang/libc/pull/4346">#4346</a>)</li> <li>NuttX: Add more signal constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4353">#4353</a>)</li> <li>QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs (<a href="https://redirect.github.com/rust-lang/libc/pull/4169">#4169</a>)</li> <li>QNX: Add support for alternative Neutrino network stack <code>io-sock</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4169">#4169</a>)</li> <li>Redox: Add more <code>sys/socket.h</code> and <code>sys/uio.h</code> definitions (<a href="https://redirect.github.com/rust-lang/libc/pull/4388">#4388</a>)</li> <li>Solaris: Temporarily define <code>O_DIRECT</code> and <code>SIGINFO</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4348">#4348</a>)</li> <li>Solarish: Add <code>secure_getenv</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4342">#4342</a>)</li> <li>VxWorks: Add missing <code>d_type</code> member to <code>dirent</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4352">#4352</a>)</li> <li>VxWorks: Add missing signal-related constsants (<a href="https://redirect.github.com/rust-lang/libc/pull/4352">#4352</a>)</li> <li>VxWorks: Add more error codes (<a href="https://redirect.github.com/rust-lang/libc/pull/4337">#4337</a>)</li> </ul> <h3>Deprecated</h3> <ul> <li>FreeBSD: Deprecate <code>TCP_PCAP_OUT</code> and <code>TCP_PCAP_IN</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4381">#4381</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Cygwin: Fix member types of <code>statfs</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4324">#4324</a>)</li> <li>Cygwin: Fix tests (<a href="https://redirect.github.com/rust-lang/libc/pull/4357">#4357</a>)</li> <li>Hermit: Make <code>AF_INET = 3</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li> <li>Musl: Fix the syscall table on RISC-V-32 (<a href="https://redirect.github.com/rust-lang/libc/pull/4335">#4335</a>)</li> <li>Musl: Fix the value of <code>SA_ONSTACK</code> on RISC-V-32 (<a href="https://redirect.github.com/rust-lang/libc/pull/4335">#4335</a>)</li> <li>VxWorks: Fix a typo in the <code>waitpid</code> parameter name (<a href="https://redirect.github.com/rust-lang/libc/pull/4334">#4334</a>)</li> </ul> <h3>Removed</h3> <!-- 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.172/CHANGELOG.md">libc's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/rust-lang/libc/compare/0.2.171...0.2.172">0.2.172</a> - 2025-04-14</h2> <h3>Added</h3> <ul> <li>Android: Add <code>getauxval</code> for 32-bit targets (<a href="https://redirect.github.com/rust-lang/libc/pull/4338">#4338</a>)</li> <li>Android: Add <code>if_tun.h</code> ioctls (<a href="https://redirect.github.com/rust-lang/libc/pull/4379">#4379</a>)</li> <li>Android: Define <code>SO_BINDTOIFINDEX</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4391">#4391</a>)</li> <li>Cygwin: Add <code>posix_spawn_file_actions_add[f]chdir[_np]</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4387">#4387</a>)</li> <li>Cygwin: Add new socket options (<a href="https://redirect.github.com/rust-lang/libc/pull/4350">#4350</a>)</li> <li>Cygwin: Add statfs & fcntl (<a href="https://redirect.github.com/rust-lang/libc/pull/4321">#4321</a>)</li> <li>FreeBSD: Add <code>filedesc</code> and <code>fdescenttbl</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4327">#4327</a>)</li> <li>Glibc: Add unstable support for _FILE_OFFSET_BITS=64 (<a href="https://redirect.github.com/rust-lang/libc/pull/4345">#4345</a>)</li> <li>Hermit: Add <code>AF_UNSPEC</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li> <li>Hermit: Add <code>AF_VSOCK</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li> <li>Illumos, NetBSD: Add <code>timerfd</code> APIs (<a href="https://redirect.github.com/rust-lang/libc/pull/4333">#4333</a>)</li> <li>Linux: Add <code>_IO</code>, <code>_IOW</code>, <code>_IOR</code>, <code>_IOWR</code> to the exported API (<a href="https://redirect.github.com/rust-lang/libc/pull/4325">#4325</a>)</li> <li>Linux: Add <code>tcp_info</code> to uClibc bindings (<a href="https://redirect.github.com/rust-lang/libc/pull/4347">#4347</a>)</li> <li>Linux: Add further BPF program flags (<a href="https://redirect.github.com/rust-lang/libc/pull/4356">#4356</a>)</li> <li>Linux: Add missing INPUT_PROP_XXX flags from <code>input-event-codes.h</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4326">#4326</a>)</li> <li>Linux: Add missing TLS bindings (<a href="https://redirect.github.com/rust-lang/libc/pull/4296">#4296</a>)</li> <li>Linux: Add more constants from <code>seccomp.h</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4330">#4330</a>)</li> <li>Linux: Add more glibc <code>ptrace_sud_config</code> and related <code>PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG</code>. (<a href="https://redirect.github.com/rust-lang/libc/pull/4386">#4386</a>)</li> <li>Linux: Add new netlink flags (<a href="https://redirect.github.com/rust-lang/libc/pull/4288">#4288</a>)</li> <li>Linux: Define ioctl codes on more architectures (<a href="https://redirect.github.com/rust-lang/libc/pull/4382">#4382</a>)</li> <li>Linux: Add missing <code>pthread_attr_setstack</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4349">#4349</a>)</li> <li>Musl: Add missing <code>utmpx</code> API (<a href="https://redirect.github.com/rust-lang/libc/pull/4332">#4332</a>)</li> <li>Musl: Enable <code>getrandom</code> on all platforms (<a href="https://redirect.github.com/rust-lang/libc/pull/4346">#4346</a>)</li> <li>NuttX: Add more signal constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4353">#4353</a>)</li> <li>QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs (<a href="https://redirect.github.com/rust-lang/libc/pull/4169">#4169</a>)</li> <li>QNX: Add support for alternative Neutrino network stack <code>io-sock</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4169">#4169</a>)</li> <li>Redox: Add more <code>sys/socket.h</code> and <code>sys/uio.h</code> definitions (<a href="https://redirect.github.com/rust-lang/libc/pull/4388">#4388</a>)</li> <li>Solaris: Temporarily define <code>O_DIRECT</code> and <code>SIGINFO</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4348">#4348</a>)</li> <li>Solarish: Add <code>secure_getenv</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4342">#4342</a>)</li> <li>VxWorks: Add missing <code>d_type</code> member to <code>dirent</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4352">#4352</a>)</li> <li>VxWorks: Add missing signal-related constsants (<a href="https://redirect.github.com/rust-lang/libc/pull/4352">#4352</a>)</li> <li>VxWorks: Add more error codes (<a href="https://redirect.github.com/rust-lang/libc/pull/4337">#4337</a>)</li> </ul> <h3>Deprecated</h3> <ul> <li>FreeBSD: Deprecate <code>TCP_PCAP_OUT</code> and <code>TCP_PCAP_IN</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4381">#4381</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Cygwin: Fix member types of <code>statfs</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4324">#4324</a>)</li> <li>Cygwin: Fix tests (<a href="https://redirect.github.com/rust-lang/libc/pull/4357">#4357</a>)</li> <li>Hermit: Make <code>AF_INET = 3</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li> <li>Musl: Fix the syscall table on RISC-V-32 (<a href="https://redirect.github.com/rust-lang/libc/pull/4335">#4335</a>)</li> <li>Musl: Fix the value of <code>SA_ONSTACK</code> on RISC-V-32 (<a href="https://redirect.github.com/rust-lang/libc/pull/4335">#4335</a>)</li> <li>VxWorks: Fix a typo in the <code>waitpid</code> parameter name (<a href="https://redirect.github.com/rust-lang/libc/pull/4334">#4334</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="a5eab581f9"><code>a5eab58</code></a> Merge pull request <a href="https://redirect.github.com/rust-lang/libc/issues/4410">#4410</a> from tgross35/release-libc</li> <li><a href="481eca7cc3"><code>481eca7</code></a> chore: release libc 0.2.172</li> <li><a href="ce2edbbaa9"><code>ce2edbb</code></a> Merge pull request <a href="https://redirect.github.com/rust-lang/libc/issues/4399">#4399</a> from tgross35/backport-triagebot-branch-warn</li> <li><a href="31b3200907"><code>31b3200</code></a> Suggest stable-nominated in the PR template</li> <li><a href="3bffe1d58a"><code>3bffe1d</code></a> Make triagebot warn on non-default branches</li> <li><a href="03e6ffc8c4"><code>03e6ffc</code></a> Merge pull request <a href="https://redirect.github.com/rust-lang/libc/issues/4396">#4396</a> from tgross35/backport-serrano</li> <li><a href="f9a47ac811"><code>f9a47ac</code></a> Define SO_BINDTOIFINDEX on Android</li> <li><a href="a358dae479"><code>a358dae</code></a> Add missing utmpx apis for linux musl</li> <li><a href="1ff2f2181a"><code>1ff2f21</code></a> adding linux glibc ptrace_sud_config and related PTRACE_*ET_SYSCALL_USER_DISP...</li> <li><a href="55c58c956d"><code>55c58c9</code></a> Add more redox sys/socket.h and sys/uio.h definitions</li> <li>Additional commits viewable in <a href="https://github.com/rust-lang/libc/compare/0.2.171...0.2.172">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> Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
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.