Moxin is an AI LLM client written in Rust to demonstrate the functionality of the Robius, a framework for multi-platform application development in Rust.
⚠️ Moxin is just getting started and is not yet fully functional.
The following table shows which host systems can currently be used to build Moxin for which target platforms.
| Host OS | Target Platform | Builds? | Runs? | Packaging Support |
| ——- | ————— | ——- | —– | ——————————————– |
| macOS | macOS | ✅ | ✅ | .app, .dmg |
| Linux | Linux | ✅ | ✅ | .deb (Debian dpkg), AppImage, pacman |
[!IMPORTANT]
During the setup procedure, make sure to select Add LLVM to the system PATH for all users or for the current user.
Restart your PC, or log out and log back in, which allows the LLVM path to be properly
Alternatively you can add the LLVM path C:\Program Files\LLVM\bin to your system PATH.
Download the WasmEdge-0.14.0-windows.zip file from the WasmEdge v0.14.0 release page,
and then extract it into a directory of your choice.
We recommend using your home directory (e.g., C:\Users\<USERNAME>\), represented by $home in powershell and %homedrive%%homepath% in batch-cmd.
Afterwards, you should see a directory called WasmEdge-0.14.0-Windows there.
Set the WASMEDGE_DIR and WASMEDGE_PLUGIN_PATH environment variables to point to the WasmEdge-0.14.0-Windows directory that you extracted above, and then build Moxin.
In powershell, you can do this like so:
$env:WASMEDGE_DIR="$home\WasmEdge-0.14.0-Windows\"
$env:WASMEDGE_PLUGIN_PATH="$home\WasmEdge-0.14.0-Windows\"
cargo run --release
In Windows cmd, you can do this like so:
set WASMEDGE_DIR=%homedrive%%homepath%\WasmEdge-0.14.0-Windows
set WASMEDGE_PLUGIN_PATH=%homedrive%%homepath%\WasmEdge-0.14.0-Windows
cargo run --release
In a Unix-like shell on Windows (e.g., GitBash, cygwin, msys2, WSL/WSL2):
WASMEDGE_DIR=$HOME/WasmEdge-0.14.0-Windows \
WASMEDGE_PLUGIN_PATH=$HOME/WasmEdge-0.14.0-Windows \
cargo run --release
Packaging Moxin for Distribution
Install cargo-packager:
rustup update stable ## Rust version 1.79 or higher is required
cargo +stable install --force --locked cargo-packager
For posterity, these instructions have been tested on cargo-packager version 0.10.1, which requires Rust v1.79.
Packaging for Linux
On a Debian-based Linux distribution (e.g., Ubuntu), you can generate a .deb Debian package, an AppImage, and a pacman installation package.
[!IMPORTANT]
You can only generate a .deb Debian package on a Debian-based Linux distribution, as dpkg is needed.
[!NOTE]
The pacman package has not yet been tested.
Ensure you are in the root moxin directory, and then you can use cargo packager to generate all three package types at once:
cargo packager --release --verbose ## --verbose is optional
To install the Moxin app from the .debpackage on a Debian-based Linux distribution (e.g., Ubuntu), run:
cd dist/
sudo apt install ./moxin_0.1.0_amd64.deb ## The "./" part is required
We recommend using apt install to install the .deb file instead of dpkg -i, because apt will auto-install all of Moxin’s required dependencies, whereas dpkg will require you to install them manually.
To run the AppImage bundle, simply set the file as executable and then run it:
cd dist/
chmod +x moxin_0.1.0_x86_64.AppImage
./moxin_0.1.0_x86_64.AppImage
Packaging for Windows
This can only be run on an actual Windows machine, due to platform restrictions.
After the command completes, you should see a Windows installer called moxin_0.1.0_x64-setup in the dist/ directory.
Double-click that file to install Moxin on your machine, and then run it as you would a regular application.
Packaging for macOS
This can only be run on an actual macOS machine, due to platform restrictions.
Ensure you are in the root moxin directory, and then you can use cargo packager to generate an .app bundle and a .dmg disk image:
cargo packager --release --verbose ## --verbose is optional
[!IMPORTANT]
You will see a .dmg window pop up — please leave it alone, it will auto-close once the packaging procedure has completed.
then open Finder and unmount any Moxin-related disk images, then try the above cargo packager command again.
[!TIP]
If you receive an error like so:
Creating disk image...
hdiutil: create failed - Operation not permitted
could not access /Volumes/Moxin/Moxin.app - Operation not permitted
then you need to grant “App Management” permissions to the app in which you ran the cargo packager command, e.g., Terminal, Visual Studio Code, etc.
To do this, open System Preferences → Privacy & Security → App Management,
and then click the toggle switch next to the relevant app to enable that permission.
Then, try the above cargo packager command again.
After the command completes, you should see both the Moxin.app and the .dmg in the dist/ directory.
You can immediately double-click the Moxin.app bundle to run it, or you can double-click the .dmg file to
Note that the .dmg is what should be distributed for installation on other machines, not the .app.
Moxin: a Rust AI LLM client built atop Robius
Moxin is an AI LLM client written in Rust to demonstrate the functionality of the Robius, a framework for multi-platform application development in Rust.
The following table shows which host systems can currently be used to build Moxin for which target platforms. | Host OS | Target Platform | Builds? | Runs? | Packaging Support | | ——- | ————— | ——- | —– | ——————————————– | | macOS | macOS | ✅ | ✅ |
.app
,.dmg
| | Linux | Linux | ✅ | ✅ |.deb
(Debian dpkg), AppImage, pacman |Building and Running
First, install Rust.
Obtain the source code from this repository:
macOS
Install the required WasmEdge WASM runtime:
Then use
cargo
to build and run Moxin:Linux
Install the required WasmEdge WASM runtime:
To build Moxin on Linux, you must install the following dependencies:
openssl
,clang
/libclang
,binfmt
,Xcursor
/X11
,asound
/pulse
.On a Debian-like Linux distro (e.g., Ubuntu), run the following:
Then use
cargo
to build and run Moxin:Windows (Windows 10 or higher)
Restart your PC, or log out and log back in, which allows the LLVM path to be properly
C:\Program Files\LLVM\bin
to your system PATH.Download the WasmEdge-0.14.0-windows.zip file from the WasmEdge v0.14.0 release page, and then extract it into a directory of your choice. We recommend using your home directory (e.g.,
C:\Users\<USERNAME>\
), represented by$home
in powershell and%homedrive%%homepath%
in batch-cmd.Afterwards, you should see a directory called
WasmEdge-0.14.0-Windows
there.To do this quickly in powershell:
Download the WasmEdge WASI-NN plugin here: WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64.zip (15.5MB) and extract it to the same directory as above, e.g.,
C:\Users\<USERNAME>\WasmEdge-0.14.0-Windows
.Set the
WASMEDGE_DIR
andWASMEDGE_PLUGIN_PATH
environment variables to point to theWasmEdge-0.14.0-Windows
directory that you extracted above, and then build Moxin. In powershell, you can do this like so:In Windows
cmd
, you can do this like so:In a Unix-like shell on Windows (e.g., GitBash, cygwin, msys2, WSL/WSL2):
Packaging Moxin for Distribution
Install
cargo-packager
:For posterity, these instructions have been tested on
cargo-packager
version 0.10.1, which requires Rust v1.79.Packaging for Linux
On a Debian-based Linux distribution (e.g., Ubuntu), you can generate a
.deb
Debian package, an AppImage, and a pacman installation package.Ensure you are in the root
moxin
directory, and then you can usecargo packager
to generate all three package types at once:To install the Moxin app from the
.deb
package on a Debian-based Linux distribution (e.g., Ubuntu), run:We recommend using
apt install
to install the.deb
file instead ofdpkg -i
, becauseapt
will auto-install all of Moxin’s required dependencies, whereasdpkg
will require you to install them manually.To run the AppImage bundle, simply set the file as executable and then run it:
Packaging for Windows
This can only be run on an actual Windows machine, due to platform restrictions.
First, follow the above instructions for building on Windows.
Ensure you are in the root
moxin
directory, and then you can usecargo packager
to generate asetup.exe
file using NSIS:After the command completes, you should see a Windows installer called
moxin_0.1.0_x64-setup
in thedist/
directory. Double-click that file to install Moxin on your machine, and then run it as you would a regular application.Packaging for macOS
This can only be run on an actual macOS machine, due to platform restrictions.
Ensure you are in the root
moxin
directory, and then you can usecargo packager
to generate an.app
bundle and a.dmg
disk image:After the command completes, you should see both the
Moxin.app
and the.dmg
in thedist/
directory. You can immediately double-click theMoxin.app
bundle to run it, or you can double-click the.dmg
file toIf you’d like to modify the .dmg background, here is the Google Drawings file used to generate the MacOS .dmg background image.