bin/rails: WASI args support

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby, wasm
Domain
cli

Research direction

Start with bin/rails and compare it with the referenced template at src/templates/default/bin/rails, then inspect the WASI parameter setup in src/templates/default/lib/rails.js. Run the Wasm executable with command arguments and determine why the WASI params are not reaching Ruby. Done means Rails CLI code can use normal arguments without a copied version using a custom args variable.

Written by the indexing model from the issue text.

Description

investigation ruby.wasm

Currently, we have to copy-paste the Rails CLI code to replace ARGV calls with a custom args variable: https://github.com/palkan/tutorialkit-rb-playground/blob/f429ea727335a2db9c8500828fcf90c32ac79ad0/src/templates/default/bin/rails#L12

In theory, it should be possible to pass command args to the Wasm executable through the WASI params: https://github.com/palkan/tutorialkit-rb-playground/blob/f429ea727335a2db9c8500828fcf90c32ac79ad0/src/templates/default/lib/rails.js#L25

For some yet unknown reason that doesn't work. Let's figure this out (could it be a ruby,wasm issue?).

Dominant language
Ruby
Stars
36
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from evilmartians/rails-tutorial

All issues in evilmartians/rails-tutorial

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.