Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flutter-engine-revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ef0cd00091
13e658725d
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "Sources/CxxFlutterSwift/flutter-embedded-linux"]
path = Sources/CxxFlutterSwift/flutter-embedded-linux
url = https://github.com/sony/flutter-embedded-linux
url = https://github.com/flutter-elinux/flutter-embedded-linux
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It consists of three components:

* An idiomatic, [Codable](https://developer.apple.com/documentation/foundation/archives_and_serialization/encoding_and_decoding_custom_types), [asynchronous](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/concurrency/) Swift implementation of Flutter [platform channels](https://docs.flutter.dev/platform-integration/platform-channels)
* Wrappers to integrate with the platform event loop and Flutter embedding's runner
* On [eLinux](https://github.com/sony/flutter-embedded-linux), a pure Swift runner that hosts your application
* On [eLinux](https://github.com/flutter-elinux/flutter-embedded-linux), a pure Swift runner that hosts your application

The end-goal is to allow Flutter to be used for the UI, and Swift the business logic, in a cross-platform manner. Currently supported targets are macOS, iOS, Android and eLinux.

Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- remove checked in Wayland sources, write a SwiftPM extension to generate them
- fix `libflutter_engine.so` binary artifact
- [build steps](https://github.com/sony/flutter-embedded-linux/wiki/Building-Flutter-apps#cross-build-for-arm64-targets-on-x64-hosts)
- [build steps](https://github.com/flutter-elinux/flutter-embedded-linux/wiki/Building-Flutter-apps#cross-build-for-arm64-targets-on-x64-hosts)

- warnings
* FlutterSwift/Client/FlutterEngine.swift:40:77: warning: passing argument of non-sendable type 'FlutterDesktopEngineRef' (aka 'OpaquePointer') into actor-isolated context may introduce data races
Expand Down
13 changes: 7 additions & 6 deletions build-elinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ ${DART_CACHE_BINDIR}/dartaotruntime \
--no-print-incremental-dependencies \
-Ddart.vm.profile=false \
-Ddart.vm.product=true \
--delete-tostring-package-uri=dart:ui \
--delete-tostring-package-uri=package:flutter \
--aot \
--tfa \
--target-os linux \
Expand All @@ -39,21 +41,20 @@ ${DART_CACHE_BINDIR}/dartaotruntime \
# Build AOT image.
if [ "X${FLUTTER_SWIFT_BUILD_CONFIG}" == "Xrelease" ]; then
echo "Building AOT image..."
${FLUTTER_CACHE_ENGINEDIR}/linux-${ARCH}-release/gen_snapshot \
${DART_CACHE_BINDIR}/utils/gen_snapshot \
--deterministic \
--snapshot_kind=app-aot-elf \
--elf=.dart_tool/flutter_build/flutter-embedded-linux/app.so \
--elf=${BUNDLE_DIR}/lib/libapp.so \
--strip \
.dart_tool/flutter_build/flutter-embedded-linux/app.dill

cp .dart_tool/flutter_build/flutter-embedded-linux/app.so ${BUNDLE_DIR}/lib/libapp.so
ls -al ${BUNDLE_DIR}/lib/libapp.so

# remove these artefacts to ensure we don't accidentally start in JIT mode
echo "Removing JIT artifacts..."
rm -rf ${BUNDLE_DIR}/data/flutter_assets/kernel_blob.bin
rm -rf ${BUNDLE_DIR}/data/flutter_assets/isolate_snapshot_data
rm -rf ${BUNDLE_DIR}/data/flutter_assets/vm_snapshot_data
rm -f ${BUNDLE_DIR}/data/flutter_assets/kernel_blob.bin
rm -f ${BUNDLE_DIR}/data/flutter_assets/isolate_snapshot_data
rm -f ${BUNDLE_DIR}/data/flutter_assets/vm_snapshot_data
fi

echo "Building Swift component..."
Expand Down
2 changes: 1 addition & 1 deletion download-engine.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

ENGINE_REVISION=$(cat .flutter-engine-revision)
ENGINE_URL="https://github.com/sony/flutter-embedded-linux/releases/download/${ENGINE_REVISION}"
ENGINE_URL="https://github.com/flutter-elinux/flutter-embedded-linux/releases/download/${ENGINE_REVISION}"

tmp_dir=$(mktemp -d -t engine-XXXXXXXXXX)
artifact_dir="$tmp_dir/flutter-engine.artifactbundle"
Expand Down
Binary file modified flutter-engine.artifactbundle.zip
Binary file not shown.
5 changes: 1 addition & 4 deletions run-elinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

source build-defaults.inc

# prefer the cached release versions to the ones that are included in the
# FlutterSwift zip (which are debug versions)

export LD_LIBRARY_PATH="${FLUTTER_CACHE_ENGINEDIR}/elinux-${ARCH}-${FLUTTER_SWIFT_BUILD_CONFIG}"
export LD_LIBRARY_PATH="${BUNDLE_DIR}/lib"
export LD_PRELOAD="${LD_LIBRARY_PATH}/libflutter_engine.so"

.build/$FLUTTER_SWIFT_BUILD_CONFIG/counter ${BUNDLE_DIR}