Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit 043be54

Browse files
committed
update readme
1 parent 140b690 commit 043be54

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ benchmark/repos.zip
1818
benchmark/rust-parser
1919
benchmark/ruby-parser.rb
2020
benchmark/repos
21-
benchmark/c-parser
21+
benchmark/cpp-parser
2222
benchmark/filelist
2323
benchmark/stats
2424
*.benchmark-out

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,22 @@ assert_byte_list(result.input.bytes, "2 + 3");
5252
5353
All node classes fully match node structs of the original Rust implementation. You can check [full documentation](https://docs.rs/lib-ruby-parser) (`nodes` module)
5454
55+
# Development
56+
57+
+ Clone the repo
58+
+ Set environment variables:
59+
+ `TARGET` (e.g. `export TARGET=x86_64-apple-darwin`, no default value)
60+
+ `CC` (e.g. `gcc`)
61+
+ `BUILD_ENV` (`debug` or `release`, `debug` is the default value)
62+
+ run `make tests/run` to run tests
63+
+ run `make libruby_parser_cpp.a` (or `make libruby_parser_cpp.lib` for MSVC) to get a static library
64+
+ run `make lib-ruby-parser.hpp` to get a header file
65+
66+
# Structure
67+
68+
+ Each directory has its own `build.mk` file that is included my the main `Makefile`
69+
+ Rust parser with basic C bindings is located under `ruby-parser-c`.
70+
+ Actual C bindings are located in `*.{h, c}` files in the root directory
71+
+ `scripts` directory contains per-triplet additional configurations for `make`
72+
+ `codegen` directory is a Rust micro-library that does code generation
73+
+ `benchmark` directory contains a set of scripts to compare performance of Rust vs C vs Ripper

0 commit comments

Comments
 (0)