Skip to content

Commit

Permalink
readme: update build and server start commands
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Jan 29, 2024
1 parent 4990a8b commit 81eeff7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ Play with Ruby Next right in the browser (powered by [ruby.wasm](https://github.

### Building ruby.wasm

The following command works for me:
Use the following command:

```sh
LDFLAGS='-L/opt/homebrew/opt/ruby/lib' bundle exec rbwasm build -o src/ruby.wasm --ruby-version 3.2
bundle exec rbwasm build -o src/ruby.wasm --ruby-version 3.2
```

Looks like compiling Ruby relies on the hardcoded `/usr/local/opt/ruby/lib` path for linking. So, we need to provie the correct way to Ruby (and, I guess, the versions must match).

This would build a JS-compatible WASM module. To build JS-free WASM module, use the `JS=false` env var.

### Testing
Expand All @@ -45,7 +43,7 @@ First, install JS deps (`yarn install`).
Then, run a web server:

```sh
yarn serve
yarn dev
```

Go to [localhost:8000](http://localhost:8000) and see it in action!

0 comments on commit 81eeff7

Please sign in to comment.