ajalt / mordant

Multiplatform text styling for Kotlin command-line applications
https://ajalt.github.io/mordant/
Apache License 2.0
922 stars 33 forks source link

MacOs arm64 #180

Open vaclavbenes opened 1 week ago

vaclavbenes commented 1 week ago

Is there any workaround for running this sample code on macOS arm64? In my case, inputs are ignored.

fun main() {
    val terminal = Terminal()
    val selection = terminal.interactiveSelectList(
        listOf("Small", "Medium", "Large", "X-Large"),
        title = "Select a Pizza Size",
    )
    if (selection == null) {
        terminal.danger("Aborted pizza order")
    } else {
        terminal.success("You ordered a $selection pizza")
    }
}

same stuff working on Linux. Thx

ajalt commented 1 week ago

JVM or native?

vaclavbenes commented 1 week ago

Jvm . I didn't try native.

ajalt commented 1 week ago

I'm guessing it's the same issue as #86, where JNA just doesn't support macos arm64 well. Maybe a future JNA release will improve that, but really I think the solution is to implement an FFM version of all the syscall code. FFM has its own drawbacks, but at least it should work.

I'll update the docs to mention support.