You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
librubyparser was an artifact of the prototype that was initially
named ruby-parser. Instead, this renames it to libprism to be
consistent with the actual name.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This is a parser for the Ruby programming language. It is designed to be portabl
7
7
8
8
## Overview
9
9
10
-
The repository contains the infrastructure for both a shared library (librubyparser) and a native CRuby extension. The shared library has no bindings to CRuby itself, and so can be used by other projects. The native CRuby extension links against `ruby.h`, and so is suitable in the context of CRuby.
10
+
The repository contains the infrastructure for both a shared library (libprism) and a native CRuby extension. The shared library has no bindings to CRuby itself, and so can be used by other projects. The native CRuby extension links against `ruby.h`, and so is suitable in the context of CRuby.
11
11
12
12
```
13
13
.
@@ -21,7 +21,7 @@ The repository contains the infrastructure for both a shared library (librubypar
21
21
├── ext
22
22
│ └── prism
23
23
│ ├── extconf.rb configuration to generate the Makefile for the native extension
24
-
│ └── extension.c the native extension that interacts with librubyparser
24
+
│ └── extension.c the native extension that interacts with libprism
Copy file name to clipboardExpand all lines: docs/build_system.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,14 +16,14 @@ The main solution for the second point seems a Makefile, otherwise many of the u
16
16
## General Design
17
17
18
18
1. Templates are generated by `templates/template.rb`
19
-
4. The `Makefile` compiles both `librubyparser.a` and `librubyparser.{so,dylib,dll}` from the `src/**/*.c` and `include/**/*.h` files
19
+
4. The `Makefile` compiles both `libprism.a` and `libprism.{so,dylib,dll}` from the `src/**/*.c` and `include/**/*.h` files
20
20
5. The `Rakefile``:compile` task ensures the above prerequisites are done, then calls `make`,
21
-
and uses `Rake::ExtensionTask` to compile the C extension (using its `extconf.rb`), which uses `librubyparser.a`
21
+
and uses `Rake::ExtensionTask` to compile the C extension (using its `extconf.rb`), which uses `libprism.a`
22
22
23
23
This way there is minimal duplication, and each layer builds on the previous one and has its own responsibilities.
24
24
25
25
The static library exports no symbols, to avoid any conflict.
26
-
The shared library exports some symbols, and this is fine since there should only be one librubyparser shared library
26
+
The shared library exports some symbols, and this is fine since there should only be one libprism shared library
27
27
loaded per process (i.e., at most one version of the prism *gem* loaded in a process, only the gem uses the shared library).
28
28
29
29
## The various ways to build prism
@@ -36,11 +36,11 @@ loaded per process (i.e., at most one version of the prism *gem* loaded in a pro
36
36
37
37
The gem contains the pre-generated templates.
38
38
When installing the gem, `extconf.rb` is used and that:
39
-
* runs `make build/librubyparser.a`
39
+
* runs `make build/libprism.a`
40
40
* compiles the C extension with mkmf
41
41
42
42
When installing the gem on JRuby and TruffleRuby, no C extension is built, so instead of the last step,
43
-
there is Ruby code using FFI which uses `librubyparser.{so,dylib,dll}`
43
+
there is Ruby code using FFI which uses `libprism.{so,dylib,dll}`
44
44
to implement the same methods as the C extension, but using serialization instead of many native calls/accesses
45
45
(JRuby does not support C extensions, serialization is faster on TruffleRuby than the C extension).
46
46
@@ -67,7 +67,7 @@ The script generates the templates when importing.
67
67
Then when `mx build` builds TruffleRuby and the `prism` mx project inside, it runs `make`.
68
68
69
69
Then the `prism bindings` mx project is built, which contains the [bindings](https://github.com/oracle/truffleruby/blob/master/src/main/c/prism_bindings/src/prism_bindings.c)
70
-
and links to `librubyparser.a` (to avoid exporting symbols, so no conflict when installing the prism gem).
70
+
and links to `libprism.a` (to avoid exporting symbols, so no conflict when installing the prism gem).
0 commit comments