Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds proper support for cross-compiling Inko programs from one target to another. The Rust runtime is compiled ahead of time as part of the release process. These runtimes are managed using the `inko runtime` command. For musl we also include libunwind.a as this is needed to resolve linker symbol errors. The library is taken from the rustup musl toolchain to ensure it's the same version as Rust expects. This also saves us having to compile it in the first place. By default the compiler tries to detect what compiler/linker driver to use based on the target you're compiling for. For example, when targeting musl, the linker tries to use musl-gcc or musl-clang if it's installed. A custom linker can be specified using the --linker option. We also support linking using Zig, which makes it _much_ easier to target macOS and potentially other targets, provided you have Zig installed of course. This commit also contains some dependency version updates and the necessary changes, in an effort to reduce the dependency tree size a bit after the addition of the "ureq" crate. Finally, this commit replaces the use of blake2 with blake3. The blake3 crate has a simple API and is supposed to perform much better than blake2. Also, the blake2 crate relies on a pile of generics and dependencies such that rust-analyzer isn't able to provide meaningful help (i.e showing types on hover doesn't work), while this works fine with blake3. This fixes #524. Changelog: added
- Loading branch information