rtulip / haystack

Haystack is a compiled, statically typed, stack-based language with opt-in variable assignment.
MIT License
25 stars 2 forks source link

Generated assembly doesn't work on MacOS #118

Closed 0x1AE7F closed 1 year ago

0x1AE7F commented 1 year ago

Output:

---- ast::expr::tests::cast_u8 stdout ----
[CMD]: cargo r -q --release -- src/tests/type_check/cast_u8.hay
[CMD]: ./cast_u8
thread 'ast::expr::tests::cast_u8' panicked at 'called `Result::unwrap()` on an `Err` value: HayError { message: "Command Failed", kind: Error, loc: Loc { file: "src/tests/type_check/cast_u8", line: 1, span: 1..1 }, hints: [("Note", "Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")] }', src/compiler/test_tools.rs:49:84
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
rtulip commented 1 year ago

This will either require adding another implementation of CodeGen for different platforms. Or Haystack can transpile to c or c++. This would be a short term solution. It also raises questions about how to do things like reading from files, and things that I currently use syscalls for.

Ideally I'd like to switch to LLVM, but that's a much bigger project.

rtulip commented 1 year ago

Closing this as a duplicate of #120 . We can look at any issues that come up once that's been fixed.