Giter Club home page Giter Club logo

Comments (3)

thatcosmonaut avatar thatcosmonaut commented on September 16, 2024

x64 on Mac is officially supported by FNA, but ARM is not. You should be able to get it to work either via Rosetta or building the native libraries for ARM yourself.

https://github.com/FNA-XNA/FNA/wiki/0:-FAQ#where-can-i-get-fnalibs-for-cpu-architecture-x

from fna.

lithiumtoast avatar lithiumtoast commented on September 16, 2024

Hey @SyntaxDomain,

Like it was mentioned before, you just need to compile all the native C libraries that FNA depends on yourself. I did this myself in the past because I'm developing on Apple Silicon hardware.

The C projects:

What I find easiest is to use the following flag CMake flag for each C project to build as universal (both x64 and arm64):
-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64. This is how libMoltenVK.dylib and libvulkan.1.dylib are distributed with FNA libs if you check the file:

lstranks@Aeryon-SkyRanger-R70 ~ % file /Users/lstranks/Downloads/fnalibs/osx/libMoltenVK.dylib 
/Users/lstranks/Downloads/fnalibs/osx/libMoltenVK.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
/Users/lstranks/Downloads/fnalibs/osx/libMoltenVK.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
/Users/lstranks/Downloads/fnalibs/osx/libMoltenVK.dylib (for architecture arm64):	Mach-O 64-bit dynamically linked shared library arm64
lstranks@Aeryon-SkyRanger-R70 ~ % file /Users/lstranks/Downloads/fnalibs/osx/libvulkan.1.dylib 
/Users/lstranks/Downloads/fnalibs/osx/libvulkan.1.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64:Mach-O 64-bit dynamically linked shared library arm64]
/Users/lstranks/Downloads/fnalibs/osx/libvulkan.1.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
/Users/lstranks/Downloads/fnalibs/osx/libvulkan.1.dylib (for architecture arm64):	Mach-O 64-bit dynamically linked shared library arm64

The down side of universal native libraries for macOS is that they are approximately twice the size. If you want to reduce the total size of your game for macOS, you could have only the appropriate architecture for each native library.

The up side is that you don't have to have users select and download the appropriate native libraries for macOS; there is only one download for both.

from fna.

flibitijibibo avatar flibitijibibo commented on September 16, 2024

See FNA-XNA/docs#1 for more details, but we won't be providing prebuilt arm64 binaries - the build script should make this easy enough to do for anyone targeting Apple platforms.

from fna.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.