Skip to content
Private alpha
Documentation — Running an application

Documentation

Running an application

The Run button (F5) launches the application you are designing, so you can try it right away, on your computer, on a phone or in the browser.

What happens

  1. Khnoum checks the project: as long as it contains errors, the bottom bar counts them and nothing is launched.
  2. It generates the application's code in the project's code folder (the Generate button does only this step).
  3. It compiles this code; the Console shows the progress.
  4. It launches the application on the chosen target.

The first build takes a few minutes; the following ones, a few seconds, because the build folder is shared between all your projects. The button becomes Stop while the application is running.

Choosing the target

When several targets are checked in the Project tab, the Desktop / Mobile / Web selector in the top bar chooses the one that is launched.

TargetWhere the application opens
Desktopin a window on your computer; the console shows its exit code
Webthe server starts on your computer and the browser opens on the application
Mobileon the connected Android phone or the emulator; otherwise, on a Mac, in the iOS simulator; otherwise, in a phone-sized window

For mobile, Khnoum tells you in the console what is missing (device, tool, Rust target) when it falls back to the preview.

What your computer needs

Khnoum never installs anything on its own: it tells you what is missing and how to get it.

To…You need
run an application (all targets)Rust, free: rustup.rs
an Android phoneAndroid Studio (SDK, NDK, Java) and the phone's Rust target: rustup target add aarch64-linux-android
the iOS simulatora Mac with Xcode and the aarch64-apple-ios-sim target (x86_64-apple-ios on an Intel Mac)

To produce the installers for each system, see Export.

The produced code

The project's code folder is an ordinary Cargo workspace: you can open it, read it, and build it yourself with cargo build. The "Generated code" button of the Project tab opens it. It is regenerated at each run: change the project in Khnoum, not this folder.