Xen / examples v0.1.0-demo.2
First program
This topic is not available in the selected language or version. Showing the start of this section.
First program
Run from the repository or distribution root. Put xen on PATH, or substitute ./bin/xen.
xen check examples/hello.xenxen run examples/hello.xenExpected output
Section titled “Expected output”Hello, Xen!Complete source
Section titled “Complete source”// SPDX-License-Identifier: MIT OR Apache-2.0fn main() { println("Hello, Xen!");}Build an executable
Section titled “Build an executable”xen build examples/hello.xen -o appRun the generated executable on a compatible Linux machine.