openrndr / orx

A growing library of assorted data structures, algorithms and utilities for OPENRNDR
https://openrndr.org
BSD 2-Clause "Simplified" License
118 stars 36 forks source link

[orx-syphon] Add support for arm64 architecture #328

Closed ArthurVimond closed 3 months ago

ArthurVimond commented 4 months ago

Goal

This PR aims at making orx-syphon compatible for arm64 architecture (for Apple Silicon).

Approach

The JSyphon library has been compiled on a Mac M2, based on this instructions: https://github.com/samyk/Syphon-Java/tree/apple-silicon.

The Syphon-arm64 and libJSyphon-arm64.jnilib have been added to the resources, and the existing x86 files have been renamed to Syphon-x86 and libJSyphon-x86.jnilib for consistency. Finally, the corresponding native libraries are loaded based on the System.getProperty("os.arch"), in the JSyphonNative.kt.

Test

1- On a Mac Apple Silicon, launch the ServerExample.kt in the orx-jvm/orx-syphon/src/test/kotlin/ directory. 2- Launch any Syphon client app, like the Simple Client (https://github.com/Syphon/Simple).