diff --git a/ports/uxn/port.script b/ports/uxn/port.script
new file mode 100644
index 0000000..2d948ff
--- /dev/null
+++ b/ports/uxn/port.script
@@ -0,0 +1,19 @@
+#import "util/get_source.script" get_source;
+
+str targetName #option;
+str toolchainPrefix #option;
+int processorCount #option;
+
+void Start() {
+	PathDeleteRecursively("bin/uxn");
+	PathDeleteRecursively("bin/noodle");
+	assert SystemShellExecute("git clone https://git.sr.ht/~rabbits/uxn bin/uxn");
+	assert SystemShellExecute("git clone https://git.sr.ht/~rabbits/noodle bin/noodle");
+	assert SystemShellExecuteWithWorkingDirectory("bin/uxn", "git checkout d2cf7213d0287f9777fac583f6889ee18b188f8d");
+	assert SystemShellExecuteWithWorkingDirectory("bin/noodle", "git checkout 17b6b2d48c6fa07adbf25f8c79b0e1b8675be8ad");
+	assert SystemShellExecute("cc -DNDEBUG -Os -g0 -s bin/uxn/src/uxnasm.c -o bin/uxnasm"); // Build the assembler.
+	assert SystemShellExecuteWithWorkingDirectory("bin/noodle", "../uxnasm src/main.tal ../noodle.rom"); // Build the ROM.
+	assert FileWriteAll("bin/uxn/src/devices/ppu.h", "/* removed */");
+	assert SystemShellExecute("%toolchainPrefix%-gcc -DNDEBUG -Os -g0 -s ports/uxn/emulator.c "
+			+ "-ffreestanding -nostdlib -lgcc -z max-page-size=0x1000 -o bin/uxnemu"); // Build the emulator.
+}
diff --git a/ports/uxn/port.sh b/ports/uxn/port.sh
deleted file mode 100755
index 7e8e2ea..0000000
--- a/ports/uxn/port.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-set -e
-
-# Get the source.
-rm -rf bin/uxn bin/noodle
-git clone https://git.sr.ht/~rabbits/uxn bin/uxn
-cd bin/uxn
-git checkout d2cf7213d0287f9777fac583f6889ee18b188f8d
-cd ../..
-git clone https://git.sr.ht/~rabbits/noodle bin/noodle
-cd bin/noodle
-git checkout 17b6b2d48c6fa07adbf25f8c79b0e1b8675be8ad
-cd ../..
-
-# Build the assembler.
-cc -DNDEBUG -Os -g0 -s bin/uxn/src/uxnasm.c -o bin/uxnasm
-
-# Build the ROMs.
-cd bin/noodle
-../../bin/uxnasm src/main.tal ../../bin/noodle.rom
-cd ../..
-
-# Build the emulator.
-echo > bin/uxn/src/devices/ppu.h
-x86_64-essence-gcc -DNDEBUG -Os -g0 -s ports/uxn/emulator.c -ffreestanding -nostdlib -lgcc -z max-page-size=0x1000 -o bin/uxnemu