AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[FR] Universal build for M1 support?

Open FallenChromium opened this issue 4 years ago • 9 comments

Hi there! I loved the design of the app ♥️ One of the problems I've encountered is that it runs under Rosetta 2 on my laptop, which is undesirable, mainly because smoothness suffers and so does the battery life. Is there any way to compile Rust+Dart app into a Universal app?

FallenChromium avatar Nov 18 '21 12:11 FallenChromium

@FallenChromium Absolutely yes, but the size of the application will be larger. I can build one for M1. Please let me know how you think about it.

appflowy avatar Nov 18 '21 13:11 appflowy

It's absolutely fine to have 2 separate releases for each architecture (like most utils on Homebrew do, anyway), so I think it's a viable solution.

That said, it's always a compromise. I can see Universal App being easier to distribute but more painful to build (especially in an automated fashion). Separating targets and release products can also be a pain in the back, especially when other arches and\or platforms will join (win_x64, win_arm64, linux_x64, linux_arm64, you probably already imagined that giant GitHub Releases file list 🤣)

FallenChromium avatar Nov 18 '21 14:11 FallenChromium

Seems flutter doesn't support build application for native Apple M1 chip. Below wiki page shows that M1 can run X86_64 application through Rosetta2 at this moment. So you will see Intel arch in "Activity Monitor" when running appflowy on MacOS

https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon

Compiled Intel macOS binaries work on Apple Silicon without change thanks to the Rosetta 2 translation environment, which converts x86_64 instructions to ARM64 equivalents. We also plan to offer support for compilation directly to ARM64, as well as universal binaries that combine x86_64 and ARM64 assets. Issue 60113 is the umbrella bug tracking this work.

pdckxd avatar Nov 20 '21 07:11 pdckxd

I have the same appeal, I hope I can have M1 version applications.

ioiioo avatar Dec 10 '21 03:12 ioiioo

kindly support native arm arch pls

lvelvee avatar Dec 21 '21 04:12 lvelvee

Is there any news about native ARM build support ? In the documentation in Building on MacOS -> Building in release mode, there is arm64 command, but it still doesn't work.

WATERMELOUN3 avatar Apr 28 '22 09:04 WATERMELOUN3

Any update about this? since flutter v3 already support apple silicon without rosetta ps: https://github.com/flutter/website/pull/7119#issuecomment-1124537969

ghost avatar May 18 '22 16:05 ghost

It seems Flutter recently released apple silicon support. I hope it's generic ARM64 so I can run on M1 Studio as well as low-end devices like the raspberry pi.

Links:

  • https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon
  • https://github.com/flutter/flutter/issues/60113
  • https://github.com/flutter/flutter/issues/87508

Lewiscowles1986 avatar Jul 30 '22 11:07 Lewiscowles1986

If there are tests or it's a matter of configuring a build, I'm in BST London, and happy to take the time to use my hardware to build on an M1 and host while the github process for building is worked out.

Lewiscowles1986 avatar Jul 30 '22 11:07 Lewiscowles1986

Hi @Lewiscowles1986 , can you share the build with us :D

SuperBo avatar Oct 09 '22 00:10 SuperBo

It didn’t build and it seems I e not kept a log of why, or what the errors were

Lewiscowles1986 avatar Oct 14 '22 03:10 Lewiscowles1986

Shouldn't flutter build macos build an universal build by default? I am maintainer of LocalSend and I did not do anything to ensure M1 support.

Maybe an ARM based computer is needed though...

Tienisto avatar Jul 11 '23 01:07 Tienisto

It's not the same commands @Tienisto (I think due to the Rust and other commands); but it looks like https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup/building-on-macos has cli options for arm64; so I guess for me; this was all I wanted.

Lewiscowles1986 avatar Jul 11 '23 03:07 Lewiscowles1986

This has led to https://github.com/flutter/flutter/issues/130308 on a new mac I don't want to use appleId for, but it feels like that is a me problem.

Lewiscowles1986 avatar Jul 11 '23 04:07 Lewiscowles1986

Are there any updates for this?

vncloudsco avatar Nov 08 '23 08:11 vncloudsco

We have provided the universal package for the M series chip from version 0.3.0.

LucasXu0 avatar Dec 25 '23 01:12 LucasXu0