Skip to content

Swift homebrew framework for the Nintendo Switch!

Notifications You must be signed in to change notification settings

mitchtreece/SwiftNX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftNX

Swift homebrew running on the Nintendo Switch!

Currently Working

  • Swift entry point: swift_main() -> Int
  • Specific libnx C function calls (applet, gfx, console)

Project Goals

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

Example

@_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

}

Example

Contributing

This is a big (but fun!) project. Any help is more than welcome / appreciated 😊🤘🏻.

About

Swift homebrew framework for the Nintendo Switch!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published