Skip to content

Commit

Permalink
Add a readme (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyscott committed Apr 26, 2019
1 parent ba3ded5 commit 5c8264c
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# rules_graal

Turn a JVM binary into a native binary.

## Usage

You'll need to first load the rules in your WORKSPACE file.

``` python
git_repository(
name = "rules_graal",
commit = "<<pick-a-recent-commit-sha>>",
remote = "git://github.com/andyscott/rules_graal",
)

load("//graal:graal_bindist.bzl", "graal_bindist_repository")

graal_bindist_repository(
name = "graal",
version = "1.0.0-rc16",
)
```

Then, in a build file:

```python
load("@rules_graal//graal:graal.bzl", "graal_binary")

java_library(
name = "main",
srcs = glob(["Main.java"]),
)

graal_binary(
name = "main-native",
deps = [":main"],
main_class = "Main",
)
```

0 comments on commit 5c8264c

Please sign in to comment.