wasmtime 0.1.0.alpha.1 → 0.1.0.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -13
  3. data/lib/wasmtime/version.rb +1 -1
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6d40f922fd4b141e3f39f77539627d538b0b80f044ac105d4667b11a4c8db41
4
- data.tar.gz: 89413d7445a2f8057ba9e490d03e7e6706f4098587e9b66f695f4acc6fed4fe9
3
+ metadata.gz: 31e7ebaaa71bf16ca32bfbe4e5bb00c01c89da46871a546b59b317df42d6b945
4
+ data.tar.gz: 3e475f5ea5b96f2b05c7ddc57d201099d3e834f3122b1f1bcef91c68e0a9e779
5
5
  SHA512:
6
- metadata.gz: 78992b42a333874ec2ca7b8df3b302586cb805186035fa73c6e46260f2e9a3c7a29c425fdeacf4f45dc102baf3d1691073128b29e84884572806d6795d73be0d
7
- data.tar.gz: d84d88a70ce20ea7c59d1e8b3be906b35bb309644425305385d34faaa87ea776f7f52b1eb27452d1ef099c4dd60ab45e79098eb57a823d4c7b191f163b17a10c
6
+ metadata.gz: 495c7b203e4290403b2562014964ab37bea64d70ed4dba91119e9d37fd8d73b32de20724df1b65f57cddb8bde8a4abaf325443f19df9fca6ce8d10e701a8a86b
7
+ data.tar.gz: e830188f74778df480edb8bd37372ef9f3d5870060625897b2cb693ff954139db8ae594e3f558abc86843d5df4592d27bf85855c7506d56d6dd5f1f883ca90a8
data/README.md CHANGED
@@ -17,26 +17,26 @@
17
17
 
18
18
  ## Introduction
19
19
 
20
- This project allows you to use the [Wasmtime](https://wasmtime.dev/) WebAssembly
20
+ This gem allows you to use the [Wasmtime](https://wasmtime.dev/) WebAssembly
21
21
  runtime from within your Ruby project.
22
22
 
23
23
  Why would you want that? [WebAssembly](https://webassembly.org/) (or WASM) is a
24
24
  technology that allows you to write programs that run at near-native speeds in a
25
- safe sandboxed environment. Wasmtime is a runtime that allows you to execute
26
- WASM programs. This gem embeds Wasmtime within a native extension so you can
27
- execute a WASM program from Ruby.
25
+ safe sandboxed environment. Wasmtime is a runtime for WASM programs. This gem
26
+ embedds Wasmtime in a native extension so you can now run WASM from Ruby.
28
27
 
29
- This project is pretty experimental and not production ready right now. There
30
- are quite a few things that aren't built yet, see [TODO](#todo) section below.
28
+ This is pretty experimental and not production ready right now. There are quite
29
+ a few things that aren't built yet, see [TODO](#todo) section below.
31
30
 
32
31
  **Note:** [WebAssembly Interface Types](https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/Explainer.md)
33
32
  support has been [temporarily removed](https://github.com/bytecodealliance/wasmtime/pull/1292)
34
- from Wasmtime. Therefore, only 32 and 64-bit integers and floats are currently
35
- supported.
33
+ from Wasmtime. Only 32 and 64-bit integers and floats are currently supported.
36
34
 
37
35
  ## Usage
38
36
 
39
- Install the `wasmtime` gem. Compiling the native extension requires [Rust](https://rustup.rs/).
37
+ Install the `wasmtime` gem. Pre-compiled binaries are available for
38
+ `x86_64-linux` and `x86_64-darwin-19`. Compiling the native extension requires
39
+ [Rust with rustup](https://rustup.rs/).
40
40
 
41
41
  ```sh
42
42
  gem install wasmtime
@@ -70,7 +70,15 @@ instance = Wasmtime::Instance.new('fibonacci.wasm')
70
70
  puts instance.funcs[:fib].call(11) #=> 89
71
71
  ```
72
72
 
73
- ## Development
73
+ ## Examples
74
+
75
+ More usage examples are provided in `examples/`. To run these, you first need to
76
+ compiling the test WASM modules.
77
+
78
+ Install some Rust tools.
79
+
80
+ - [rustup](https://rustup.rs/) - Rust toolchain manager
81
+ - [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/) - WASM module bundler
74
82
 
75
83
  Install Ruby dependencies.
76
84
 
@@ -78,22 +86,36 @@ Install Ruby dependencies.
78
86
  bundle install
79
87
  ```
80
88
 
89
+ Build the WASM modules.
90
+
91
+ ```sh
92
+ bundle exec rake wasm
93
+ ```
94
+
95
+ Run an example.
96
+
97
+ ```sh
98
+ ruby examples/fibonacci.rb
99
+ ```
100
+
101
+ ## Development
102
+
81
103
  Compile Rust native extension.
82
104
 
83
105
  ```sh
84
- rake compile
106
+ bundle exec rake compile
85
107
  ```
86
108
 
87
109
  Run test suite.
88
110
 
89
111
  ```sh
90
- rake spec
112
+ bundle exec rake spec
91
113
  ```
92
114
 
93
115
  Format source code.
94
116
 
95
117
  ```sh
96
- rake format
118
+ bundle exec rake format
97
119
  ```
98
120
 
99
121
  ## TODO
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wasmtime
4
- VERSION = '0.1.0.alpha.1'
4
+ VERSION = '0.1.0.alpha.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wasmtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.alpha.1
4
+ version: 0.1.0.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cristofaro
@@ -10,7 +10,8 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2020-05-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description:
13
+ description: This gem allows you to use the Wasmtime WebAssembly runtime from within
14
+ your Ruby project.
14
15
  email:
15
16
  - david@dtcristo.com
16
17
  executables: []
@@ -40,7 +41,6 @@ homepage: https://github.com/dtcristo/wasmtime-ruby
40
41
  licenses:
41
42
  - Apache-2.0 WITH LLVM-exception
42
43
  metadata:
43
- homepage_uri: https://github.com/dtcristo/wasmtime-ruby
44
44
  source_code_uri: https://github.com/dtcristo/wasmtime-ruby
45
45
  post_install_message:
46
46
  rdoc_options: []
@@ -50,7 +50,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '0'
53
+ version: 2.5.0
54
54
  required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  requirements:
56
56
  - - ">"