Published May 12, 2025 | Version v1
Conference paper Open

Porting the Steel Bank Common Lisp Compiler and Runtime to the Nintendo Switch NX Platform

  • 1. Shirakumo

Description

We present our efforts to adapt the SBCL runtime and compiler to deploy applications onto the NX platform. The Nintendo Switch (NX) is a 64-bit ARM-based platform for video games with a proprietary micro-kernel operating system. Notably this system does not give programs the ability to mark pages as executable at run time or expose access to thread signal handlers, both of which present a significant hurdle to SBCL's intended bootstrap process and runtime operation. To work around these hurdles we modify SBCL's build system to bootstrap on a Linux ARM system, which is similar enough to the NX to be able to compile user code. We then use a technique called ``shrinkwrapping'' to combine the Lisp code and data with the C runtime compiled for the NX to produce a final, fully static ELF executable that can be run on the NX, without the need for runtime code generation. We further use a restricted version of ``safepoints'' to synchronise threads during garbage collection.

Files

paper.pdf

Files (5.2 MB)

Name Size Download all
md5:37057c6ebaa92a094dee493db6d9ebb6
5.2 MB Preview Download

Additional details

Identifiers

ISSN
2677-3465