Skip to content

Commit

Permalink
Update deps, even faster now
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Jun 16, 2024
1 parent 7187b51 commit 474c914
Show file tree
Hide file tree
Showing 11 changed files with 415 additions and 225 deletions.
11 changes: 6 additions & 5 deletions lib/src/rust/api/compressor.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

import '../frb_generated.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

// These functions are ignored because they are not marked as `pub`: `compress_image`, `read_image`

Future<String> processImg(
{required String path,
required String outPath,
required Parameters parameters,
dynamic hint}) =>
RustLib.instance.api.processImg(
path: path, outPath: outPath, parameters: parameters, hint: hint);
required Parameters parameters}) =>
RustLib.instance.api.crateApiCompressorProcessImg(
path: path, outPath: outPath, parameters: parameters);

class Parameters {
final int jpegQuality;
Expand Down
36 changes: 17 additions & 19 deletions lib/src/rust/frb_generated.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.

// 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 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

Expand Down Expand Up @@ -45,15 +46,15 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {

@override
Future<void> executeRustInitializers() async {
await api.initApp();
await api.crateApiCompressorInitApp();
}

@override
ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig =>
kDefaultExternalLibraryLoaderConfig;

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

@override
int get rustContentHash => -1541159124;
Expand All @@ -67,13 +68,12 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
}

abstract class RustLibApi extends BaseApi {
Future<void> initApp({dynamic hint});
Future<void> crateApiCompressorInitApp();

Future<String> processImg(
Future<String> crateApiCompressorProcessImg(
{required String path,
required String outPath,
required Parameters parameters,
dynamic hint});
required Parameters parameters});
}

class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
Expand All @@ -85,56 +85,54 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
});

@override
Future<void> initApp({dynamic hint}) {
Future<void> crateApiCompressorInitApp() {
return handler.executeNormal(NormalTask(
callFfi: (port_) {
final serializer = SseSerializer(generalizedFrbRustBinding);
pdeCallFfi(generalizedFrbRustBinding, serializer,
funcId: 2, port: port_);
funcId: 1, port: port_);
},
codec: SseCodec(
decodeSuccessData: sse_decode_unit,
decodeErrorData: null,
),
constMeta: kInitAppConstMeta,
constMeta: kCrateApiCompressorInitAppConstMeta,
argValues: [],
apiImpl: this,
hint: hint,
));
}

TaskConstMeta get kInitAppConstMeta => const TaskConstMeta(
TaskConstMeta get kCrateApiCompressorInitAppConstMeta => const TaskConstMeta(
debugName: "init_app",
argNames: [],
);

@override
Future<String> processImg(
Future<String> crateApiCompressorProcessImg(
{required String path,
required String outPath,
required Parameters parameters,
dynamic hint}) {
required Parameters parameters}) {
return handler.executeNormal(NormalTask(
callFfi: (port_) {
final serializer = SseSerializer(generalizedFrbRustBinding);
sse_encode_String(path, serializer);
sse_encode_String(outPath, serializer);
sse_encode_box_autoadd_parameters(parameters, serializer);
pdeCallFfi(generalizedFrbRustBinding, serializer,
funcId: 1, port: port_);
funcId: 2, port: port_);
},
codec: SseCodec(
decodeSuccessData: sse_decode_String,
decodeErrorData: null,
),
constMeta: kProcessImgConstMeta,
constMeta: kCrateApiCompressorProcessImgConstMeta,
argValues: [path, outPath, parameters],
apiImpl: this,
hint: hint,
));
}

TaskConstMeta get kProcessImgConstMeta => const TaskConstMeta(
TaskConstMeta get kCrateApiCompressorProcessImgConstMeta =>
const TaskConstMeta(
debugName: "process_img",
argNames: ["path", "outPath", "parameters"],
);
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.33.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.

// 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
13 changes: 5 additions & 8 deletions lib/src/rust/frb_generated.web.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.39.

// 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

// Static analysis wrongly picks the IO variant, thus ignore this
// ignore_for_file: argument_type_not_assignable

import 'api/compressor.dart';
import 'dart:async';
import 'dart:convert';
Expand Down Expand Up @@ -109,10 +112,4 @@ external RustLibWasmModule get wasmModule;

@JS()
@anonymous
class RustLibWasmModule implements WasmModule {
@override
external Object /* Promise */ call([String? moduleName]);

@override
external RustLibWasmModule bind(dynamic thisArg, String moduleName);
}
extension type RustLibWasmModule._(JSObject _) implements JSObject {}
Loading

0 comments on commit 474c914

Please sign in to comment.