-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into adds-forge
- Loading branch information
Showing
70 changed files
with
4,929 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
VERSION 0.8 | ||
|
||
IMPORT ../flutter AS flutter-ci | ||
IMPORT ../rust AS rust-ci | ||
|
||
# This will be refactored in the future | ||
# TODO(bkioshn): https://github.com/input-output-hk/catalyst-ci/issues/322 | ||
# builder: Setup necessary tools for `flutter_rust_bridge` | ||
builder: | ||
FROM debian:stable-slim | ||
|
||
WORKDIR /work | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
apt-utils \ | ||
wget \ | ||
tar \ | ||
xz-utils \ | ||
git \ | ||
build-essential \ | ||
curl \ | ||
unzip | ||
|
||
DO flutter-ci+INSTALL_FLUTTER | ||
DO rust-ci+INSTALL_RUST | ||
DO rust-ci+INSTALL_TOOLS | ||
|
||
# Generated necessary files for running Flutter web. | ||
CODE_GENERATOR_WEB: | ||
FUNCTION | ||
|
||
RUN flutter_rust_bridge_codegen generate --default-external-library-loader-web-prefix=/assets/packages/catalyst_key_derivation/assets/js/ | ||
RUN flutter_rust_bridge_codegen build-web | ||
|
||
RUN mkdir -p assets/js && cp -rf ./web/pkg/* assets/js/ | ||
# Don't want this gitignore file. | ||
RUN rm -rf ./assets/js/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
rust_input: crate::api | ||
rust_root: rust/ | ||
dart_output: lib/src/rust |
13 changes: 13 additions & 0 deletions
13
examples/flutter/example/integration_test/simple_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:example/main.dart'; | ||
import 'package:example/src/rust/frb_generated.dart'; | ||
import 'package:integration_test/integration_test.dart'; | ||
|
||
void main() { | ||
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
setUpAll(() async => await RustLib.init()); | ||
testWidgets('Can call rust function', (WidgetTester tester) async { | ||
await tester.pumpWidget(const MyApp()); | ||
expect(find.textContaining('Result: `Hello, Tom!`'), findsOneWidget); | ||
}); | ||
} |
Oops, something went wrong.