Bootstrap Lasem Ruby wrapper gem#1
Open
suleman-uzair wants to merge 8 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Bootstraps a new lasem Ruby gem that wraps the Lasem C renderer via a native extension, providing a single public entry point (Lasem.render) plus tooling for dependency discovery/build (vendored Meson build + lasem-doctor) and initial specs/docs.
Changes:
- Add Ruby API layer (
Lasem.render, option validation, error classes) and native loader behavior (real vs stub extension). - Add native C extension implementation (SVG/PNG/PDF/PS rendering) plus extconf logic for vendored/system Lasem discovery and optional vendored build.
- Add dependency diagnostics (
Lasem::DependencyDoctor, CLI executable) and Rake tasks/docs/specs.
Reviewed changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/lasem/renderer_spec.rb | Adds rendering/option validation specs (including native-only expectations). |
| spec/lasem/option_error_spec.rb | Adds specs for Lasem::OptionError builders. |
| spec/lasem/dependency_doctor_spec.rb | Adds specs for dependency doctor reporting and CLI status codes. |
| spec/lasem_spec.rb | Verifies top-level API surface (native_available?, render) and absence of shortcuts. |
| README.adoc | Documents gem purpose, API usage, vendored/system dependency strategy, and setup steps. |
| rakelib/lasem.rake | Adds Meson-based vendored Lasem build tasks and a doctor task. |
| Rakefile | Adds rake-compiler integration and sets default task to compile + spec. |
| lib/lasem/renderer.rb | Implements Lasem::Renderer wrapper around native rendering. |
| lib/lasem/render_options.rb | Implements option normalization/validation and native argument shaping. |
| lib/lasem/native_loader.rb | Implements extension discovery/loading and native availability checks. |
| lib/lasem/error.rb | Introduces base error class. |
| lib/lasem/error/render_error.rb | Adds render error type for native/render failures. |
| lib/lasem/error/option_error.rb | Adds structured option validation errors. |
| lib/lasem/error/dependency_error.rb | Adds dependency error with actionable diagnostic messaging. |
| lib/lasem/dependency_doctor.rb | Adds dependency checks and warning generation for local setup. |
| lib/lasem/dependency_doctor/cli.rb | Adds CLI interface and option parsing for doctor. |
| lib/lasem/dependency_doctor/probe.rb | Adds system probing helpers (PATH, pkg-config queries). |
| lib/lasem/dependency_doctor/report.rb | Adds formatting/reporting for dependency doctor results. |
| lib/lasem.rb | Defines the public API via autoloads, native_available?, and render. |
| lasem.gemspec | Renames/defines gemspec and packages sources (including vendored Lasem submodule files). |
| lasem-ruby.gemspec | Removes old gemspec. |
| Gemfile | Updates gemspec reference and adds rake-compiler for native builds. |
| ext/lasem/extconf.rb | Adds native/stub selection, pkg-config discovery, and vendored Meson build attempt. |
| ext/lasem/lasem_ext.c | Adds the actual native renderer implementation using Lasem + Cairo. |
| ext/lasem/lasem_stub.c | Adds stub extension that reports missing native dependency. |
| exe/lasem-doctor | Adds executable entry point for dependency diagnostics. |
| .gitmodules | Adds Lasem submodule configuration under vendor/lasem/source. |
| .gitignore | Ignores built gem artifacts for the renamed gem. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 6 commits
May 13, 2026 17:10
c41c426 to
de5ef13
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs plurimath/plurimath#279
This bootstraps the
lasemRuby gem as a native wrapper around the Lasem C renderer.Lasem.render(...)as the public Ruby API with explicitinput_typeandoutput_formatoptions.lasem-doctordependency diagnostics for local setup troubleshooting.git ls-files --recurse-submodules.