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 +4 -4
- data/README.md +7 -17
- data/lib/drb/drb_server.rb +0 -1
- data/lib/drb/websocket.rb +2 -3
- data/lib/wasm_drb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7efb3b63662b83b965f0940bb1ede41cab2a6992fdeb35fc0ab7b7740c511c7d
|
4
|
+
data.tar.gz: 1701b0680a8ef30ae8e78b3418715fc023787621adf66ddd0d9f2efa708045ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f12e70ea65f8298ce7dec5860803c41d0dc9390cd1037dbea3b80ace44bd29b4e2ac3c8f7210fd1aac3b60753806c0849464f097fd3d67c3b47b5ed2d4848bb9
|
7
|
+
data.tar.gz: ff29a4d274bd22d9f5a24949ceac1db03e9ffcf3f8b409462933416728aea8ce325d105b29a5b07475e2a63c74663d0b54a892424d2770aa88e948bdf4f98ed2
|
data/README.md
CHANGED
@@ -1,38 +1,28 @@
|
|
1
|
-
#
|
1
|
+
# wasm_drb
|
2
2
|
|
3
|
-
|
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
|
10
|
+
bundle add wasm_drb
|
15
11
|
```
|
16
12
|
|
17
|
-
|
13
|
+
Use wasm_drb with ruby.wasm and JS gem together.
|
18
14
|
|
19
15
|
```bash
|
20
|
-
|
16
|
+
bundle add ruby_wasm js
|
21
17
|
```
|
22
18
|
|
23
19
|
## Usage
|
24
20
|
|
25
|
-
|
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/
|
25
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/youchan/wasm_drb.
|
36
26
|
|
37
27
|
## License
|
38
28
|
|
data/lib/drb/drb_server.rb
CHANGED
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.
|
129
|
-
|
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
|
|
data/lib/wasm_drb/version.rb
CHANGED
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.
|
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
|
+
date: 2025-03-12 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: ruby_wasm
|