Skip to content

Commit bbd666b

Browse files
committed
docs: add gem installation instructions
1 parent 7feb70c commit bbd666b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@ A recorder of Ruby programs that produces [CodeTracer](https://github.com/metacr
66
> Currently it is in a very early phase: we're welcoming contribution and discussion!
77
88

9+
### Installing as a gem
10+
11+
```bash
12+
gem install codetracer-ruby-recorder
13+
```
14+
15+
The command downloads a prebuilt native extension when available and falls back
16+
to building it from source. If this fails, install the pure Ruby version:
17+
18+
```bash
19+
gem install codetracer_pure_ruby_recorder
20+
```
21+
22+
After installing, load the tracer:
23+
24+
```ruby
25+
require 'codetracer_ruby_recorder'
26+
27+
recorder = RubyRecorder.new
28+
recorder.enable_tracing
29+
# ... your code ...
30+
recorder.flush_trace(Dir.pwd)
31+
```
32+
933
### Usage
1034

1135
you can currently use it directly with

0 commit comments

Comments
 (0)