Skip to content

feat: Ruby 바인딩 추가#171

Open
kdyann wants to merge 4 commits into
dev-five-git:mainfrom
kdyann:feat/ruby-binding
Open

feat: Ruby 바인딩 추가#171
kdyann wants to merge 4 commits into
dev-five-git:mainfrom
kdyann:feat/ruby-binding

Conversation

@kdyann

@kdyann kdyann commented Jul 2, 2026

Copy link
Copy Markdown

개요

한국어 점역 엔진의 Ruby 바인딩(packages/ruby)을 추가합니다. Python(pyo3) 바인딩과 대칭되는 magnus + rb-sys 네이티브 확장 방식이며, RubyGems에 braillify gem으로 배포됩니다.

주요 변경 사항

  • packages/ruby/ — magnus 0.8 바인딩 crate(braillify_rb) + gem 패키징
    • 소스 gem은 crates.io의 braillify를 사용하고, 저장소 내 빌드는 루트 [patch.crates-io]로 로컬 libs/braillify를 사용했습니다. (프리컴파일 gem은 항상 repo 코어로 빌드됨)
    • 버전 단일 소스는 packages/ruby/Cargo.toml — gemspec이 여기서 버전을 파싱합니다.
  • CI (publish.yml)
    • ruby-test: 3개 OS에서 rake compile + minitest
    • ruby-build: oxidize-rb/actions/cross-gem@v1로 5개 플랫폼(linux x86_64/arm64,
      macOS x86_64/arm64, Windows ucrt) 프리컴파일 gem + 소스 gem 빌드
    • ruby-publish: rubygems.org 배포 (버전/플랫폼별 idempotent 체크)
    • 기존 test 잡에 Ruby 셋업을 추가했습니다. (tarpaulin/clippy가 ruby crate를 포함)
  • changepacks: packages/ruby/Cargo.toml 등록했습니다.

테스트

  • Rust 단위 테스트 7건 (cargo test -p braillify_rb, rb-sys-test-helpers 임베디드 VM)
  • minitest 6건 29 assertions (happy path, 에러 매핑, 인코딩, byte↔unicode 일치)
  • 로컬 검증을 완료했습니다: Linux(Docker, Ruby 3.1) + Windows(ucrt Ruby 3.4 + GNU Rust) 양쪽에서 cargo test / rake compile / minitest / smoke / gem build 전부 통과. macOS는 CI에서 확인합니다.

머지 전 필요 사항

  • repo secret RUBYGEMS_API_KEY 등록이 필요합니다. (rubygems.org API key, gem 이름은 braillify로)

kdyann and others added 3 commits July 2, 2026 14:15
- packages/ruby: magnus 기반 네이티브 확장 (encode / translate_to_unicode / translate_to_braille_font)
- 소스 gem은 crates.io braillify 사용, 저장소 빌드는 [patch.crates-io]로 로컬 코어 사용
- rb-sys-test-helpers 임베디드 VM 단위 테스트 + minitest 통합 테스트
- CI: ruby-test(3 OS) / ruby-build(cross-gem 5플랫폼) / ruby-publish(rubygems.org) 잡 추가
- changepacks에 packages/ruby/Cargo.toml 등록 (버전 단일 소스)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Windows 로컬 검증(ucrt Ruby 3.4 + GNU Rust)에서 cargo test/rake compile/minitest 전부 통과 확인
- mswin(개발 빌드) Ruby 대신 rb-sys 공식 setup-ruby-and-rust 액션으로 툴체인 매칭 위임
- Windows bindgen(libclang) 환경변수 요구사항 README에 문서화

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
packages/ruby/src/lib.rs 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant