Eta rules for Bazel
Switch branches/tags
Nothing to show
Clone or download

README.org

rules_eta

Eta rules for Bazel.

From the homepage:

What is Eta?

Eta is a pure, lazy, strongly typed functional programming language on the JVM. It brings two big ecosystems, the JVM and Haskell, together. This allows you to harness the best of both ecosystems to build your applications quickly and effectively. Eta’s concurrency support helps you to build highly scalable systems.

Status

Highly experimental. This is currently a prototype and APIs will most definitely change.

Try it out

You’ll first need to a dev build of the eta compiler that contains this change from https://github.com/typelead/eta.

eta $ git submodule sync
eta $ git submodule update --init --recursive
eta $ ./install.sh

This should end up in $HOME/.local/bin. Modify eta_repositories.bin_path in the WORKSPACE file accordingly.

To build the example, run:

$ bazel build //examples/basic:main-eta --action_env=HOME

To run the example, run:

$ bazel run //examples/basic:main --action_env=HOME
INFO: Build options have changed, discarding analysis cache.
INFO: Analysed target //examples/basic:main (15 packages loaded).
INFO: Found 1 target...
Target //examples/basic:main up-to-date:
  bazel-bin/examples/basic/main.jar
  bazel-bin/examples/basic/main
INFO: Elapsed time: 3.868s, Critical Path: 0.00s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
The 101st prime is 547

Features [6/15]

  • [X] eta_library rule.
  • [X] Use eta to compile directly instead of etlas.
  • [X] Compatible with --experimental_strict_action_env.
  • [X] interoperability with other JVM rules (JavaInfo).
  • [X] bazel run //examples/basic:main.
  • [X] Generate .hi files in the package/header directory.
  • [ ] API design. Sync with rules_haskell? eta_library as a drop in replacement to haskell_library and vice versa?
  • [ ] eta_library.deps / figure out provider story.
  • [ ] Drop the dependency on --action_env=HOME
  • [ ] eta_binary / bazel run //eta:binary.
  • [ ] eta_test?
  • [ ] java_library -> eta_library -> java_library sandwich
  • [ ] http_file rule to fetch etlas/eta for Windows, macOS and Linux.
  • [ ] turn eta_repositories into a proper repository_rule.
  • [ ] interoperability with rules_haskell.