Skip to content

Commit 6184793

Browse files
committed
[DOC] Split building docs for modular GC
1 parent 837699e commit 6184793

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

gc/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ Two GC implementations are included in Ruby:
1515
> [!IMPORTANT]
1616
> Ruby's modular GC feature is experimental and subject to change. There may be bugs or performance impacts. Use at your own risk.
1717
18+
### Building Ruby with Modular GC
19+
1820
1. Configure Ruby with the `--with-modular-gc=<dir>` option, where `dir` is the directory you want to place the built GC libraries into.
1921
2. Build Ruby as usual.
20-
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:
22+
23+
### Building GC implementations shipped with Ruby
24+
25+
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:
2126
- `default`: The default GC that Ruby ships with.
2227
- `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.
23-
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).
28+
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).
2429

2530
## Modular GC API
2631

0 commit comments

Comments
 (0)