GithubHelp home page GithubHelp logo

jai-switch-example's Introduction

Switch homebrew example, written in Jai

This repo serves as an example project for writing Nintendo Switch homebrew in Jai. The LLVM backend is used to target the machine, and a few hacks to Jai's built-in modules are needed to get basic support working somewhat decently since ARM64 is not yet a first-class target.

Included also are bindings for the following libraries:

Setup

Ensure you have devkitPro installed. This should set the DEVKITPRO environment variable to its install location.

I recommend storing Jon's Jai beta releases in a Git repo. You can then make a new branch just for working with the module hacks you'll need to install. From there, in the root of the Jai release folder, do:

git apply --ignore-whitespace /path/to/this/repo/jai-module-hacks.patch

These hacks in this repo are up to date for Jai version 0.1.089.

Building

jai first.jai - target

If you leave off - target, it will build the program for your host machine. The idea is that perhaps you want your project to be able to target Switch primarily but also your host PC during development.

To do

  • Complete bindings for inline functions / macros in libnx
  • Make bindings more idiomatic where applicable

Thanks to...

  • @ctp and @ctpeepee in the Discord server for helping with the module hacks
  • DevkitPro
  • The developers of libnx
  • Jonathan Blow and the rest of the Jai language team

jai-switch-example's People

Contributors

thegag96 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.