wasm_drb 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f735a776e83277fcb9b96925aa8ae44347840ad8e0b8fe9fae4532ba81affd9
4
- data.tar.gz: 2abc1174c136cc8f0d77d766e127ac6c7ed30ac91cb6793fe3d04ca0460cca0b
3
+ metadata.gz: 7efb3b63662b83b965f0940bb1ede41cab2a6992fdeb35fc0ab7b7740c511c7d
4
+ data.tar.gz: 1701b0680a8ef30ae8e78b3418715fc023787621adf66ddd0d9f2efa708045ce
5
5
  SHA512:
6
- metadata.gz: 608e8b9cd41c683ab244229d30313f7b952f85c4c0331bb9662f3c9619b0930fcfadfd9018051fb62195c45dc10923c49e26261ae56d472546fa6bedb367c7d6
7
- data.tar.gz: 68bd1c462ecf8579fbb22a61d923dc2a0388f279a63ab0364ea83aa376e33673623ca541a37a5c7ff564726be35b3b38900d500ab3d3b8edaee773e1a0d452e2
6
+ metadata.gz: f12e70ea65f8298ce7dec5860803c41d0dc9390cd1037dbea3b80ace44bd29b4e2ac3c8f7210fd1aac3b60753806c0849464f097fd3d67c3b47b5ed2d4848bb9
7
+ data.tar.gz: ff29a4d274bd22d9f5a24949ceac1db03e9ffcf3f8b409462933416728aea8ce325d105b29a5b07475e2a63c74663d0b54a892424d2770aa88e948bdf4f98ed2
data/README.md CHANGED
@@ -1,38 +1,28 @@
1
- # Wasm::Drb
1
+ # wasm_drb
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/wasm/drb`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ A implementation of dRuby for ruby.wasm. It communicate with websocket as dRuby protocol.
6
4
 
7
5
  ## Installation
8
6
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
7
  Install the gem and add to the application's Gemfile by executing:
12
8
 
13
9
  ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
10
+ bundle add wasm_drb
15
11
  ```
16
12
 
17
- If bundler is not being used to manage dependencies, install the gem by executing:
13
+ Use wasm_drb with ruby.wasm and JS gem together.
18
14
 
19
15
  ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
16
+ bundle add ruby_wasm js
21
17
  ```
22
18
 
23
19
  ## Usage
24
20
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
21
+ See [examples](examples/) and [drb documentation](https://docs.ruby-lang.org/en/3.3/DRb.html).
32
22
 
33
23
  ## Contributing
34
24
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/wasm-drb.
25
+ Bug reports and pull requests are welcome on GitHub at https://github.com/youchan/wasm_drb.
36
26
 
37
27
  ## License
38
28
 
@@ -22,7 +22,6 @@ module DRb
22
22
  print_error(e)
23
23
  ensure
24
24
  client.close unless succ
25
- break unless succ
26
25
  end
27
26
  end
28
27
  end
data/lib/drb/websocket.rb CHANGED
@@ -125,9 +125,8 @@ module DRb
125
125
  server_side = ServerSide.new(stream, @config, uri)
126
126
  @accepter.call server_side
127
127
 
128
- send_data = sender_id.bytes.each_slice(2).map(&:first)
129
- send_data += server_side.reply.bytes.each_slice(2).map(&:first)
130
- @ws.send(WasmDRb::ArrayBuffer.new(send_data))
128
+ send_data = WasmDRb::ArrayBuffer.new(sender_id.bytes + server_side.reply.bytes)
129
+ @ws.send(send_data)
131
130
  end
132
131
  end
133
132
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Wasm
4
4
  module Drb
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wasm_drb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - youchan
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-03-10 00:00:00.000000000 Z
10
+ date: 2025-03-12 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ruby_wasm