Skip to content

Commit

Permalink
ci: update to rust 1.81.0 (#212)
Browse files Browse the repository at this point in the history
* ci: update to rust 1.81.0

* ci: fix clippy

* ci: fix deny.toml
  • Loading branch information
TheButlah authored Sep 6, 2024
1 parent 02e91b3 commit 7eb9dd9
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 37 deletions.
16 changes: 12 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ members = [
edition = "2021"
license = "MIT OR (Apache-2.0 WITH LLVM-exception)"
repository = "https://github.com/worldcoin/orb-software"
rust-version = "1.79.0" # See rust-version.toml
rust-version = "1.81.0" # See rust-version.toml

# We centralize feature flags here, because it improves build caches and helps
# prevent edge cases where CI doesn't catch build errors due to more features
Expand Down Expand Up @@ -86,3 +86,4 @@ inherits = "release"
lto = true
strip = true
debug = false

1 change: 1 addition & 0 deletions can/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ mod imp {
}

pub(crate) struct Empty;
#[expect(dead_code)]
pub(crate) struct Set<T: AsRef<RawCanAddr>>(pub(crate) T);
pub(crate) struct SetMut<'a, T: AsMut<RawCanAddr>>(pub(crate) &'a mut T);

Expand Down
10 changes: 8 additions & 2 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
[graph]
# Cargo deny will check dependencies via `--all-features`
all-features = true

[advisories]
version = 2
ignore = [
{ id = "RUSTSEC-2024-0370", reason = "low risk and cmd_lib hasn't updated it yet. See https://github.com/rust-shell-script/rust_cmd_lib/issues/67" }
]

[sources]
unknown-registry = "deny"

[licenses]
unlicensed = "deny"
copyleft = "deny"
version = 2
# We want really high confidence when inferring licenses from text
confidence-threshold = 1.0

Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# you can still `cargo zigbuild`.
rustToolchain = fenix.packages.${system}.fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-Ngiz76YP4HTY75GGdH2P+APE/DEIx2R/Dn+BwwOyzZU=";
sha256 = "sha256-VZZnlyP69+Y3crrLHQyJirqlHrTtGTsyiSnZB8jEvVo=";
};
rustPlatform = p.native.makeRustPlatform {
inherit (rustToolchain) cargo rustc;
Expand Down
1 change: 1 addition & 0 deletions mcu-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub trait MessagingInterface {
/// Create a unique ack number
/// - prefix with process ID
/// - suffix with counter
///
/// this added piece of information in the ack number is not strictly necessary
/// but helps filter out acks that are not for us (e.g. acks for other processes)
#[inline]
Expand Down
4 changes: 4 additions & 0 deletions mcu-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ unsupported_targets = [
]

[package.metadata.deb]

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ['cfg(tokio_unstable)']
2 changes: 1 addition & 1 deletion orb-backend-state/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct OrbId(String);
pub async fn get_state(id: &OrbId, token: &Token) -> Result<State> {
let c = get_http_client();
let response = c
.get(&format!("{API_BASE_URL}/api/v1/orbs/{id}/state"))
.get(format!("{API_BASE_URL}/api/v1/orbs/{id}/state"))
.basic_auth(id, Some(token))
.send()
.await
Expand Down
15 changes: 7 additions & 8 deletions orb-supervisor/src/startup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,13 @@ impl Application {
///
/// [`Application::build`] will return the following errors:
///
/// + [`Error::SessionDbusAddress`], if the path to the socket holding the session D-Bus
/// instance was not understood (the path is conventionally stored in the environment variable
/// `$DBUS_SESSION_BUS_ADDRESS`, e.g. `unix:path=/run/user/1000/bus` and usually set by
/// systemd.
/// + [`Error::EstablishSessionConnection`], if an error occurred while trying to establish
/// a connection to the session D-Bus instance, or trying to register an interface with it.
/// path to which is conventionally stored in the environment variable
/// systemd.
/// * [`Error::SessionDbusAddress`], if the path to the socket holding the session D-Bus
/// instance was not understood (the path is conventionally stored in the environment
/// variable `$DBUS_SESSION_BUS_ADDRESS`, e.g. `unix:path=/run/user/1000/bus` and usually set
/// by systemd.
/// * [`Error::EstablishSessionConnection`], if an error occurred while trying to establish
/// a connection to the session D-Bus instance, or trying to register an interface with it.
/// path to which is conventionally stored in the environment variable systemd.
pub async fn build(settings: Settings) -> Result<Application, Error> {
let system_builder = if let Some(path) = settings.system_dbus_path.as_deref() {
ConnectionBuilder::address(path)?
Expand Down
5 changes: 3 additions & 2 deletions orb-supervisor/src/tasks/signup_started.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ use crate::{interfaces::Manager, proxies::core::SignupProxy, startup::Settings};
///
/// # Errors
///
/// + `[zbus::Error]` if an error occurred while building a D-Bus proxy listening for signups from
/// `orb-core`. The errors are the same as those in [`zbus::ProxyBuilder`].
/// * `[zbus::Error]` if an error occurred while building a D-Bus proxy listening for
/// signups from `orb-core`. The errors are the same as those in
/// [`zbus::ProxyBuilder`].
pub async fn spawn_signup_started_task<'a>(
settings: &Settings,
connection: &'a zbus::Connection,
Expand Down
4 changes: 4 additions & 0 deletions orb-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ unsupported_targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
]

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ['cfg(tokio_unstable)']
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.79.0" # See Cargo.toml
channel = "1.81.0" # See Cargo.toml
targets = ["aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"]
profile = "minimal"
components = ["clippy", "llvm-tools-preview", "rustfmt", "rust-src", "rust-analyzer"]
2 changes: 1 addition & 1 deletion seek-camera/wrapper/src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl Camera {
/// ...
/// ```
/// - `progress_cb`: If not `None`, will call this function with the progress
/// percentage as a value from \[0,100\]
/// percentage as a value from \[0,100\]
///
/// # Panics
/// Panics if capture is active.
Expand Down
32 changes: 16 additions & 16 deletions wpa-supplicant/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,25 +318,25 @@ async fn get_bss_list<'a>(
/// # Known Issues
///
/// - *You cannot add a PBKDF2-derived PSK over DBus...*
/// The `AddNetwork` DBus method takes args as a kv-map which matches the
/// wpa_supplicant.conf(5). Within that conf, a PSK can either be represented
/// as a quoted plaintext string, or as an unquoted 64-character hex representation
/// of the PBKDF2-derived key.
///
/// When wpa_supplicant handles `AddNetwork`'s network kv-map argument, the values get
/// parsed into the `wpa_ssid` struct based on the DBus value type. In the case of
/// strings, they get filtered through the `should_quote_opt` method which simply looks
/// up the field name in a `dont_quote` map.
///
/// The PSK is missing from this map, and so our password is always quoted, meaning we
/// are only able to configure a network with plaintext passwords.
/// The `AddNetwork` DBus method takes args as a kv-map which matches the
/// wpa_supplicant.conf(5). Within that conf, a PSK can either be represented as a
/// quoted plaintext string, or as an unquoted 64-character hex representation of the
/// PBKDF2-derived key.
///
/// When wpa_supplicant handles `AddNetwork`'s network kv-map argument, the values get
/// parsed into the `wpa_ssid` struct based on the DBus value type. In the case of
/// strings, they get filtered through the `should_quote_opt` method which simply
/// looks up the field name in a `dont_quote` map.
///
/// The PSK is missing from this map, and so our password is always quoted, meaning we
/// are only able to configure a network with plaintext passwords.
///
/// - *We cannot check that an existing `Network` instance matches our `Credentials`*
/// There is no immediate way to get the PSK (PBKDF2-derived or plaintext) from the `Network`s
/// properties.
/// There is no immediate way to get the PSK (PBKDF2-derived or plaintext) from the
/// `Network`s properties.
///
/// - *Occasionally, converting from a `Network` owned object path to an actual `Network`
/// interface fails*.
/// - *Occasionally, converting from a `Network` owned object path to an actual
/// `Network` interface fails*.
async fn find_or_add_network<'a>(
conn: &zbus::Connection,
iface_proxy: &wpa_dbus::InterfaceProxy<'a>,
Expand Down

0 comments on commit 7eb9dd9

Please sign in to comment.