Something went wrong. Try again.
An experimental port of NetBSD, FreeBSD, OpenBSD, and XNU to unkernel unkernel.dev
Something went wrong. Try again.
566 B · 17 lines
at main
123456789101112131415161718-- SPDX-License-Identifier: MIT-- Copyright (C) 2026 unkernel contributorsmodule Test.Main where
import Preludeimport Effect (Effect)import Effect.Aff (launchAff_, throwError, error)import Effect.Class.Console (log)import Unkernel as VM
main :: Effect Unitmain = launchAff_ $ VM.options # VM.withMemory 256 # VM.withKernel \vm -> do result <- vm # VM.exec "uname" [ "-m" ] case result.termination of VM.Exited 0 | result.stdout == "aarch64\n" -> log result.stdout _ -> throwError (error ("unexpected uname result: " <> result.stderr))