File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,13 @@ ruby trace.rb <path to ruby file>
1616# or in the folder of `$CODETRACER_DB_TRACE_PATH` if such an env var is defined
1717```
1818
19+ You can also invoke a lightweight CLI that loads the native tracer extension
20+ directly:
21+
22+ ``` bash
23+ ruby src/native_trace.rb < path to ruby file>
24+ ```
25+
1926however you probably want to use it in combination with CodeTracer, which would be released soon.
2027
2128### Development
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ # SPDX-License-Identifier: MIT
3+ # Simple utility loading the native tracer extension and executing a program.
4+
5+ if ARGV . empty?
6+ $stderr. puts ( "usage: ruby native_trace.rb <program> [args]" )
7+ exit 1
8+ end
9+
10+ # Path to the compiled native extension
11+ ext_path = File . expand_path ( '../ext/native_tracer/target/release/libcodetracer_ruby_recorder' , __dir__ )
12+ require ext_path
13+
14+ program = ARGV . shift
15+ load program
16+
You can’t perform that action at this time.
0 commit comments