Skip to content

Repository files navigation

=uxn

License Build status

> be me

> be uxn

This project contains:

  • An implementation of the uxn virtual machine.
  • The varvara system.
  • Libraries for embedding uxn into a host program.
  • Tools such as type checker and binding generator.

Current supported platforms:

There are many components in this project. Checkout the detailed documentation for more info.

Building

Windows

Run msvc.bat to generate a Visual Studio solution.

Unix

Run ./bootstrap to make sure all dependencies are up-to-date.

The general syntax for the build script is: ./build <type> <platform>.

type can be one of:

  • Debug: Defines _DEBUG and enable sanitizers (-fsanitize=undefined,address).
  • Release: Defines NDEBUG and enable optimizations (-O3 -flto).

platform can be one of:

  • linux
  • android
  • cosmo

Without arguments, it will default to build with Debug and linux. The output will be placed in bin/$type/$platform.

GNU Parallel is required for parallel compilation.

Linux

This is the argument passed to the linker: -lGL -lX11 -lXcursor -lXi -lasound. Install the respective development packages for your distro.

clang and mold are required for compilation. Take note that there is a performance regression in clang 19 when using computed goto. An earlier version such as 18 is recommended until the bug is fixed.

Android

Make sure that Android SDK & NDK are installed. Typically, this can be downloaded using Android Studio.

The ./build script assumes the SDK & NDK reside at the default location: ~/Android/Sdk. This can be overridden by setting the environment variables: ANDROID_HOME and ANDROID_NDK_ROOT respectively.

Building for Android is similarly done using: ./build <type> android. It will automatically produce the .so binary for all supported ABIs and package them into a signed apk.

When started, the app will open the bundled boot.rom. For more details, see src/android/apk/assets.

Additionally, the app can also opens .rom files. Simply tap any .rom file in a file explorer or browser and choose it as the opener.

Using Java code

You can't. This project is C only.

However, it should not be too hard to add. The build pipeline was created based on: https://www.hanshq.net/command-line-android.html.

Cosmopolitan

The cosmopolitan toolchain has to be in your PATH, in particular cosmocc is needed. Use ./build <Release|Debug> cosmo to build like other platform.

CMake

A CMakeLists.txt file is provided to ease integration into other projects.

However, it is simpler to just pick and choose only the relevant parts. Both buxn-ls and buxn-dbg take this approach. In general, there is only a single header (.h) and a single source (.c) file for each component. Check the detailed documentation for more info.

About

Implementation of uxn and varvara using sokol

Resources

Stars

22 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages