tweag / asterius

DEPRECATED in favor of ghc wasm backend, see https://www.tweag.io/blog/2022-11-22-wasm-backend-merged-in-ghc
1.98k stars 55 forks source link

Bazel files for building asterius binaries #888

Closed ylecornec closed 2 years ago

ylecornec commented 2 years ago

In order to use asterius with rules_haskell, I set up (some time ago) a bazel build of asterius that produces a self contained archive (Available here). This archive contains asterius and needed dependencies (the wasi-sdk fork, dynamic libraries, etc.), so that it can be easily used by rules_haskell both on nixOS and linux bindists.

Now that the new build of asterius was merged into master, the build of this bundle is not up to date. However, I started looking into it and it seems not too far from being usable. Because of all the progress on the nix part, building the bundle is now way simpler and could run in the CI (provided that the big dependencies are in the cache already, as with the regular nix-build).

It is unclear to me how the nix/cabal build of asterius will evolve, but it may be worth merging the Bazel files that work at the moment to help keep things in sync.

The Bazel files

This PR adds files for building the asterius binaries with bazel in the CI (but not yet the boot process and the generation of the bundle).

Bazel's external dependencies

The bazel/bazel.md file contains the list of external dependencies that should be kept in sync between the bazel build and the cabal one: