Swift homebrew running on the Nintendo Switch!
- Swift entry point:
swift_main() -> Int
- Specific libnx C function calls (applet, gfx, console)
- Importable swiftnx homebrew module
- Wrapper classes over common libnx API's
- NXDevice
- NXApplet
- NXConsole
- NXGfx
- NXInput
- etc..
- SDL2 wrapper classes
- SDLWindow
- SDLRenderer
- SDLRect
- etc..
- UI framework built on SDL2
- NXUIWindow
- NXUIView
- NXUIRect
- NXUILabel
- NXUIButton
- NXUIAlert
- etc..
@_silgen_name("swift_main")
func swift_main() -> Int {
gfxInitDefault()
var console = PrintConsole()
consoleInit(&console)
consoleSelect(&console)
printf("Hello, swift!")
while(appletMainLoop()) {
gfxFlushBuffers()
gfxSwapBuffers()
gfxWaitForVsync()
}
gfxExit()
return 0
}
This is a big (but fun!) project. Any help is more than welcome / appreciated 😊🤘🏻.