getting to the bottom of this
Discussion
The instructions suggest that you have to target wasi when building and provide file name
# Compile and run directly.
$ onyx run hello.onyx
Hello, World!
# This time target 'WASI'.
$ onyx build -r wasi -o hello.wasm hello.onyx
# Run using Wasmer.
$ wasmer run hello.wasm
Hello, World!
Its not an AssemblyScript replacement yet, but maybe it can be one day