-
-
Notifications
You must be signed in to change notification settings - Fork 23
Home
The Official Documentation for the Onyx Programming Language.
You try Onyx online without installing here. There are provided examples to get you started.
Onyx does not currently ship a pre-built distributable of the compiler and all runtime dependencies. The best (and only) way to install Onyx currently is by building from source.
Linux is the most supported operating system for Onyx. To build from source on Linux, you will need:
- GCC version 9+
- POSIX compliant shell (bash/zsh/dash/...)
Before building, it is worth glancing over the build settings in settings.sh
. Double check that the INSTALL_DIR
is reasonable for your system (usually /usr
or /usr/local
is reasonable).
To commence the build, simply run the build.sh
script from your shell.
$ ./build.sh
Installing core libs
Compiling libovmwasm.so
Copying libovmwasm to /usr/share/onyx/lib (first install)
Compiling onyx...
Installing onyx executable
Compiling onyx-run...
Installing onyx-run executable
Installing onyx_runtime.so
Onyx has two supported runtimes: libovmwasm
and libwasmer
. By default, Onyx uses libovmwasm
, which is a completely custom runtime written for Onyx. It is relatively slow, but does support debugging in all Debug Adapter Protocol supported editors, such as Visual Studio Code. Alternatively, you can use libwasmer
, which uses Wasmer to run Onyx. It is very fast, but does not support any kind of debugging.
Once everything is installed, you should be able to run a simple program:
$ onyx run tests/hello_world
Hello, World!
Windows builds will be made available soon, but for now, you will need to build Onyx from source using the build.bat
file at the root of the project. With a working Visual C and C++ installation, this should be rather easy.
Onyx currently does not have official support for MacOS at any capacity.