Comments (2)
The biggest issue with this right now is that Flutter engine does not have official arm64 build for macOS. I opened issue for this here but there haven't been much progress. Technically you could build engine yourself from scratch, in which case you can build for arm64 and cross compile for intel (or vice versa) and build the nativeshell app with custom engine (arm64 for arm64 build, intel for intel build) and then lipo the resulting binaries together. I've done it locally, it's doable, but it's quite a lot of work to do.
from nativeshell.
Building the engine locally is actually easier now compared to last year since Flutter team is actively working on publishing apple silicon engine and also because flutter beta channel already ships arm64 dart.
Just follow these steps: https://github.com/flutter/flutter/wiki/Compiling-the-engine#compiling-for-macos-or-linux
Remember to match kernel binary format version between the engine and flutter, for example for me master
channel works with engine's branch flutter-2.12-candidate.11
(you will have to run gclient sync
after changing the branch)
- Disable unit tests and some skia stuff
root: src/flutter
diff --git a/testing/testing.gni b/testing/testing.gni
index 4fd02403aa..40ca7afb39 100644
--- a/testing/testing.gni
+++ b/testing/testing.gni
@@ -12,7 +12,7 @@ is_aot_test =
# Unit tests targets are only enabled for host machines and Fuchsia right now
declare_args() {
- enable_unittests = current_toolchain == host_toolchain || is_fuchsia
+ enable_unittests = false #current_toolchain == host_toolchain || is_fuchsia
}
root: src/third_party/skia
diff --git a/BUILD.gn b/BUILD.gn
index d086f04a07..2ab968a942 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1136,9 +1136,9 @@ optional("raw") {
public_defines = [ "SK_CODEC_DECODES_RAW" ]
deps = [
- "//third_party/dng_sdk",
+# "//third_party/dng_sdk",
"//third_party/libjpeg-turbo:libjpeg",
- "//third_party/piex",
+# "//third_party/piex",
]
# SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of
- There will be an error saying that
gen_snapshot
is missing, just copy it to the clang directory:
$ cp out/mac_debug_arm64/gen_snapshot out/mac_debug_arm64/clang_x64/gen_snapshot
-
Run
ninja
again and it should finish this time. -
Then create the link:
$ cd ~/dev/flutter/bin/cache/artifacts/engine
$ ln -s ~/dev/Projects/engine/src/out/mac_debug_arm64 darwin-arm64
- Run the app:
$ cargo run
from nativeshell.
Related Issues (20)
- Crashes on multiple monitors in Windows HOT 4
- Is there any way to lower the minimum supported version of macOS HOT 1
- way to run existing flutter code HOT 4
- How to specify libflutter location
- Frameless windows are not resizable on macOS
- Fails to build on apple silicon with Flutter 3.0.0 HOT 2
- The Flutter Attach to Process gets stuck on Waiting... HOT 3
- Invalid read causes segmentation fault HOT 3
- std::rc::Weak<ContextImpl>` cannot be sent between threads safely
- std::rc::Weak<ContextImpl>` cannot be sent between threads safely
- MenuItem clash with flutter widget of the same name HOT 1
- Getting an error when trying to run the examples HOT 2
- Build Error on MacOS 13.2.1 - cargo run or cargo run --release unable to build and run the flutter app for example provided
- Issues with native plugin `media_kit`
- Latest SharedPreferences not working HOT 1
- Jitter when resizing on Windows when frame is `WindowFrame.noTitle` HOT 1
- Unable to build sample project HOT 2
- [super_context_menu] Change/Remove Progress Indicator for DeferredMenuElement
- Calling dart from rust side?
- Support current stable version of Flutter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativeshell.