Skip to content

Skip building extension on WASI #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2024
Merged

Conversation

kateinoigakukun
Copy link
Member

WASI does not support concept to provide termios, so it is not possible to build io/console extension on WASI at the moment.

However, io/console is used by many gems, and removing the dependency from them conditionally is impossible. So, this commit adds a check to skip building io/console extension on WASI just to pass gem install for the platform.

@kateinoigakukun kateinoigakukun requested review from hsbt and nobu June 17, 2024 07:24
WASI does not support concept to provide termios, so it is not possible
to build io/console extension on WASI at the moment.

However, `io/console` is used by many gems, and removing the dependency
from them *conditionally* is impossible. So, this commit adds a
check to skip building `io/console` extension on WASI just to pass `gem
install` for the platform.
@kateinoigakukun
Copy link
Member Author

kateinoigakukun commented Jun 17, 2024

Confirmed it works with --target-rbconfig

$ ruby extconf.rb --target-rbconfig=path/to/usr/local/lib/ruby/3.4.0+0/wasm32-wasi/rbconfig.rb
checking for rb_io_path()... yes
checking for rb_io_descriptor()... yes
checking for rb_io_get_write_io()... yes
checking for rb_io_closed_p()... yes
checking for rb_io_open_descriptor()... yes
$ make
# nop

@hsbt hsbt merged commit ba9bf00 into ruby:master Jun 17, 2024
17 checks passed
kateinoigakukun added a commit to ruby/ruby.wasm that referenced this pull request Jun 18, 2024
kateinoigakukun added a commit to ruby/ruby.wasm that referenced this pull request Jun 18, 2024
kateinoigakukun added a commit to ruby/ruby.wasm that referenced this pull request Sep 5, 2024
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.

2 participants