Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mitchtreece/SwiftNX
Swift homebrew framework for the Nintendo Switch!
https://github.com/mitchtreece/SwiftNX
homebrew nintendo-switch nx swift
Last synced: 3 months ago
JSON representation
Swift homebrew framework for the Nintendo Switch!
- Host: GitHub
- URL: https://github.com/mitchtreece/SwiftNX
- Owner: mitchtreece
- Created: 2018-05-25T00:42:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-11T06:00:22.000Z (about 5 years ago)
- Last Synced: 2024-07-18T20:42:58.219Z (4 months ago)
- Topics: homebrew, nintendo-switch, nx, swift
- Language: C
- Homepage:
- Size: 351 KB
- Stars: 43
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SwiftNX
Swift homebrew running on the Nintendo Switch!## Currently Working
- Swift entry point: `swift_main() -> Int`
- Specific [libnx](https://github.com/switchbrew/libnx) C function calls (**applet, gfx, console**)## Project Goals
- Importable swiftnx homebrew module
- Wrapper classes over common [libnx](https://github.com/switchbrew/libnx) API's
- NXDevice
- NXApplet
- NXConsole
- NXGfx
- NXInput
- etc..
- [SDL2](https://www.libsdl.org/index.php) wrapper classes
- SDLWindow
- SDLRenderer
- SDLRect
- etc..
- UI framework built on [SDL2](https://www.libsdl.org/index.php)
- NXUIWindow
- NXUIView
- NXUIRect
- NXUILabel
- NXUIButton
- NXUIAlert
- etc..### Example
```swift
@_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](assets/example.jpg)## Contributing
This is a big (but fun!) project. Any help is more than welcome / appreciated 😊🤘🏻.