basic-cli icon indicating copy to clipboard operation
basic-cli copied to clipboard

Exit code is always random memory garbage

Open rtfeldman opened this issue 2 years ago • 0 comments

This is because in host.c we use the return value of rust_main() as the exit code, but rust_main doesn't return anything right now.

To fix this:

  • Change rust_main to return i32
  • If roc_main's task returns Ok {} then return 0
  • If roc_main's task returns an Err then return the 32-bit integer inside it

rtfeldman avatar Nov 01 '23 18:11 rtfeldman