Skip to content

Commit 0bbfc1b

Browse files
committed
Update documentation for JVM Standalone instead of GraalVM distribution
1 parent 97cf7b1 commit 0bbfc1b

21 files changed

+218
-287
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ Changes:
16051605

16061606
* The supported version of LLVM for Oracle Linux has been updated from 3.8 to 4.0.
16071607
* `mysql2` is now patched to avoid a bug in passing `NULL` to `rb_scan_args`, and now passes the majority of its test suite.
1608-
* The post-install script now automatically detects if recompiling the OpenSSL C extension is needed. The post-install script should always be run in TravisCI as well, see `doc/user/standalone-distribution.md`.
1608+
* The post-install script now automatically detects if recompiling the OpenSSL C extension is needed. The post-install script should always be run in TravisCI as well.
16091609
* Detect when the system libssl is incompatible more accurately and add instructions on how to recompile the extension.
16101610

16111611
# 1.0 RC 8, 19 October 2018

README.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,45 @@ of the [Ruby programming language](https://www.ruby-lang.org/en/).
77

88
TruffleRuby comes in two distributions:
99

10-
* Standalone: This only contains TruffleRuby in the [Native configuration](#truffleruby-runtime-configurations), making it a smaller download.
11-
* GraalVM: This includes support for other languages such as JavaScript, Python and R, and supports both the [Native and JVM configurations](#truffleruby-runtime-configurations).
12-
We recommend that you use a [Ruby manager](doc/user/ruby-managers.md#configuring-ruby-managers-for-the-full-graalvm-distribution) to use TruffleRuby inside GraalVM.
10+
* Native Standalone: This only contains TruffleRuby in the [Native configuration](#truffleruby-runtime-configurations).
11+
* JVM Standalone: This only contains TruffleRuby in the [JVM configuration](#truffleruby-runtime-configurations).
12+
This includes support for other languages such as Java, JavaScript, Python and WebAssembly.
1313

1414
You can install either of those:
1515

16-
* Via your [Ruby manager/installer](doc/user/ruby-managers.md) (RVM, rbenv, chruby, asdf, ruby-build, ruby-install).
16+
* Via your [Ruby manager/installer](doc/user/ruby-managers.md) (RVM, rbenv, chruby, asdf, ruby-build, ruby-install).
1717
We recommend trying TruffleRuby dev builds which contain the latest fixes and improvements (replace `VERSION` by `dev`).
1818

19-
Standalone:
19+
Native Standalone:
2020
```bash
21-
RVM: $ rvm install truffleruby
21+
RVM: $ rvm install truffleruby # or truffleruby-head
2222
rbenv: $ rbenv install truffleruby-VERSION
2323
asdf: $ asdf install ruby truffleruby-VERSION
2424
chruby: $ ruby-install truffleruby
2525
$ ruby-build truffleruby-VERSION ~/.rubies/truffleruby-VERSION
2626
```
27-
GraalVM:
27+
JVM Standalone:
2828
```bash
2929
rbenv: $ rbenv install truffleruby+graalvm-VERSION
3030
asdf: $ asdf install ruby truffleruby+graalvm-VERSION
3131
chruby: $ ruby-install truffleruby-graalvm
3232
$ ruby-build truffleruby+graalvm-VERSION ~/.rubies/truffleruby+graalvm-VERSION
3333
```
3434

35-
* In CI with GitHub Actions, see [Testing TruffleRuby in CI](doc/user/standalone-distribution.md) for more details and other CIs.
35+
* In CI with GitHub Actions, see [Testing TruffleRuby in CI](doc/user/testing-truffleruby-in-ci.md) for more details and other CIs.
3636

3737
```yaml
3838
- uses: ruby/setup-ruby@v1
3939
with:
40-
ruby-version: truffleruby # or truffleruby-head, or truffleruby+graalvm or truffleruby+graalvm-head
40+
ruby-version: truffleruby # or truffleruby-head or truffleruby+graalvm or truffleruby+graalvm-head
4141
```
4242
4343
* Via Docker.
44-
For Standalone see [official release images](https://github.com/graalvm/container/blob/master/truffleruby-community/README.md)
44+
For Native Standalone see [official release images](https://github.com/graalvm/container/blob/master/truffleruby-community/README.md)
4545
and [nightly images](https://github.com/flavorjones/truffleruby/pkgs/container/truffleruby).
46-
For GraalVM see [official release images](https://github.com/graalvm/container/blob/master/graalvm-community/README.md).
46+
For JVM Standalone there are no Docker images yet, but you can easily [download it](doc/user/installing-truffleruby.md) and take inspiration from the [Native Standalone Dockerfiles](https://github.com/flavorjones/truffleruby/blob/master/tool/dockerfiles/stable.dockerfile).
4747
48-
* Manually, by following the documentation: [Standalone](doc/user/standalone-distribution.md) and [GraalVM](doc/user/installing-graalvm.md).
48+
* Manually, by following the [documentation](doc/user/installing-truffleruby.md).
4949
5050
You can use `gem` and `bundle` to install gems, as usual.
5151

@@ -61,7 +61,7 @@ TruffleRuby aims to:
6161
* TruffleRuby does not have a global interpreter lock and runs Ruby code in parallel.
6262
* Support C extensions.
6363
* Many C extensions work out of the box, including database drivers.
64-
* Add fast and low-overhead interoperability with languages like Java, JavaScript, Python, and R.
64+
* Add fast and low-overhead interoperability with languages like Java, JavaScript, Python and WebAssembly.
6565
* Provided by GraalVM, see the [Polyglot documentation](doc/user/polyglot.md).
6666
* Provide new tooling, such as debuggers and monitoring, that works across languages.
6767
* Includes a profiler, debugger, VisualVM, and more. See the [Tools documentation](doc/user/tools.md).
@@ -130,8 +130,9 @@ If you find any performance issue, please see [this guide](doc/user/reporting-pe
130130

131131
## Releases
132132

133-
TruffleRuby has the same version and is released at the same time as GraalVM.
134-
See the [release roadmap](https://www.graalvm.org/release-notes/version-roadmap/) for the release dates and information about how long releases are supported.
133+
TruffleRuby is released at the same time as GraalVM.
134+
TruffleRuby continues to use the release numbering based on the calendar year, for example, 21.x, and 22.x., same as GraalVM prior to 2023.
135+
See the [release roadmap](https://www.graalvm.org/release-notes/version-roadmap/) and [the upcoming releases list](https://github.com/oracle/truffleruby/milestones?state=open) for the release dates and information about how long releases are supported.
135136
GraalVM Community Edition releases are supported at most one year.
136137
[Longer support](https://docs.oracle.com/en/graalvm/enterprise/22/docs/release-calendar/) is available for Oracle GraalVM.
137138

doc/contributor/native-image.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ https://youtu.be/FJY96_6Y3a4?t=10023
2424
More information can be found in Kevin Menard's
2525
[blog post](http://nirvdrum.com/2017/02/15/truffleruby-on-the-substrate-vm.html).
2626

27-
The TruffleRuby that is distributed in the
28-
[GraalVM](../user/installing-graalvm.md) by default uses a version compiled
29-
using the Native Image Generator - this is to prioritise fast start-up and
27+
The TruffleRuby that is distributed in the TruffleRuby [Native Standalone](../../README.md#getting-started)
28+
by default uses a version compiled using [Native Image](https://www.graalvm.org/reference-manual/native-image/) - this is to prioritise fast start-up and
3029
warm-up time for shorter running commands and benchmarks.
3130

3231
```bash

doc/contributor/updating-ruby.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ rm -rf ~/tmp/ruby-$VERSION
4343
(required as `RUBY_BUILD_DIR` for `tool/import-mri-files.sh`),
4444
so one needs the extra `ruby-install` command when using `ruby-build`.
4545

46-
See https://github.com/oracle/truffleruby/blob/master/doc/user/ruby-managers.md#ruby-install-and-chruby for details
47-
about `ruby-install`.
46+
See [these docs](../../doc/user/ruby-managers.md#ruby-install-and-chruby) for details about `ruby-install`.
4847

4948
## Create reference branches
5049

doc/legal/legal.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Legal Documentation
22

3-
This document applies to TruffleRuby as built and distributed as part of
4-
GraalVM or the standalone distribution, which are the only supported ways to
5-
use TruffleRuby.
3+
This document applies to TruffleRuby as built and distributed as the Native Standalone and JVM Standalone distributions,
4+
which are the only supported ways to use TruffleRuby.
65

76
## TruffleRuby
87

doc/user/benchmarking.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ We expect anyone publishing benchmark numbers about TruffleRuby to follow these
1414

1515
### Use Oracle GraalVM
1616

17-
Use [Oracle GraalVM](installing-graalvm.md) (before 23.0: GraalVM EE), it is faster than GraalVM CE overall and represents what TruffleRuby is capable of.
17+
Use [Oracle GraalVM](installing-truffleruby.md#oracle-graalvm-and-graalvm-community-edition) (before 23.0: GraalVM Enterprise Edition), it is faster than GraalVM Community Edition overall and represents what TruffleRuby is capable of.
1818

1919
Use `ruby --version` to ensure that you are running Oracle GraalVM.
2020

doc/user/compatibility.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ TruffleRuby defines these constants for identification:
2929
- `RUBY_REVISION` is the full `git` commit hash used to build TruffleRuby (similar to MRI 2.7+).
3030
- `RUBY_RELEASE_DATE` is the `git` commit date.
3131
- `RUBY_PATCHLEVEL` is always zero.
32-
- `RUBY_ENGINE_VERSION` is the GraalVM version, or `0.0-` and the Git commit hash if your build is not part of a GraalVM release.
32+
- `RUBY_ENGINE_VERSION` is the TruffleRuby version, or `0.0-` and the Git commit hash if your build is not part of a TruffleRuby release.
3333

3434
In the C API, the preprocessor macro `TRUFFLERUBY` is defined, which can be checked with `#ifdef TRUFFLERUBY`.
3535

doc/user/deploying.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,25 @@ This document details TruffleRuby's different *runtime* configurations.
1212

1313
## TruffleRuby Runtime Configurations
1414

15-
There are two main configurations of TruffleRuby - *native* and *JVM*.
15+
There are two main configurations of TruffleRuby - *Native* and *JVM*.
1616
It is important to understand the different configurations of TruffleRuby, as each has different capabilities and performance characteristics.
1717
You should pick the execution mode that is appropriate for your application.
1818

1919
### Native Configuration
2020

21-
When distributed as part of GraalVM, TruffleRuby by default runs in the *native* configuration.
21+
In the Native Standalone, TruffleRuby runs in the *native* configuration.
2222
In this configuration, TruffleRuby is ahead-of-time compiled to a standalone native executable.
2323
This means that you do not need a JVM installed on your system to use it.
2424

25-
The advantages of the native configuration are that it [starts about as fast as MRI](https://eregon.me/blog/2019/04/24/how-truffleruby-startup-became-faster-than-mri.html), it may use less memory, and it becomes fast in less time than the *JVM*
26-
configuration.
25+
The advantages of the native configuration are that it [starts about as fast as MRI](https://eregon.me/blog/2019/04/24/how-truffleruby-startup-became-faster-than-mri.html), it may use less memory, and it becomes fast in less time than the *JVM* configuration.
2726
The disadvantages are that you can't use Java tools like VisualVM, it is less convenient for Java interoperability (see the details [here](compatibility.md#java-interoperability-with-the-native-configuration)), and *peak performance may be lower than on the JVM*.
2827

2928
The native configuration is used by default, but you can also request it using `--native`.
3029
To use polyglot programming with the *native* configuration, you need to pass the `--polyglot` flag.
3130

3231
### JVM Configuration
3332

34-
TruffleRuby can also be used in the *JVM* configuration, where it runs as a normal Java application on the JVM.
33+
TruffleRuby can also be used in the *JVM* configuration (by using the JVM Standalone or through embedding), where it runs as a normal Java application on the JVM.
3534
The advantages of the JVM configuration are that you can use Java interoperability easily, and *peak performance may be higher than the native configuration*.
3635
The disadvantages are that it takes much longer to start and to get fast, and may use more memory.
3736
You can select the JVM configuration by passing `--jvm`.

doc/user/faq.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ However this is complicated, so normally the Truffle framework uses the GraalVM
3535

3636
GraalVM is the platform on which TruffleRuby runs. It is a system for high-performance polyglot programming.
3737

38-
More concretely, GraalVM is a modified version of the OracleJDK that includes the Truffle framework, the GraalVM compiler, TruffleRuby, and other languages supported by GraalVM including JavaScript, Python, and R.
39-
40-
See how to [install GraalVM and TruffleRuby](installing-graalvm.md).
38+
More concretely, GraalVM is a JDK (Java Development Kit) with extra components like the GraalVM compiler and GraalVM Native Image.
39+
The GraalVM compiler and GraalVM Native Image are then used by Truffle languages like TruffleRuby.
4140

4241
### How do I get TruffleRuby?
4342

44-
There are three ways to get TruffleRuby. Please see [Getting Started](../../README.md#system-compatibility).
43+
There are multiple ways to install TruffleRuby, see [Getting Started](../../README.md#getting-started).
4544

4645
### Why is TruffleRuby slow on a standard JVM?
4746

@@ -121,7 +120,7 @@ Benchmarks that we haven't looked at yet may require new code paths to be specia
121120
Currently we've added specialization for the code paths in the benchmarks and applications that we've been using.
122121
Adding them is generally not complicated and over time we will have specializations to cover a broad range of applications.
123122

124-
Make sure that you are using [Oracle GraalVM, and have rebuilt the executable images](installing-graalvm.md) for the best performance.
123+
Make sure that you are using [Oracle GraalVM](installing-truffleruby.md#oracle-graalvm-and-graalvm-community-edition) for the best performance.
125124

126125
### How is this related to `invokedynamic`?
127126

doc/user/installing-graalvm.md

+1-56
Original file line numberDiff line numberDiff line change
@@ -6,59 +6,4 @@ permalink: /reference-manual/ruby/InstallingGraalVM/
66
---
77
# Using TruffleRuby with GraalVM
88

9-
[GraalVM](http://graalvm.org/) is the platform on which TruffleRuby runs.
10-
11-
Installing GraalVM enables you to run TruffleRuby both in the `--native` and `--jvm` [runtime configurations](../../README.md#truffleruby-runtime-configurations).
12-
13-
## Dependencies
14-
15-
[TruffleRuby's dependencies](../../README.md#dependencies) need to be installed for TruffleRuby to run correctly.
16-
17-
## GraalVM Community Edition and Oracle GraalVM
18-
19-
GraalVM is available in a Community Edition, which is open-source, and [Oracle GraalVM](https://www.oracle.com/graalvm/) which has better performance, footprint and scalability.
20-
See [the website](https://www.graalvm.org/downloads) for a comparison.
21-
22-
## Installing the Base Image
23-
24-
GraalVM starts with a base image which provides the platform for high-performance language runtimes.
25-
26-
The Community Edition base image can be installed [from GitHub](https://www.graalvm.org/downloads), under an open source licence.
27-
28-
Install the Oracle GraalVM base image from the [Oracle Downloads](https://www.oracle.com/downloads/graalvm-downloads.html) page by accepting the Oracle License Agreement.
29-
30-
GraalVM Community Developer Builds are [also available](https://github.com/graalvm/graalvm-ce-dev-builds/releases).
31-
32-
Whichever edition you choose, you will obtain a tarball which you can extract.
33-
There will be a `bin` directory (`Contents/Home/bin` on macOS) which you can add to your `$PATH` if you want to.
34-
35-
### Installing with asdf
36-
37-
Using [asdf](https://github.com/asdf-vm/asdf) and [asdf-java](https://github.com/halcyon/asdf-java) installation is as easy as
38-
`asdf install java graalvm-20.1.0+java11` (look up versions via `asdf list-all java | grep graalvm`).
39-
40-
## Installing Ruby and Other Languages
41-
42-
After installing GraalVM you then need to install the Ruby language into it.
43-
This is done using the `gu` command.
44-
The Ruby package is the same for both editions of GraalVM and comes from GitHub:
45-
```bash
46-
gu install ruby
47-
```
48-
49-
This command will show a message regarding running a post-install script.
50-
This is necessary to make the Ruby `openssl` C extension work with your system libssl.
51-
Please run that script now.
52-
The path of the script will be:
53-
```bash
54-
languages/ruby/lib/truffle/post_install_hook.sh
55-
```
56-
57-
You can also download the latest Ruby component (`ruby-installable-...`) manually from [GitHub](https://github.com/oracle/truffleruby/releases/latest) for GraalVM CE
58-
or from [Oracle Downloads](https://www.oracle.com/downloads/graalvm-downloads.html) for Oracle GraalVM.
59-
Then install it with `gu install --file path/to/ruby-installable-...`.
60-
61-
## Using a Ruby Manager
62-
63-
Inside GraalVM is a `jre/languages/ruby` or `languages/ruby` directory which has the usual structure of a Ruby implementation. It is recommended to add this directory to a Ruby manager.
64-
See [configuring Ruby managers](ruby-managers.md) for more information.
9+
This documentation has moved to [Installing TruffleRuby](installing-truffleruby.md).

doc/user/installing-libssl.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TruffleRuby provides the `openssl` gem but not the native `libssl` system librar
1010
TruffleRuby supports libssl versions 1.0.2, 1.1.0 and 3.0.0.
1111

1212
If you experience `openssl`-related errors, it might help to recompile the `openssl` gem by running `lib/truffle/post_install_hook.sh`.
13-
This is done automatically by Ruby managers, and mentioned in the post-install message when installing TruffleRuby via `gu install` in GraalVM.
13+
This is done automatically by Ruby managers.
1414

1515
To compile TruffleRuby against a non-system `libssl`, set `OPENSSL_PREFIX` while installing TruffleRuby:
1616
```bash

doc/user/installing-libyaml.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permalink: /reference-manual/ruby/InstallingLibYAML/
99
TruffleRuby requires to have `libyaml` installed, much like CRuby 3.2+ and Psych 5+.
1010

1111
If you experience `psych`-related errors saying it cannot find `libyaml`, it might help to recompile the `psych` gem by running `lib/truffle/post_install_hook.sh`.
12-
This is done automatically by Ruby managers, and mentioned in the post-install message when installing TruffleRuby via `gu install` in GraalVM.
12+
This is done automatically by Ruby managers.
1313

1414
### Fedora-based: RHEL, Oracle Linux, etc
1515

0 commit comments

Comments
 (0)