-- SPDX-License-Identifier: MIT -- Copyright (C) 2026 unkernel contributors module Test.Main where import Prelude import Effect (Effect) import Effect.Aff (launchAff_, throwError, error) import Effect.Class.Console (log) import Unkernel as VM main :: Effect Unit main = 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))