Commit 32ab2ae8
32ab2ae8eabeMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 8 months ago · 2 files · ~2 modified
Description
Document Regexp linking: compile comment in generated C, README update
Generated C files now include compile instructions in the header: /* Compile: cc -O2 -lm -o / / Compile: cc -O2 -lonig -lm -o */ (for Regexp)
README updated with Regexp linking instructions and oniguruma dependency note.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- 32ab2ae8eabe
- Parent
- 06bb87d340aa
README.mdmodifiedView file
@@ -18,8 +18,13 @@
1818
# 3. Compile a Ruby program to C, then to a native binary1919
./spinel --source=app.rb --output=app.c2020
cc -O2 app.c -lm -o app21+
22+
# For programs using Regexp, link with oniguruma:23+
cc -O2 app.c -lonig -lm -o app2124
```2225
26+
The generated C file includes a comment with the exact compile command needed.27+
2328
## Benchmarks2429
2530
| Benchmark | CRuby 3.2 | mruby | **Spinel AOT** | Speedup |@@ -181,7 +186,8 @@
181186
## Dependencies182187
183188
- **Build time**: [Prism](https://github.com/ruby/prism) (fetched automatically by `make deps`)184-
- **Run time**: None. Generated binaries are standalone (libc + libm only).189+
- **Run time**: None for most programs. Generated binaries are standalone (libc + libm only).190+
- **Regexp**: Programs using regular expressions require [oniguruma](https://github.com/kkos/oniguruma) (`-lonig`). Install: `apt install libonig-dev` or equivalent.185191
186192
## License187193
src/codegen.cmodifiedView file
Loading diff…