This document contains miscellaneous notes on Procursus, which don't particularly go along with the current documentation and wiki of the project.
This is a weird way, but the main purpose is so that this isn't lost knowledge; in the case that only one person has figured out how to do something with Procursus and that person has no longer taken on the task of carrying the project, this is here to help you.
Most sections are compiled from things I've ran across, some based on my experience on doing something with Procursus, while others being something that people have mentioned.
Rust projects can be compiled on Linux, but they require specific Rust targets to be installed on your local machine before you can start compiling.
Make sure that your Rust toolchain from your specific Linux flavor has already been set up. Then, proceed to install the iOS Rust target
rustup target add aarch64-apple-ios
To link Clang from your cctools
toolchain, you'll need a
configuration file in your Cargo directory. This should be generated
in your home directory, ~/.cargo/
. Inside your configuration file,
~/.cargo/config
, do the following
[target.aarch64-apple-ios]
linker = "/path/to/cc/from/cctools"
Lastly, some Rust libraries (which Rust projects generally depend on)
will check for an SDK present on your system using xcrun
. xcrun
isn't available on Linux (or any other platform other than macOS).
To circumvent this, the best option is to create your own xcrun
bin, which will return the PATH of your iOS SDK used by your
cctools-port
toolchain
#!/bin/sh
# This part can also be echoing a specific var, such as TARGET_SYSROOT
echo "/path/to/sdk"
Once you've set that up, install the bin within your cctools-port
PATH, or within /usr/local/bin
, and Rust should fully compile Rust
projects on Procursus.
install -Dm755 xcrun -t /usr/local/bin
Procursus is not only capable of running on iOS; it can also run on macOS, providing an alternative to tools provided by Homebrew. Due to the fact that Procursus is a self-hosted build system, an already existing instance of Procursus is needed.
To circumvent this, you can install the Procursus dependencies from Homebrew, which are documented in the documentation and wiki page of the project.
Perhaps in an alternative universe, a specific tarball of the Procursus suite is accessible for users. Should that case ever come to light (though, please, don't hold your breath), follow the directions below
-
Get a copy of this accessible tarball and download it to your local machine. Then, extract it.
Pray that the compression algorithm used to make the tarball was
zstd
zstd -d /path/to/tarball.zst sudo tar --preserve-permissions -xkf /path/to/tarball -C
In case you have
tar
from Homebrew on your local machinesudo gtar --preserve-permissions -xkf /path/to/tarball.tar.zst -C
-
Move the extracted files, and add
/opt/procursus/bin
to the start of your PATH on your shell configuration
At some point in time, X11 was showcased to be functional on iOS, and many users had wondered how the Procursus Team had achieved this. The following instructions detail just that.
-
Bootstrap your device with Procursus
You can do this in two ways: use a coolstar-based jailbreak, or compile a Procursus suite for your specific target, then install it accordingly
-
Install the X11 suite provided by Procursus
sudo apt install \ xserver-xorg-core \ tigervnc-standalone-server \ xterm \ xfe \ fluxbox \ x11-apps
-
Configure your VNC password with
vncpasswd
. Then, attempt to start your X server and XvncXvnc -PasswordFile ~/.vnc/passwd -extension MIT-SHM :1 &
-
Specify the
DISPLAY
environment variableexport DISPLAY=:0 >> ~/.zshrc
-
Start Flubox. Then, attempt to connect to port 5901 running on localhost (
127.0.0.1:5901
) on the same device with a VNC client
These notes detail further functionality of the X11 suite provided by Procursus
- To start a file manager:
xfe &
- To start a terminal:
xterm &
- To start
xeyes
:xeyes &
- To kill/exit your X11 setup:
killall Xvnc