Skip to content

Commit

Permalink
Merge pull request #113 from martinling/fix-msrv-test
Browse files Browse the repository at this point in the history
Bump MSRV to 1.74, and fix MSRV testing in CI.
  • Loading branch information
miek authored Jul 3, 2024
2 parents 828d667 + 2d24dcd commit 7af5d7f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
fail-fast: false
matrix:
os: ['macos-latest', 'ubuntu-22.04', 'windows-latest']
rust: ['stable', '1.57']
rust: ['stable', '1.74']

runs-on: ${{ matrix.os }}

Expand All @@ -56,6 +56,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true

- uses: awalsh128/cache-apt-pkgs-action@latest
with:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage = "https://github.com/greatscottgadgets/packetry"
repository = "https://github.com/greatscottgadgets/packetry"
documentation = "https://packetry.readthedocs.io"
edition = "2021"
rust-version = "1.57"
rust-version = "1.74"

include = [
"CHANGELOG.md",
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Packetry is currently in active development and not yet ready for initial releas

Packetry is written in [Rust](https://rust-lang.org/), with its GUI using [GTK 4](https://gtk.org) via the [gtk-rs](https://gtk-rs.org/) bindings.

To build it, you need a working Rust development environment. The minimum supported Rust version is 1.57.
To build it, you need a working Rust development environment. The minimum supported Rust version is 1.74.

You must also have the GTK 4 headers installed and discoverable via `pkg-config`, as this is required for Rust to build the gtk-rs crates.

Expand All @@ -28,7 +28,7 @@ Note: Do not build with `--all-features`. All the optional features currently in

Install the Rust build tools, other essential build tools, and GTK 4 headers.

On Debian based systems it should be sufficient to use the command:
On Debian based systems it may be sufficient to use the command:

`apt install rustc cargo build-essential libgtk-4-dev`

Expand All @@ -38,7 +38,7 @@ For Fedora systems:

For other distributions, a similar set of packages should be required.

You can also omit Rust and Cargo and use [rustup](https://rustup.rs/) to get the latest Rust toolchain and manage your Rust installation.
Note that Packetry requires a minimum Rust version of 1.74. If your distribution's packages are older than this, use [rustup](https://rustup.rs/) to get the latest Rust toolchain and manage your Rust installation.

#### macOS

Expand Down
6 changes: 4 additions & 2 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ static UPDATE_INTERVAL: Duration = Duration::from_millis(10);
static UPDATE_LOCK: Mutex<()> = Mutex::new(());

thread_local!(
static WINDOW: RefCell<Option<ApplicationWindow>> = RefCell::new(None);
static UI: RefCell<Option<UserInterface>> = RefCell::new(None);
static WINDOW: RefCell<Option<ApplicationWindow>> =
const { RefCell::new(None) };
static UI: RefCell<Option<UserInterface>> =
const { RefCell::new(None) };
);

#[derive(Copy, Clone, PartialEq)]
Expand Down

0 comments on commit 7af5d7f

Please sign in to comment.