Files
firezone/rust
dependabot[bot] 0fb121f75d build(deps): Bump tauri-plugin-shell from 2.0.1 to 2.0.2 in /rust (#7168)
Bumps
[tauri-plugin-shell](https://github.com/tauri-apps/plugins-workspace)
from 2.0.1 to 2.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/plugins-workspace/releases">tauri-plugin-shell's
releases</a>.</em></p>
<blockquote>
<h2>updater v2.0.2</h2>
<h2>[2.0.2]</h2>
<ul>
<li><a
href="a1a82208ed"><code>a1a82208</code></a>
(<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/pull/1873">#1873</a>
by <a
href="https://github.com/tauri-apps/plugins-workspace/../../lucasfernog"><code>@​lucasfernog</code></a>)
Downgrade MSRV to 1.77.2 to support Windows 7.</li>
</ul>
<!-- raw HTML omitted -->
<pre><code>Updating crates.io index
Packaging tauri-plugin-updater v2.0.2
(/home/runner/work/plugins-workspace/plugins-workspace/plugins/updater)
    Packaged 28 files, 174.0KiB (87.1KiB compressed)
Uploading tauri-plugin-updater v2.0.2
(/home/runner/work/plugins-workspace/plugins-workspace/plugins/updater)
    Uploaded tauri-plugin-updater v2.0.2 to registry `crates-io`
note: waiting for `tauri-plugin-updater v2.0.2` to be available at
registry `crates-io`.
You may press ctrl-c to skip waiting; the crate should be available
shortly.
   Published tauri-plugin-updater v2.0.2 at registry `crates-io`
</code></pre>
<!-- raw HTML omitted -->
<h2>dialog v2.0.2</h2>
<h2>[2.0.1]</h2>
<ul>
<li><a
href="2302c2db1c"><code>2302c2db</code></a>
(<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/pull/1910">#1910</a>
by <a
href="https://github.com/tauri-apps/plugins-workspace/../../Legend-Master"><code>@​Legend-Master</code></a>)
Fix <code>ask</code> and <code>confirm</code> not using system button
texts</li>
<li><a
href="aee14ed426"><code>aee14ed4</code></a>
(<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/pull/1892">#1892</a>
by <a
href="https://github.com/tauri-apps/plugins-workspace/../../nashaofu"><code>@​nashaofu</code></a>)
Set <code>save</code> dialog mime type from the <code>filters</code>
extensions on Android.</li>
</ul>
<!-- raw HTML omitted -->
<pre><code>Updating crates.io index
Packaging tauri-plugin-dialog v2.0.2
(/home/runner/work/plugins-workspace/plugins-workspace/plugins/dialog)
    Packaged 48 files, 199.7KiB (90.5KiB compressed)
Uploading tauri-plugin-dialog v2.0.2
(/home/runner/work/plugins-workspace/plugins-workspace/plugins/dialog)
    Uploaded tauri-plugin-dialog v2.0.2 to registry `crates-io`
note: waiting for `tauri-plugin-dialog v2.0.2` to be available at
registry `crates-io`.
You may press ctrl-c to skip waiting; the crate should be available
shortly.
   Published tauri-plugin-dialog v2.0.2 at registry `crates-io`
</code></pre>
<!-- raw HTML omitted -->
<h2>fs v2.0.2</h2>
<h2>[2.0.1]</h2>
<ul>
<li><a
href="ae8024565f"><code>ae802456</code></a>
(<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/pull/1950">#1950</a>
by <a
href="https://github.com/tauri-apps/plugins-workspace/../../amrbashir"><code>@​amrbashir</code></a>)
Improve performance of the <code>FileHandle.read</code> and
<code>writeTextFile</code> APIs.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3fd283121f"><code>3fd2831</code></a>
publish new versions (<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1909">#1909</a>)</li>
<li><a
href="ae8024565f"><code>ae80245</code></a>
perf(fs): improve <code>FileHandle.read</code> performance (<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1950">#1950</a>)</li>
<li><a
href="2302c2db1c"><code>2302c2d</code></a>
fix(dialog): <code>ask</code> and <code>confirm</code> not using system
button texts (<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1910">#1910</a>)</li>
<li><a
href="44c50c1275"><code>44c50c1</code></a>
chore(deps): update rust crate tauri to 2.0.4 (<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1952">#1952</a>)</li>
<li><a
href="415bf2abc3"><code>415bf2a</code></a>
chore(deps): update eslint monorepo to v9.13.0 (<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1951">#1951</a>)</li>
<li><a
href="36207a93f3"><code>36207a9</code></a>
chore(deps): update dependency <code>@​tauri-apps/cli</code> to v2.0.3
(<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1925">#1925</a>)</li>
<li><a
href="854754e10b"><code>854754e</code></a>
chore(deps): update dependency typescript-eslint to v8.10.0 (<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1949">#1949</a>)</li>
<li><a
href="1c2f137a8a"><code>1c2f137</code></a>
chore(deps): lock file maintenance (<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1929">#1929</a>)</li>
<li><a
href="8c67d44aef"><code>8c67d44</code></a>
refactor(store)!: more reworks (<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1860">#1860</a>)</li>
<li><a
href="cfd48b3b2e"><code>cfd48b3</code></a>
feat: allow http calls without origin header (<a
href="https://redirect.github.com/tauri-apps/plugins-workspace/issues/1941">#1941</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tauri-apps/plugins-workspace/compare/os-v2.0.1...fs-v2.0.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tauri-plugin-shell&package-manager=cargo&previous-version=2.0.1&new-version=2.0.2)](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: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-11-04 18:32:44 +00:00
..
2023-05-10 07:58:32 -07:00

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:

  1. Ensure the binary you are profiling is compiled with the bench profile.
  2. sudo perf perf record -g --freq 10000 --pid $(pgrep <your-binary>).
  3. Run the speed test or whatever load-inducing task you want to measure.
  4. sudo perf script > profile.perf
  5. 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.