Files
firezone/rust
dependabot[bot] 3456800d13 build(deps): Bump @tauri-apps/api from 2.0.2 to 2.0.3 in /rust/gui-client (#7224)
Bumps [@tauri-apps/api](https://github.com/tauri-apps/tauri) from 2.0.2
to 2.0.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/tauri/releases"><code>@​tauri-apps/api</code>'s
releases</a>.</em></p>
<blockquote>
<h2><code>@​tauri-apps/api</code> v2.0.3</h2>
<!-- raw HTML omitted -->
<pre><code>No known vulnerabilities found
</code></pre>
<!-- raw HTML omitted -->
<h2>[2.0.3]</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="fbb45c674c"><code>fbb45c674</code></a>
(<a
href="https://redirect.github.com/tauri-apps/tauri/pull/11423">#11423</a>
by <a
href="https://www.github.com/tauri-apps/tauri/../../lucasfernog"><code>@​lucasfernog</code></a>)
Fixes <code>addPluginListener</code> not working.</li>
</ul>
<h3>What's Changed</h3>
<ul>
<li><a
href="2e88633ba4"><code>2e88633ba</code></a>
(<a
href="https://redirect.github.com/tauri-apps/tauri/pull/11369">#11369</a>
by <a
href="https://www.github.com/tauri-apps/tauri/../../lucasfernog"><code>@​lucasfernog</code></a>)
Remove references to no longer used
<code>__TAURI_INTERNALS__.metadata.windows</code> and
<code>__TAURI_INTERNALS__.metadata.webviews</code>.</li>
</ul>
<!-- raw HTML omitted -->
<pre><code>&gt; @tauri-apps/api@2.0.3 npm-publish
/home/runner/work/tauri/tauri/packages/api
&gt; pnpm build &amp;&amp; cd ./dist &amp;&amp; pnpm publish --access
public --loglevel silly --no-git-checks
<p>&gt; <code>@​tauri-apps/api</code><a
href="https://github.com/2"><code>@​2</code></a>.0.3 build
/home/runner/work/tauri/tauri/packages/api
&gt; rollup -c --configPlugin typescript</p>
<p>
./src/app.ts, ./src/core.ts, ./src/dpi.ts, ./src/event.ts,
./src/image.ts, ./src/index.ts, ./src/menu.ts, ./src/mocks.ts,
./src/path.ts, ./src/tray.ts, ./src/webview.ts, ./src/webviewWindow.ts,
./src/window.ts → ./dist, ./dist...
created ./dist, ./dist in 1.2s

src/index.ts →
../../crates/tauri/scripts/bundle.global.js...
created ../../crates/tauri/scripts/bundle.global.js in
1.8s
npm verbose cli /opt/hostedtoolcache/node/20.18.0/x64/bin/node
/opt/hostedtoolcache/node/20.18.0/x64/bin/npm
npm info using npm@10.8.2
npm info using node@v20.18.0
npm silly config
load:file:/opt/hostedtoolcache/node/20.18.0/x64/lib/node_modules/npm/npmrc
npm silly config load:file:/tmp/20a67e77a31c6f838c62e14ca76ea470/.npmrc
npm silly config load:file:/home/runner/work/_temp/.npmrc
npm silly config
load:file:/opt/hostedtoolcache/node/20.18.0/x64/etc/npmrc
npm verbose title npm publish tauri-apps-api-2.0.3.tgz
npm verbose argv &quot;publish&quot; &quot;--ignore-scripts&quot;
&quot;tauri-apps-api-2.0.3.tgz&quot; &quot;--access&quot;
&quot;public&quot; &quot;--loglevel&quot; &quot;silly&quot;
&quot;--no-git-checks&quot;
npm verbose logfile logs-max:10
dir:/home/runner/.npm/_logs/2024-10-20T13_48_18_437Z-
npm verbose logfile
/home/runner/.npm/_logs/2024-10-20T13_48_18_437Z-debug-0.log
npm verbose publish [ 'tauri-apps-api-2.0.3.tgz' ]
npm silly logfile done cleaning log files
&lt;/tr&gt;&lt;/table&gt;
</code></pre></p>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1367ff5ec6"><code>1367ff5</code></a>
apply version updates (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/11373">#11373</a>)</li>
<li><a
href="fbb45c674c"><code>fbb45c6</code></a>
fix(api): broken <code>addPluginListener</code> implementation, closes
<a
href="https://redirect.github.com/tauri-apps/tauri/issues/8068">#8068</a>
(<a
href="https://redirect.github.com/tauri-apps/tauri/issues/11423">#11423</a>)</li>
<li><a
href="eb61d44f9f"><code>eb61d44</code></a>
feat(core): fallback to Window and AppHandle resource table on close (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/11398">#11398</a>)</li>
<li><a
href="c8f55b615d"><code>c8f55b6</code></a>
feat(bundler): add <code>wix &gt; version</code> option (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/11388">#11388</a>)</li>
<li><a
href="bd1b2a1e85"><code>bd1b2a1</code></a>
chore(deps) Update Tauri API Definitions (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/10807">#10807</a>)</li>
<li><a
href="37557ffa35"><code>37557ff</code></a>
chore(deps) Update Tauri CLI (dev) (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/10808">#10808</a>)</li>
<li><a
href="6cd917c227"><code>6cd917c</code></a>
feat(core): add methods for predefined items with specific text on
`Menu/Subm...</li>
<li><a
href="8278a36318"><code>8278a36</code></a>
chore(deps) Update Rust crate uuid to v1.11.0 (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/11049">#11049</a>)</li>
<li><a
href="f8b559dacd"><code>f8b559d</code></a>
chore(deps) Update Rust crate windows-registry to 0.3.0 (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/11193">#11193</a>)</li>
<li><a
href="add09c8034"><code>add09c8</code></a>
chore(deps) Update Rust crate brotli to v7 (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/11195">#11195</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tauri-apps/tauri/compare/@tauri-apps/api-v2.0.2...@tauri-apps/api-v2.0.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@tauri-apps/api&package-manager=npm_and_yarn&previous-version=2.0.2&new-version=2.0.3)](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>
2024-11-01 15:55:58 +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.