Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add doc for binary targets #33

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Use [GraalVM](https://graalvm.org) from [Bazel](https://bazel.build), with suppo
- [Installing components with `gu`](./docs/components.md)
- [Using GraalVM as a Bazel Java toolchain](./docs/toolchain.md)
- [Support for Bazel 6, Bazel 7, and Bzlmod](./docs/modern-bazel.md)
- [Run GraalVM binaries directly](./docs/binary-targets.md)
- Support for macOS, Linux, Windows (including `native-image`!)
- Support for latest modern GraalVM releases (Community Edition and Oracle GraalVM)

Expand Down
28 changes: 28 additions & 0 deletions docs/binary-targets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Targets for binaries in GraalVM

For convenience, the GraalVM repository rule will create targets and aliases for major binaries which ship with GraalVM. You can use these out of the box.

**Binaries which are typically aliased, based on installed components:**

| Binary | Target | Alias | Example |
| -------------- | ----------------------------- | ------------------------- | -------------------------------------- |
| `java` | `@graalvm//:bin/java` | `@graalvm` | `bazel run -- @graalvm` |
| `javac` | `@graalvm//:bin/javac` | `@graalvm//:javac` | `bazel run -- @graalvm//:javac` |
| `jar` | `@graalvm//:bin/jar` | `@graalvm//:jar` | `bazel run -- @graalvm//:jar` |
| `native-image` | `@graalvm//:bin/native-image` | `@graalvm//:native-image` | `bazel run -- @graalvm//:native-image` |
| `polyglot` | `@graalvm//:bin/polyglot` | `@graalvm//:polyglot` | `bazel run -- @graalvm//:polyglot` |
| `js` | `@graalvm//:bin/js` | `@graalvm//:js` | `bazel run -- @graalvm//:js` |
| `wasm` | `@graalvm//:bin/wasm` | `@graalvm//:wasm` | `bazel run -- @graalvm//:wasm` |
| `python` | `@graalvm//:bin/python` | `@graalvm//:python` | `bazel run -- @graalvm//:python` |
| `ruby` | `@graalvm//:bin/ruby` | `@graalvm//:ruby` | `bazel run -- @graalvm//:ruby` |
| `lli` | `@graalvm//:bin/lli` | `@graalvm//:lli` | `bazel run -- @graalvm//:lli` |

**Example:**

```
$ > b run -- @graalvm --version
# ...
java 20.0.2 2023-07-18
Java(TM) SE Runtime Environment Oracle GraalVM 20.0.2+9.1 (build 20.0.2+9-jvmci-23.0-b14)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 20.0.2+9.1 (build 20.0.2+9-jvmci-23.0-b14, mixed mode, sharing)
```
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ These rules let you use [GraalVM](https://graalvm.org) from [Bazel](https://baze
- [Installing components with `gu`](./components.md)
- [Using GraalVM as a Bazel Java toolchain](./toolchain.md)
- [Support for Bazel 6, Bazel 7, and Bzlmod](./modern-bazel.md)
- [Run GraalVM binaries directly](./binary-targets.md)
- Support for macOS, Linux, Windows (including `native-image`!)
- Support for latest modern GraalVM releases (Community Edition and Oracle GraalVM)

Expand Down
Loading