On Demand Runtime Information.
- GraalVM
- Gradle
- Redis
- Ruby >= 2.5 and Bundler (for running some tools and language servers)
Ensure that the environment variable $JAVA_HOME
points to your GraalVM home
folder, e.g.
export JAVA_HOME=/Users/radi/graalvm-ee-1.0.0-rc12/Contents/Home
Ensure that a redis server is running, e.g.
redis-cli ping
# => PONG
-
To let your GraalVM installation at
$JAVA_HOME
know about Audrey, run:./gradlew install
This will build a fat JAR and place it in
$JAVA_HOME/jre/tools/audrey
. -
Verify your installation by running
$JAVA_HOME/bin/js --jvm --help:tools | grep audrey
If you see some output describing
--audrey
flags and switches, the installation was successful. -
Run your application and provide the following flags to enable data-gathering with Audrey:
$JAVA_HOME/bin/js --jvm --audrey --audrey.Project="<my_unique_project_name>" path/to/app.js
For example:
$JAVA_HOME/bin/js --jvm --audrey --audrey.Project="test" --audrey.FilterPath="add.js" projects/javascript/test_project/add.js
Consult --jvm --help:tools
for a more exhaustive list of options.
To start a language server from the project root for debugging purposes, run:
./gradlew startServer
This should start a server that waits for clients to connect to port 8123 (by default).
To make an executable globally available to language clients, ensure that
bin/audrey-ls
is in your path, e.g.
ln -sr bin/audrey-ls /usr/local/bin/audrey-ls
You should now be able to start a language server that communicates via
stdin/out with audrey-ls
.
The project
directory contains sub folders for each Truffle language to test
with. By default you should find a simple test project for each of them, e.g.
projects/javascript
└── test_project
└── ...
projects/ruby
└── test_project
└── ...
projects/r
└── test_project
└── ...
To pull additional sample projects to test Audrey with:
git submodule update --init --recursive
To update them:
git submodule update --recursive --remote