Skip to content

Commit

Permalink
Upgrade Rust to 1.74 version
Browse files Browse the repository at this point in the history
- upgrade Cargo and pub dependencies
- satisfy new Clippy and dartanalyzer lints
  • Loading branch information
tyranron committed Nov 17, 2023
1 parent 89db8e4 commit 76b5609
Show file tree
Hide file tree
Showing 11 changed files with 172 additions and 108 deletions.
162 changes: 104 additions & 58 deletions Cargo.lock

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

7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ eq = $(if $(or $(1),$(2)),$(and $(findstring $(1),$(2)),\
# Project parameters #
######################

RUST_VER ?= 1.64
RUST_NIGHTLY_VER ?= nightly-2022-10-05
RUST_VER ?= 1.74
RUST_NIGHTLY_VER ?= nightly-2023-11-16

FLUTTER_RUST_BRIDGE_VER ?= $(strip \
$(shell grep -A1 'name = "flutter_rust_bridge"' Cargo.lock \
Expand Down Expand Up @@ -305,6 +305,9 @@ endif
--no-build-runner \
--dart-enums-style \
--inline-rust
sed -i$(if $(call eq,$(CURRENT_OS),macos), '',) \
's/^pub use io::\*;$$/pub use self::io::*;/' \
crates/native/src/bridge_generated.rs
flutter pub run build_runner build --delete-conflicting-outputs


Expand Down
8 changes: 8 additions & 0 deletions crates/libwebrtc-sys/src/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2356,10 +2356,18 @@ pub(crate) mod webrtc {

/// Converts the provided [`webrtc::VideoFrame`] pixels to the `ABGR`
/// scheme and writes the result to the provided `buffer`.
///
/// # Safety
///
/// Caller must ensure that the provided `buffer` is large enough.
pub unsafe fn video_frame_to_abgr(frame: &VideoFrame, buffer: *mut u8);

/// Converts the provided [`webrtc::VideoFrame`] pixels to the `ARGB`
/// scheme and writes the result to the provided `buffer`.
///
/// # Safety
///
/// Caller must ensure that the provided `buffer` is large enough.
pub unsafe fn video_frame_to_argb(
frame: &VideoFrame,
argb_stride: i32,
Expand Down
Loading

0 comments on commit 76b5609

Please sign in to comment.