Skip to content

Commit

Permalink
⬆️ Roll FRB (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 authored Oct 9, 2024
1 parent f432d82 commit 5e02961
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 28 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ that can be found in the LICENSE file. -->

# Changelog

## 1.0.0-dev.27

- Support `flutter_rust_bridge` 2.5.

## 1.0.0-dev.26

- Reorg exports/imports so people can directly import `agent_dart_base/agent_dart_base.dart`
Expand Down
1 change: 1 addition & 0 deletions packages/agent_dart/lib/frb.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'package:agent_dart_base/frb.dart';
2 changes: 1 addition & 1 deletion packages/agent_dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: agent_dart
version: 1.0.0-dev.26
version: 1.0.0-dev.27

description: |
An agent library built for Internet Computer,
Expand Down
2 changes: 0 additions & 2 deletions packages/agent_dart_base/lib/agent/agent/http/fetch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import 'package:http/http.dart' as http;

import '../../types.dart';

// import 'index.dart';

const defaultTimeout = Duration(seconds: 30);

/// [defaultFetch] is a wrapper of [http.get],
Expand Down
2 changes: 2 additions & 0 deletions packages/agent_dart_base/lib/frb.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export 'package:agent_dart_ffi/agent_dart_ffi.dart'
show AnyhowException, ExternalLibrary;
3 changes: 1 addition & 2 deletions packages/agent_dart_base/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: agent_dart_base
version: 1.0.0-dev.26
version: 1.0.0-dev.27

description: The Dart plugin that bridges Rust implementation for agent_dart.
repository: https://github.com/AstroxNetwork/agent_dart
Expand All @@ -20,7 +20,6 @@ dependencies:
convert: ^3.0.1
crypto: ^3.0.2
fixnum: ^1.0.1
flutter_rust_bridge: '>=2.1.0 <2.2.0'
http: ^1.0.0
js: '>=0.6.4 <0.8.0'
meta: ^1.7.0
Expand Down
2 changes: 0 additions & 2 deletions packages/agent_dart_base/test/identity/ed25519.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import 'dart:typed_data';
import 'package:agent_dart_base/agent_dart_base.dart';
import 'package:test/test.dart';

// import 'package:agent_dart/utils/extension.dart';

void main() {
ed25519Test();
}
Expand Down
4 changes: 0 additions & 4 deletions packages/agent_dart_base/test/test_utils.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
// import 'dart:ffi';

import 'dart:ffi';

import 'package:agent_dart_ffi/agent_dart_ffi.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
import 'package:test/test.dart';

// import 'package:p4d_rust_binding/utils/utils.dart';
const isAssertionError = TypeMatcher<AssertionError>();

Matcher assertionThrowsContains(String str) {
Expand Down
3 changes: 3 additions & 0 deletions packages/agent_dart_ffi/lib/agent_dart_ffi.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'
show AnyhowException, ExternalLibrary;

export 'src/api.dart';
export 'src/frb_generated.dart' show AgentDart;
export 'src/lib.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/agent_dart_ffi/lib/src/api.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.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

Expand Down
14 changes: 12 additions & 2 deletions packages/agent_dart_ffi/lib/src/frb_generated.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.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.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 Expand Up @@ -36,6 +36,16 @@ class AgentDart
);
}

/// Initialize flutter_rust_bridge in mock mode.
/// No libraries for FFI are loaded.
static void initMock({
required AgentDartApi api,
}) {
instance.initMockImpl(
api: api,
);
}

/// Dispose flutter_rust_bridge
///
/// The call to this function is optional, since flutter_rust_bridge (and everything else)
Expand All @@ -58,7 +68,7 @@ class AgentDart
kDefaultExternalLibraryLoaderConfig;

@override
String get codegenVersion => '2.1.0';
String get codegenVersion => '2.5.0';

@override
int get rustContentHash => 796173266;
Expand Down
2 changes: 1 addition & 1 deletion packages/agent_dart_ffi/lib/src/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.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.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 packages/agent_dart_ffi/lib/src/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.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.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 packages/agent_dart_ffi/lib/src/p256.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.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

Expand Down
2 changes: 1 addition & 1 deletion packages/agent_dart_ffi/lib/src/schnorr.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.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

Expand Down
2 changes: 1 addition & 1 deletion packages/agent_dart_ffi/lib/src/secp256k1.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.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

Expand Down
2 changes: 1 addition & 1 deletion packages/agent_dart_ffi/lib/src/types.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.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

Expand Down
4 changes: 2 additions & 2 deletions packages/agent_dart_ffi/native/agent_dart/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ lazy_static = "1.4.0"
tokio = { version = "1", default-features = false, features = [ "rt-multi-thread", "time", "sync" ] }
hex = "0.4.3"
ecdsa = { version = "0.14.6", features = ["der"], default-features = false }
flutter_rust_bridge = "=2.1.0"
flutter_rust_bridge = "=2.5.0"

[dev-dependencies]

[build-dependencies]
flutter_rust_bridge_codegen = "=2.1.0"
flutter_rust_bridge_codegen = "=2.5.0"

[profile.release]
debug = false
Expand Down
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.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.0.

#![allow(
non_camel_case_types,
Expand Down Expand Up @@ -36,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.1.0";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.5.0";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 796173266;

// Section: executor
Expand Down Expand Up @@ -2372,7 +2372,7 @@ impl SseEncode for i32 {
#[cfg(not(target_family = "wasm"))]
mod io {
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.0.

// Section: imports

Expand All @@ -2394,7 +2394,7 @@ pub use io::*;
#[cfg(target_family = "wasm")]
mod web {
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.1.0.
// @generated by `flutter_rust_bridge`@ 2.5.0.

// Section: imports

Expand Down
4 changes: 2 additions & 2 deletions packages/agent_dart_ffi/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: agent_dart_ffi
version: 1.0.0-dev.26
version: 1.0.0-dev.27

description: The FFI plugin that bridges Rust implementation for agent_dart.
repository: https://github.com/AstroxNetwork/agent_dart
Expand All @@ -9,7 +9,7 @@ environment:
sdk: '>=3.4.0 <4.0.0'

dependencies:
flutter_rust_bridge: '>=2.1.0 <2.2.0'
flutter_rust_bridge: '>=2.5.0 <2.6.0'
freezed_annotation: ^2.2.0

dev_dependencies:
Expand Down

0 comments on commit 5e02961

Please sign in to comment.