Skip to content

Commit

Permalink
Update flutter_rust_bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Jul 1, 2024
1 parent 4ebb0b8 commit 25347bb
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 31 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build: build_rust build_gen
flutter build macos
flutter build macos --analyze-size

watch:
dart run build_runner watch --delete-conflicting-outputs
Expand All @@ -14,7 +14,7 @@ watch_rust:
flutter_rust_bridge_codegen generate --watch

update_rust:
cargo install 'flutter_rust_bridge_codegen@^2.0.0-dev.0' && flutter_rust_bridge_codegen generate
cargo install 'flutter_rust_bridge_codegen' && flutter_rust_bridge_codegen generate

create_dmg:
./scripts/create_dmg.sh
Expand Down
2 changes: 1 addition & 1 deletion flutter_rust_bridge.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rust_input: rust/src/api/**/*.rs
dart_output: lib/src/rust
dart_output: lib/src/rust
2 changes: 1 addition & 1 deletion lib/src/rust/api/compressor.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.
// Generated by `flutter_rust_bridge`@ 2.0.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

Expand Down
7 changes: 4 additions & 3 deletions lib/src/rust/frb_generated.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.
// Generated by `flutter_rust_bridge`@ 2.0.0.

// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field

import 'api/compressor.dart';
import 'dart:async';
import 'dart:convert';
import 'frb_generated.dart';
import 'frb_generated.io.dart' if (dart.library.html) 'frb_generated.web.dart';
import 'frb_generated.io.dart'
if (dart.library.js_interop) 'frb_generated.web.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

/// Main entrypoint of the Rust API
Expand Down Expand Up @@ -54,7 +55,7 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
kDefaultExternalLibraryLoaderConfig;

@override
String get codegenVersion => '2.0.0-dev.39';
String get codegenVersion => '2.0.0';

@override
int get rustContentHash => -1541159124;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/rust/frb_generated.io.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.
// Generated by `flutter_rust_bridge`@ 2.0.0.

// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field

Expand Down
2 changes: 1 addition & 1 deletion lib/src/rust/frb_generated.web.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.
// Generated by `flutter_rust_bridge`@ 2.0.0.

// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field

Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,10 @@ packages:
dependency: "direct main"
description:
name: flutter_rust_bridge
sha256: ee0d9798156ba523ca24bfb690efd15614f823685df270447c480dd5923d9a0b
sha256: f703c4b50e253e53efc604d50281bbaefe82d615856f8ae1e7625518ae252e98
url: "https://pub.dev"
source: hosted
version: "2.0.0-dev.39"
version: "2.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
window_manager: ^0.3.8
rust_builder:
path: rust_builder
flutter_rust_bridge: 2.0.0-dev.39
flutter_rust_bridge: ^2.0.0
file_selector: ^1.0.3
signals: ^5.0.0
open_file_macos: ^0.0.1
Expand Down
8 changes: 4 additions & 4 deletions rust/Cargo.lock

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

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2021"
crate-type = ["cdylib", "staticlib"]

[dependencies]
flutter_rust_bridge = "=2.0.0-dev.39"
flutter_rust_bridge = "=2.0.0"
image = "^0.25"
libcaesium = { git = "https://github.com/Lymphatus/libcaesium.git", tag = "0.15.5" }
4 changes: 2 additions & 2 deletions rust/src/frb_generated.io.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.
// Generated by `flutter_rust_bridge`@ 2.0.0.

// Section: imports

use super::*;
use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
use flutter_rust_bridge::for_generated::{transform_result_dco, Lockable};
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
use flutter_rust_bridge::{Handler, IntoIntoDart};

// Section: boilerplate
Expand Down
26 changes: 16 additions & 10 deletions rust/src/frb_generated.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.
// Generated by `flutter_rust_bridge`@ 2.0.0.

#![allow(
non_camel_case_types,
Expand All @@ -16,13 +16,17 @@
clippy::too_many_arguments,
clippy::match_single_binding,
clippy::clone_on_copy,
clippy::let_unit_value
clippy::let_unit_value,
clippy::deref_addrof,
clippy::explicit_auto_deref,
clippy::borrow_deref_ref,
clippy::needless_borrow
)]

// Section: imports

use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
use flutter_rust_bridge::for_generated::{transform_result_dco, Lockable};
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
use flutter_rust_bridge::{Handler, IntoIntoDart};

// Section: boilerplate
Expand All @@ -32,7 +36,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
default_rust_opaque = RustOpaqueMoi,
default_rust_auto_opaque = RustAutoOpaqueMoi,
);
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.39";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -1541159124;

// Section: executor
Expand Down Expand Up @@ -65,10 +69,11 @@ fn wire__crate__api__compressor__init_app_impl(
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
deserializer.end();
move |context| {
transform_result_sse((move || {
Result::<_, ()>::Ok({
transform_result_sse::<_, ()>((move || {
let output_ok = Result::<_, ()>::Ok({
crate::api::compressor::init_app();
})
})?;
Ok(output_ok)
})())
}
},
Expand Down Expand Up @@ -102,12 +107,13 @@ fn wire__crate__api__compressor__process_img_impl(
<crate::api::compressor::Parameters>::sse_decode(&mut deserializer);
deserializer.end();
move |context| {
transform_result_sse((move || {
Result::<_, ()>::Ok(crate::api::compressor::process_img(
transform_result_sse::<_, ()>((move || {
let output_ok = Result::<_, ()>::Ok(crate::api::compressor::process_img(
api_path,
api_out_path,
api_parameters,
))
))?;
Ok(output_ok)
})())
}
},
Expand Down
4 changes: 2 additions & 2 deletions rust/src/frb_generated.web.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.
// Generated by `flutter_rust_bridge`@ 2.0.0.

// Section: imports

use super::*;
use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
use flutter_rust_bridge::for_generated::wasm_bindgen;
use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*;
use flutter_rust_bridge::for_generated::{transform_result_dco, Lockable};
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
use flutter_rust_bridge::{Handler, IntoIntoDart};

// Section: boilerplate
Expand Down

0 comments on commit 25347bb

Please sign in to comment.