Skip to content

feat: add smalruby3 launcher command (rsdl replacement)#404

Merged
takaokouji merged 1 commit into
developfrom
feature/smalruby3-launcher-command
Mar 27, 2026
Merged

feat: add smalruby3 launcher command (rsdl replacement)#404
takaokouji merged 1 commit into
developfrom
feature/smalruby3-launcher-command

Conversation

@takaokouji
Copy link
Copy Markdown

Summary

smalruby3 コマンドを gem に内蔵。rsdl の別途インストールが不要に。

macOS では SDL2 が Cocoa のメインスレッドで初期化される必要があり、通常の ruby コマンドでは segfault する。rsdl と同じ仕組み(SDL_main + ruby_init + ruby_run_node)を smalruby3 gem 内にバンドル。

使い方

# gem install 時に自動ビルド
gem install smalruby3

# rsdl の代わりに smalruby3 コマンドで実行
smalruby3 script.rb

変更点

  • ext/smalruby3_launcher/: C ソース + extconf.rb(rsdl ベース)
  • smalruby3.gemspec: launcher を追加 extension として登録
  • .standard.yml: extconf.rb を lint 除外(mkmf グローバル変数)
  • .gitignore: ビルド成果物を除外

Closes #403

🤖 Generated with Claude Code

@takaokouji takaokouji force-pushed the feature/smalruby3-launcher-command branch 2 times, most recently from 341c491 to b9777c6 Compare March 27, 2026 17:49
Build a native smalruby3 binary that wraps SDL_main + ruby_init,
solving the macOS main thread requirement for SDL2. Users can run
scripts with `smalruby3 script.rb` instead of `rsdl`.

- ext/smalruby3_launcher/: C source and extconf.rb (based on rsdl)
- gemspec: add launcher as second extension
- .standard.yml: exclude extconf.rb from lint (mkmf globals)

Closes #403

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@takaokouji takaokouji force-pushed the feature/smalruby3-launcher-command branch from b9777c6 to f82c3b1 Compare March 27, 2026 17:53
@github-actions
Copy link
Copy Markdown

@takaokouji takaokouji merged commit 4fa5b78 into develop Mar 27, 2026
11 checks passed
@takaokouji takaokouji deleted the feature/smalruby3-launcher-command branch March 27, 2026 17:59
github-actions Bot pushed a commit that referenced this pull request Mar 27, 2026
…uby3-launcher-command

feat: add smalruby3 launcher command (rsdl replacement)
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.

feat: smalruby3 コマンドを gem に内蔵(rsdl 不要化)

1 participant