summaryrefslogtreecommitdiff
path: root/gc/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'gc/README.md')
-rw-r--r--gc/README.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/gc/README.md b/gc/README.md
index 102b24e24e..cb71357973 100644
--- a/gc/README.md
+++ b/gc/README.md
@@ -15,12 +15,17 @@ Two GC implementations are included in Ruby:
> [!IMPORTANT]
> Ruby's modular GC feature is experimental and subject to change. There may be bugs or performance impacts. Use at your own risk.
+### Building Ruby with Modular GC
+
1. Configure Ruby with the `--with-modular-gc=<dir>` option, where `dir` is the directory you want to place the built GC libraries into.
2. Build Ruby as usual.
-3. Build your desired GC implementation with `make install-modular-gc MODULAR_GC=<impl>`. This will build the GC implementation and place the built library into the `dir` specified in step 1. `impl` can be one of:
+
+### Building GC implementations shipped with Ruby
+
+1. Build your desired GC implementation with `make install-modular-gc MODULAR_GC=<impl>`. This will build the GC implementation and place the built library into the `dir` specified in step 1. `impl` can be one of:
- `default`: The default GC that Ruby ships with.
- `mmtk`: The GC that uses [MMTk](https://www.mmtk.io/) as the back-end. See Ruby-specific details in the [ruby/mmtk](https://github.com/ruby/mmtk) repository.
-4. Run your desired GC implementation by setting the `RUBY_GC_LIBRARY=<lib>` environment variable, where `lib` could be `default`, `mmtk`, or your own implementation (as long as you place it in the `dir` specified in step 1).
+2. Run your desired GC implementation by setting the `RUBY_GC_LIBRARY=<lib>` environment variable, where `lib` could be `default`, `mmtk`, or your own implementation (as long as you place it in the `dir` specified in step 1).
## Modular GC API