Shopify / Shopify/rubydex

Use ERB based templates for code generator in ruby-rbs crate

Open
#538 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

chore
Dominant language
Rust
Stars
355
Forks
24
Avg merge
2d 6h
Merged PRs (30d)
17

Description

Currently ruby-rbs crate generates AST definitions (in bindings.rs) through build.rs. This is standard way in Rust ecosystem, but using ERB templates would make more sense since we can share the implementation with the C version.

Reference: https://github.com/ruby/rbs/pull/2826#discussion_r2728463540

@soutaro is good for this but also understand it's not straightforward. We need some discussion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading build.rs and the generated bindings.rs, then review the referenced ruby/rbs discussion about sharing the implementation with the C version. Done means the ruby-rbs crate generates its AST definitions from ERB templates and shares the intended implementation approach with the C version.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby, rust
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.