wag 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.drone.yml +236 -0
- data/.rubocop.yml +4 -0
- data/.tool-versions +1 -0
- data/Gemfile +4 -4
- data/Gemfile.lock +49 -41
- data/LICENSE.md +151 -0
- data/README.md +14 -6
- data/lib/wag/data.rb +1 -1
- data/lib/wag/element.rb +1 -1
- data/lib/wag/export.rb +1 -1
- data/lib/wag/import.rb +1 -1
- data/lib/wag/instructions/br.rb +1 -0
- data/lib/wag/instructions/br_if.rb +1 -0
- data/lib/wag/instructions/br_table.rb +1 -0
- data/lib/wag/instructions/call.rb +1 -0
- data/lib/wag/instructions/f32/const.rb +1 -0
- data/lib/wag/instructions/f64/const.rb +1 -0
- data/lib/wag/instructions/global/get.rb +1 -0
- data/lib/wag/instructions/global/set.rb +1 -0
- data/lib/wag/instructions/i32/const.rb +1 -0
- data/lib/wag/instructions/i64/const.rb +1 -0
- data/lib/wag/instructions/local/get.rb +1 -0
- data/lib/wag/instructions/local/set.rb +1 -0
- data/lib/wag/instructions/local/tee.rb +1 -0
- data/lib/wag/module.rb +4 -4
- data/lib/wag/table.rb +1 -1
- data/lib/wag/version.rb +1 -1
- data/wag.gemspec +6 -5
- metadata +16 -14
- data/.gitlab-ci.yml +0 -32
- data/LICENSE.txt +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30c21f1ba14acb3d61fea66ffa2ea015613be821384a0089d9a25134604d8a7c
|
4
|
+
data.tar.gz: 4d91c48edfee56d1165e01d3f8beee1a7643af416b9af6875c3aa6deb9bc4c7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fcfddb6ddcd533e353f562d3b5931ffe14187bae0b1bea77360e06f8cf4cef1fd4f084f96021a26150a8549bc8ff42a129b7bdf8f6c2f5e3ecd248656a0901e
|
7
|
+
data.tar.gz: 13e8dee5c5eb8058d71c3511abecc0f5b968d2d4737da242471bb2a8ea8d2c0e2b0920bcd23985dcda9eac1ab4c525633a5fd9b02faf79ca49057a072039ea86
|
data/.drone.yml
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
kind: pipeline
|
2
|
+
type: docker
|
3
|
+
name: build
|
4
|
+
|
5
|
+
steps:
|
6
|
+
- name: restore ASDF cache
|
7
|
+
image: meltwater/drone-cache
|
8
|
+
pull: "always"
|
9
|
+
environment:
|
10
|
+
AWS_ACCESS_KEY_ID:
|
11
|
+
from_secret: ACCESS_KEY_ID
|
12
|
+
AWS_SECRET_ACCESS_KEY:
|
13
|
+
from_secret: SECRET_ACCESS_KEY
|
14
|
+
AWS_PLUGIN_PATH_STYLE: true
|
15
|
+
settings:
|
16
|
+
restore: true
|
17
|
+
endpoint:
|
18
|
+
from_secret: S3_ENDPOINT
|
19
|
+
bucket:
|
20
|
+
from_secret: CACHE_BUCKET
|
21
|
+
region: us-east-1
|
22
|
+
path-style: true
|
23
|
+
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
|
24
|
+
mount:
|
25
|
+
- .asdf
|
26
|
+
|
27
|
+
- name: restore bundle cache
|
28
|
+
image: meltwater/drone-cache
|
29
|
+
pull: "always"
|
30
|
+
environment:
|
31
|
+
AWS_ACCESS_KEY_ID:
|
32
|
+
from_secret: ACCESS_KEY_ID
|
33
|
+
AWS_SECRET_ACCESS_KEY:
|
34
|
+
from_secret: SECRET_ACCESS_KEY
|
35
|
+
AWS_PLUGIN_PATH_STYLE: true
|
36
|
+
settings:
|
37
|
+
restore: true
|
38
|
+
endpoint:
|
39
|
+
from_secret: S3_ENDPOINT
|
40
|
+
bucket:
|
41
|
+
from_secret: CACHE_BUCKET
|
42
|
+
region: us-east-1
|
43
|
+
path-style: true
|
44
|
+
cache_key: 'bundle-{{ checksum "Gemfile.lock" }}-{{ checksum ".tool-versions" }}'
|
45
|
+
mount:
|
46
|
+
- .bundle
|
47
|
+
|
48
|
+
- name: install dependencies
|
49
|
+
image: code.harton.nz/james/asdf_container:latest
|
50
|
+
pull: "always"
|
51
|
+
environment:
|
52
|
+
ASDF_DATA_DIR: /drone/src/.asdf
|
53
|
+
BUNDLE_CACHE_PATH: /drone/src/.bundle
|
54
|
+
depends_on:
|
55
|
+
- restore ASDF cache
|
56
|
+
- restore bundle cache
|
57
|
+
commands:
|
58
|
+
- apt-get update
|
59
|
+
- apt-get install -y wabt
|
60
|
+
- rm -rf /var/cache/apt
|
61
|
+
- mkdir -p bin
|
62
|
+
- cp -v /usr/bin/wat2wasm bin/
|
63
|
+
- cp -v /usr/bin/wasm-validate bin/
|
64
|
+
- asdf_install
|
65
|
+
- rm -rf .asdf/downloads
|
66
|
+
- asdf bundle install
|
67
|
+
|
68
|
+
- name: store ASDF cache
|
69
|
+
image: meltwater/drone-cache
|
70
|
+
pull: "always"
|
71
|
+
environment:
|
72
|
+
AWS_ACCESS_KEY_ID:
|
73
|
+
from_secret: ACCESS_KEY_ID
|
74
|
+
AWS_SECRET_ACCESS_KEY:
|
75
|
+
from_secret: SECRET_ACCESS_KEY
|
76
|
+
AWS_PLUGIN_PATH_STYLE: true
|
77
|
+
depends_on:
|
78
|
+
- install dependencies
|
79
|
+
settings:
|
80
|
+
rebuild: true
|
81
|
+
override: false
|
82
|
+
endpoint:
|
83
|
+
from_secret: S3_ENDPOINT
|
84
|
+
bucket:
|
85
|
+
from_secret: CACHE_BUCKET
|
86
|
+
region: us-east-1
|
87
|
+
path-style: true
|
88
|
+
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
|
89
|
+
mount:
|
90
|
+
- .asdf
|
91
|
+
|
92
|
+
- name: store bundle cache
|
93
|
+
image: meltwater/drone-cache
|
94
|
+
pull: "always"
|
95
|
+
environment:
|
96
|
+
AWS_ACCESS_KEY_ID:
|
97
|
+
from_secret: ACCESS_KEY_ID
|
98
|
+
AWS_SECRET_ACCESS_KEY:
|
99
|
+
from_secret: SECRET_ACCESS_KEY
|
100
|
+
AWS_PLUGIN_PATH_STYLE: true
|
101
|
+
depends_on:
|
102
|
+
- install dependencies
|
103
|
+
settings:
|
104
|
+
rebuild: true
|
105
|
+
override: false
|
106
|
+
endpoint:
|
107
|
+
from_secret: S3_ENDPOINT
|
108
|
+
bucket:
|
109
|
+
from_secret: CACHE_BUCKET
|
110
|
+
region: us-east-1
|
111
|
+
path-style: true
|
112
|
+
cache_key: 'bundle-{{ checksum "Gemfile.lock" }}-{{ checksum ".tool-versions" }}'
|
113
|
+
mount:
|
114
|
+
- .bundle
|
115
|
+
|
116
|
+
- name: store WABT cache
|
117
|
+
image: meltwater/drone-cache
|
118
|
+
pull: "always"
|
119
|
+
environment:
|
120
|
+
AWS_ACCESS_KEY_ID:
|
121
|
+
from_secret: ACCESS_KEY_ID
|
122
|
+
AWS_SECRET_ACCESS_KEY:
|
123
|
+
from_secret: SECRET_ACCESS_KEY
|
124
|
+
AWS_PLUGIN_PATH_STYLE: true
|
125
|
+
depends_on:
|
126
|
+
- install dependencies
|
127
|
+
settings:
|
128
|
+
rebuild: true
|
129
|
+
override: false
|
130
|
+
endpoint:
|
131
|
+
from_secret: S3_ENDPOINT
|
132
|
+
bucket:
|
133
|
+
from_secret: CACHE_BUCKET
|
134
|
+
region: us-east-1
|
135
|
+
path-style: true
|
136
|
+
cache_key: 'wabt'
|
137
|
+
mount:
|
138
|
+
- bin
|
139
|
+
|
140
|
+
---
|
141
|
+
|
142
|
+
kind: pipeline
|
143
|
+
type: docker
|
144
|
+
name: test
|
145
|
+
|
146
|
+
depends_on:
|
147
|
+
- build
|
148
|
+
|
149
|
+
steps:
|
150
|
+
- name: restore ASDF cache
|
151
|
+
image: meltwater/drone-cache
|
152
|
+
pull: "always"
|
153
|
+
environment:
|
154
|
+
AWS_ACCESS_KEY_ID:
|
155
|
+
from_secret: ACCESS_KEY_ID
|
156
|
+
AWS_SECRET_ACCESS_KEY:
|
157
|
+
from_secret: SECRET_ACCESS_KEY
|
158
|
+
AWS_PLUGIN_PATH_STYLE: true
|
159
|
+
settings:
|
160
|
+
restore: true
|
161
|
+
endpoint:
|
162
|
+
from_secret: S3_ENDPOINT
|
163
|
+
bucket:
|
164
|
+
from_secret: CACHE_BUCKET
|
165
|
+
region: us-east-1
|
166
|
+
path-style: true
|
167
|
+
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
|
168
|
+
mount:
|
169
|
+
- .asdf
|
170
|
+
|
171
|
+
- name: restore bundle cache
|
172
|
+
image: meltwater/drone-cache
|
173
|
+
pull: "always"
|
174
|
+
environment:
|
175
|
+
AWS_ACCESS_KEY_ID:
|
176
|
+
from_secret: ACCESS_KEY_ID
|
177
|
+
AWS_SECRET_ACCESS_KEY:
|
178
|
+
from_secret: SECRET_ACCESS_KEY
|
179
|
+
AWS_PLUGIN_PATH_STYLE: true
|
180
|
+
settings:
|
181
|
+
restore: true
|
182
|
+
endpoint:
|
183
|
+
from_secret: S3_ENDPOINT
|
184
|
+
bucket:
|
185
|
+
from_secret: CACHE_BUCKET
|
186
|
+
region: us-east-1
|
187
|
+
path-style: true
|
188
|
+
cache_key: 'bundle-{{ checksum "Gemfile.lock" }}-{{ checksum ".tool-versions" }}'
|
189
|
+
mount:
|
190
|
+
- .bundle
|
191
|
+
|
192
|
+
- name: restore WABT cache
|
193
|
+
image: meltwater/drone-cache
|
194
|
+
pull: "always"
|
195
|
+
environment:
|
196
|
+
AWS_ACCESS_KEY_ID:
|
197
|
+
from_secret: ACCESS_KEY_ID
|
198
|
+
AWS_SECRET_ACCESS_KEY:
|
199
|
+
from_secret: SECRET_ACCESS_KEY
|
200
|
+
AWS_PLUGIN_PATH_STYLE: true
|
201
|
+
settings:
|
202
|
+
restore: true
|
203
|
+
endpoint:
|
204
|
+
from_secret: S3_ENDPOINT
|
205
|
+
bucket:
|
206
|
+
from_secret: CACHE_BUCKET
|
207
|
+
region: us-east-1
|
208
|
+
path-style: true
|
209
|
+
cache_key: 'wabt'
|
210
|
+
mount:
|
211
|
+
- bin
|
212
|
+
|
213
|
+
- name: rubocop
|
214
|
+
image: code.harton.nz/james/asdf_container:latest
|
215
|
+
pull: "always"
|
216
|
+
environment:
|
217
|
+
BUNDLE_CACHE_PATH: /drone/src/.bundle
|
218
|
+
ASDF_DATA_DIR: /drone/src/.asdf
|
219
|
+
depends_on:
|
220
|
+
- restore ASDF cache
|
221
|
+
- restore bundle cache
|
222
|
+
commands:
|
223
|
+
- asdf bundle exec rubocop
|
224
|
+
|
225
|
+
- name: rspec
|
226
|
+
image: code.harton.nz/james/asdf_container:latest
|
227
|
+
pull: "always"
|
228
|
+
environment:
|
229
|
+
BUNDLE_CACHE_PATH: /drone/src/.bundle
|
230
|
+
ASDF_DATA_DIR: /drone/src/.asdf
|
231
|
+
depends_on:
|
232
|
+
- restore ASDF cache
|
233
|
+
- restore bundle cache
|
234
|
+
commands:
|
235
|
+
- export PATH=/drone/src/bin:$PATH
|
236
|
+
- asdf bundle exec rspec
|
data/.rubocop.yml
CHANGED
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.1.2
|
data/Gemfile
CHANGED
@@ -5,9 +5,9 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in wag.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem 'pry', '~> 0.
|
9
|
-
gem 'rake', '~>
|
8
|
+
gem 'pry', '~> 0.14.0'
|
9
|
+
gem 'rake', '~> 13.0'
|
10
10
|
gem 'rspec', '~> 3.0'
|
11
|
-
gem 'rubocop', '~>
|
11
|
+
gem 'rubocop', '~> 1.52.0'
|
12
12
|
|
13
|
-
gem 'faker', '~>
|
13
|
+
gem 'faker', '~> 3.0'
|
data/Gemfile.lock
CHANGED
@@ -1,66 +1,74 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
wag (0.
|
4
|
+
wag (0.2.1)
|
5
5
|
dry-inflector (~> 0.2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
ast (2.4.
|
11
|
-
coderay (1.1.
|
12
|
-
concurrent-ruby (1.
|
13
|
-
diff-lcs (1.
|
14
|
-
dry-inflector (0.2.
|
15
|
-
faker (2.
|
16
|
-
i18n (>= 1.
|
17
|
-
i18n (1.
|
10
|
+
ast (2.4.2)
|
11
|
+
coderay (1.1.3)
|
12
|
+
concurrent-ruby (1.2.2)
|
13
|
+
diff-lcs (1.5.0)
|
14
|
+
dry-inflector (0.2.1)
|
15
|
+
faker (3.2.0)
|
16
|
+
i18n (>= 1.8.11, < 2)
|
17
|
+
i18n (1.14.1)
|
18
18
|
concurrent-ruby (~> 1.0)
|
19
|
-
|
19
|
+
json (2.6.3)
|
20
20
|
method_source (1.0.0)
|
21
|
-
parallel (1.
|
22
|
-
parser (2.
|
23
|
-
ast (~> 2.4.
|
24
|
-
|
21
|
+
parallel (1.23.0)
|
22
|
+
parser (3.2.2.3)
|
23
|
+
ast (~> 2.4.1)
|
24
|
+
racc
|
25
|
+
pry (0.14.2)
|
25
26
|
coderay (~> 1.1)
|
26
27
|
method_source (~> 1.0)
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
rspec-
|
34
|
-
|
35
|
-
rspec-
|
36
|
-
rspec-
|
28
|
+
racc (1.7.1)
|
29
|
+
rainbow (3.1.1)
|
30
|
+
rake (13.0.6)
|
31
|
+
regexp_parser (2.8.1)
|
32
|
+
rexml (3.2.5)
|
33
|
+
rspec (3.12.0)
|
34
|
+
rspec-core (~> 3.12.0)
|
35
|
+
rspec-expectations (~> 3.12.0)
|
36
|
+
rspec-mocks (~> 3.12.0)
|
37
|
+
rspec-core (3.12.2)
|
38
|
+
rspec-support (~> 3.12.0)
|
39
|
+
rspec-expectations (3.12.3)
|
37
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
-
rspec-support (~> 3.
|
39
|
-
rspec-mocks (3.
|
41
|
+
rspec-support (~> 3.12.0)
|
42
|
+
rspec-mocks (3.12.5)
|
40
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-support (3.
|
43
|
-
rubocop (
|
44
|
-
|
44
|
+
rspec-support (~> 3.12.0)
|
45
|
+
rspec-support (3.12.0)
|
46
|
+
rubocop (1.52.1)
|
47
|
+
json (~> 2.3)
|
45
48
|
parallel (~> 1.10)
|
46
|
-
parser (>= 2.
|
49
|
+
parser (>= 3.2.2.3)
|
47
50
|
rainbow (>= 2.2.2, < 4.0)
|
48
|
-
|
51
|
+
regexp_parser (>= 1.8, < 3.0)
|
52
|
+
rexml (>= 3.2.5, < 4.0)
|
53
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
49
54
|
ruby-progressbar (~> 1.7)
|
50
|
-
unicode-display_width (>=
|
51
|
-
|
52
|
-
|
55
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
56
|
+
rubocop-ast (1.29.0)
|
57
|
+
parser (>= 3.2.1.0)
|
58
|
+
ruby-progressbar (1.13.0)
|
59
|
+
unicode-display_width (2.4.2)
|
53
60
|
|
54
61
|
PLATFORMS
|
55
|
-
|
62
|
+
arm64-darwin-22
|
63
|
+
x86_64-linux
|
56
64
|
|
57
65
|
DEPENDENCIES
|
58
|
-
faker (~>
|
59
|
-
pry (~> 0.
|
60
|
-
rake (~>
|
66
|
+
faker (~> 3.0)
|
67
|
+
pry (~> 0.14.0)
|
68
|
+
rake (~> 13.0)
|
61
69
|
rspec (~> 3.0)
|
62
|
-
rubocop (~>
|
70
|
+
rubocop (~> 1.52.0)
|
63
71
|
wag!
|
64
72
|
|
65
73
|
BUNDLED WITH
|
66
|
-
2.
|
74
|
+
2.3.7
|
data/LICENSE.md
ADDED
@@ -0,0 +1,151 @@
|
|
1
|
+
Copyright 2022 James Harton ("Licensor")
|
2
|
+
|
3
|
+
**HIPPOCRATIC LICENSE**
|
4
|
+
|
5
|
+
**Version 3.0, October 2021**
|
6
|
+
|
7
|
+
<https://firstdonoharm.dev/version/3/0/full.md>
|
8
|
+
|
9
|
+
**TERMS AND CONDITIONS**
|
10
|
+
|
11
|
+
TERMS AND CONDITIONS FOR USE, COPY, MODIFICATION, PREPARATION OF DERIVATIVE WORK, REPRODUCTION, AND DISTRIBUTION:
|
12
|
+
|
13
|
+
**[1.](#1) DEFINITIONS:**
|
14
|
+
|
15
|
+
_This section defines certain terms used throughout this license agreement._
|
16
|
+
|
17
|
+
[1.1.](#1.1) “License” means the terms and conditions, as stated herein, for use, copy, modification, preparation of derivative work, reproduction, and distribution of Software (as defined below).
|
18
|
+
|
19
|
+
[1.2.](#1.2) “Licensor” means the copyright and/or patent owner or entity authorized by the copyright and/or patent owner that is granting the License.
|
20
|
+
|
21
|
+
[1.3.](#1.3) “Licensee” means the individual or entity exercising permissions granted by this License, including the use, copy, modification, preparation of derivative work, reproduction, and distribution of Software (as defined below).
|
22
|
+
|
23
|
+
[1.4.](#1.4) “Software” means any copyrighted work, including but not limited to software code, authored by Licensor and made available under this License.
|
24
|
+
|
25
|
+
[1.5.](#1.5) “Supply Chain” means the sequence of processes involved in the production and/or distribution of a commodity, good, or service offered by the Licensee.
|
26
|
+
|
27
|
+
[1.6.](#1.6) “Supply Chain Impacted Party” or “Supply Chain Impacted Parties” means any person(s) directly impacted by any of Licensee’s Supply Chain, including the practices of all persons or entities within the Supply Chain prior to a good or service reaching the Licensee.
|
28
|
+
|
29
|
+
[1.7.](#1.7) “Duty of Care” is defined by its use in tort law, delict law, and/or similar bodies of law closely related to tort and/or delict law, including without limitation, a requirement to act with the watchfulness, attention, caution, and prudence that a reasonable person in the same or similar circumstances would use towards any Supply Chain Impacted Party.
|
30
|
+
|
31
|
+
[1.8.](#1.8) “Worker” is defined to include any and all permanent, temporary, and agency workers, as well as piece-rate, salaried, hourly paid, legal young (minors), part-time, night, and migrant workers.
|
32
|
+
|
33
|
+
**[2.](#2) INTELLECTUAL PROPERTY GRANTS:**
|
34
|
+
|
35
|
+
_This section identifies intellectual property rights granted to a Licensee_.
|
36
|
+
|
37
|
+
[2.1.](#2.1) _Grant of Copyright License_: Subject to the terms and conditions of this License, Licensor hereby grants to Licensee a worldwide, non-exclusive, no-charge, royalty-free copyright license to use, copy, modify, prepare derivative work, reproduce, or distribute the Software, Licensor authored modified software, or other work derived from the Software.
|
38
|
+
|
39
|
+
[2.2.](#2.2) _Grant of Patent License_: Subject to the terms and conditions of this License, Licensor hereby grants Licensee a worldwide, non-exclusive, no-charge, royalty-free patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer Software.
|
40
|
+
|
41
|
+
**[3.](#3) ETHICAL STANDARDS:**
|
42
|
+
|
43
|
+
_This section lists conditions the Licensee must comply with in order to have rights under this License._
|
44
|
+
|
45
|
+
The rights granted to the Licensee by this License are expressly made subject to the Licensee’s ongoing compliance with the following conditions:
|
46
|
+
|
47
|
+
* [3.1.](#3.1) The Licensee SHALL NOT, whether directly or indirectly, through agents or assigns:
|
48
|
+
* [3.1.1.](#3.1.1) Infringe upon any person’s right to life or security of person, engage in extrajudicial killings, or commit murder, without lawful cause (See Article 3, _United Nations Universal Declaration of Human Rights_; Article 6, _International Covenant on Civil and Political Rights_)
|
49
|
+
* [3.1.2.](#3.1.2) Hold any person in slavery, servitude, or forced labor (See Article 4, _United Nations Universal Declaration of Human Rights_; Article 8, _International Covenant on Civil and Political Rights_);
|
50
|
+
* [3.1.3.](#3.1.3) Contribute to the institution of slavery, slave trading, forced labor, or unlawful child labor (See Article 4, _United Nations Universal Declaration of Human Rights_; Article 8, _International Covenant on Civil and Political Rights_);
|
51
|
+
* [3.1.4.](#3.1.4) Torture or subject any person to cruel, inhumane, or degrading treatment or punishment (See Article 5, _United Nations Universal Declaration of Human Rights_; Article 7, _International Covenant on Civil and Political Rights_);
|
52
|
+
* [3.1.5.](#3.1.5) Discriminate on the basis of sex, gender, sexual orientation, race, ethnicity, nationality, religion, caste, age, medical disability or impairment, and/or any other like circumstances (See Article 7, _United Nations Universal Declaration of Human Rights_; Article 2, _International Covenant on Economic, Social and Cultural Rights_; Article 26, _International Covenant on Civil and Political Rights_);
|
53
|
+
* [3.1.6.](#3.1.6) Prevent any person from exercising his/her/their right to seek an effective remedy by a competent court or national tribunal (including domestic judicial systems, international courts, arbitration bodies, and other adjudicating bodies) for actions violating the fundamental rights granted to him/her/them by applicable constitutions, applicable laws, or by this License (See Article 8, _United Nations Universal Declaration of Human Rights_; Articles 9 and 14, _International Covenant on Civil and Political Rights_);
|
54
|
+
* [3.1.7.](#3.1.7) Subject any person to arbitrary arrest, detention, or exile (See Article 9, _United Nations Universal Declaration of Human Rights_; Article 9, _International Covenant on Civil and Political Rights_);
|
55
|
+
* [3.1.8.](#3.1.8) Subject any person to arbitrary interference with a person’s privacy, family, home, or correspondence without the express written consent of the person (See Article 12, _United Nations Universal Declaration of Human Rights_; Article 17, _International Covenant on Civil and Political Rights_);
|
56
|
+
* [3.1.9.](#3.1.9) Arbitrarily deprive any person of his/her/their property (See Article 17, _United Nations Universal Declaration of Human Rights_);
|
57
|
+
* [3.1.10.](#3.1.10) Forcibly remove indigenous peoples from their lands or territories or take any action with the aim or effect of dispossessing indigenous peoples from their lands, territories, or resources, including without limitation the intellectual property or traditional knowledge of indigenous peoples, without the free, prior, and informed consent of indigenous peoples concerned (See Articles 8 and 10, _United Nations Declaration on the Rights of Indigenous Peoples_);
|
58
|
+
* [3.1.11.](#3.1.11) _Fossil Fuel Divestment_: Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, on the [FFI Solutions Carbon Underground 200 list](https://www.ffisolutions.com/research-analytics-index-solutions/research-screening/the-carbon-underground-200/?cn-reloaded=1);
|
59
|
+
* [3.1.12.](#3.1.12) _Ecocide_: Commit ecocide:
|
60
|
+
* [3.1.12.1.](#3.1.12.1) For the purpose of this section, “ecocide” means unlawful or wanton acts committed with knowledge that there is a substantial likelihood of severe and either widespread or long-term damage to the environment being caused by those acts;
|
61
|
+
* [3.1.12.2.](#3.1.12.2) For the purpose of further defining ecocide and the terms contained in the previous paragraph:
|
62
|
+
* [3.1.12.2.1.](#3.1.12.2.1) “Wanton” means with reckless disregard for damage which would be clearly excessive in relation to the social and economic benefits anticipated;
|
63
|
+
* [3.1.12.2.2.](#3.1.12.2.2) “Severe” means damage which involves very serious adverse changes, disruption, or harm to any element of the environment, including grave impacts on human life or natural, cultural, or economic resources;
|
64
|
+
* [3.1.12.2.3.](#3.1.12.2.3) “Widespread” means damage which extends beyond a limited geographic area, crosses state boundaries, or is suffered by an entire ecosystem or species or a large number of human beings;
|
65
|
+
* [3.1.12.2.4.](#3.1.12.2.4) “Long-term” means damage which is irreversible or which cannot be redressed through natural recovery within a reasonable period of time; and
|
66
|
+
* [3.1.12.2.5.](#3.1.12.2.5) “Environment” means the earth, its biosphere, cryosphere, lithosphere, hydrosphere, and atmosphere, as well as outer space
|
67
|
+
(See Section II, _Independent Expert Panel for the Legal Definition of Ecocide_, Stop Ecocide Foundation and the Promise Institute for Human Rights at UCLA School of Law, June 2021);
|
68
|
+
* [3.1.13.](#3.1.13) _Extractive Industries_: Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, that engages in fossil fuel or mineral exploration, extraction, development, or sale;
|
69
|
+
* [3.1.14.](#3.1.14) _Boycott / Divestment / Sanctions_: Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, identified by the Boycott, Divestment, Sanctions (“BDS”) movement on its website (<https://bdsmovement.net/> and <https://bdsmovement.net/get-involved/what-to-boycott>) as a target for boycott;
|
70
|
+
* [3.1.15.](#3.1.15) _Taliban_: Be an individual or entity that:
|
71
|
+
* [3.1.15.1.](#3.1.15.1) engages in any commercial transactions with the Taliban; or
|
72
|
+
* [3.1.15.2.](#3.1.15.2) is a representative, agent, affiliate, successor, attorney, or assign of the Taliban;
|
73
|
+
* [3.1.16.](#3.1.16) _Myanmar_: Be an individual or entity that:
|
74
|
+
* [3.1.16.1.](#3.1.16.1) engages in any commercial transactions with the Myanmar/Burmese military junta; or
|
75
|
+
* [3.1.16.2.](#3.1.16.2) is a representative, agent, affiliate, successor, attorney, or assign of the Myanmar/Burmese government;
|
76
|
+
* [3.1.17.](#3.1.17) _Xinjiang Uygur Autonomous Region_: Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of any individual or entity, that does business in, purchases goods from, or otherwise benefits from goods produced in the Xinjiang Uygur Autonomous Region of China;
|
77
|
+
* [3.1.18.](#3.1.18) _US Tariff Act_: Be an individual or entity:
|
78
|
+
* [3.1.18.1.](#3.1.18.1) which U.S. Customs and Border Protection (CBP) has currently issued a Withhold Release Order (WRO) or finding against based on reasonable suspicion of forced labor; or
|
79
|
+
* [3.1.18.2.](#3.1.18.2) that is a representative, agent, affiliate, successor, attorney, or assign of an individual or entity that does business with an individual or entity which currently has a WRO or finding from CBP issued against it based on reasonable suspicion of forced labor;
|
80
|
+
* [3.1.19.](#3.1.19) _Mass Surveillance_: Be a government agency or multinational corporation, or a representative, agent, affiliate, successor, attorney, or assign of a government or multinational corporation, which participates in mass surveillance programs;
|
81
|
+
* [3.1.20.](#3.1.20) _Military Activities_: Be an entity or a representative, agent, affiliate, successor, attorney, or assign of an entity which conducts military activities;
|
82
|
+
* [3.1.21.](#3.1.21) _Law Enforcement_: Be an individual or entity, or a or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, that provides good or services to, or otherwise enters into any commercial contracts with, any local, state, or federal law enforcement agency;
|
83
|
+
* [3.1.22.](#3.1.22) _Media_: Be an individual or entity, or a or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, that broadcasts messages promoting killing, torture, or other forms of extreme violence;
|
84
|
+
* [3.1.23.](#3.1.23) Interfere with Workers' free exercise of the right to organize and associate (See Article 20, United Nations Universal Declaration of Human Rights; C087 - Freedom of Association and Protection of the Right to Organise Convention, 1948 (No. 87), International Labour Organization; Article 8, International Covenant on Economic, Social and Cultural Rights); and
|
85
|
+
* [3.1.24.](#3.1.24) Harm the environment in a manner inconsistent with local, state, national, or international law.
|
86
|
+
* [3.2.](#3.2) The Licensee SHALL:
|
87
|
+
* [3.2.1.](#3.2.1) _Social Auditing_: Only use social auditing mechanisms that adhere to Worker-Driven Social Responsibility Network’s Statement of Principles (<https://wsr-network.org/what-is-wsr/statement-of-principles/>) over traditional social auditing mechanisms, to the extent the Licensee uses any social auditing mechanisms at all;
|
88
|
+
* [3.2.2.](#3.2.2) _Workers on Board of Directors_: Ensure that if the Licensee has a Board of Directors, 30% of Licensee’s board seats are held by Workers paid no more than 200% of the compensation of the lowest paid Worker of the Licensee;
|
89
|
+
* [3.2.3.](#3.2.3) _Supply Chain_: Provide clear, accessible supply chain data to the public in accordance with the following conditions:
|
90
|
+
* [3.2.3.1.](#3.2.3.1) All data will be on Licensee’s website and/or, to the extent Licensee is a representative, agent, affiliate, successor, attorney, subsidiary, or assign, on Licensee’s principal’s or parent’s website or some other online platform accessible to the public via an internet search on a common internet search engine; and
|
91
|
+
* [3.2.3.2.](#3.2.3.2) Data published will include, where applicable, manufacturers, top tier suppliers, subcontractors, cooperatives, component parts producers, and farms;
|
92
|
+
* [3.2.4.](#3.2.4) Provide equal pay for equal work where the performance of such work requires equal skill, effort, and responsibility, and which are performed under similar working conditions, except where such payment is made pursuant to:
|
93
|
+
* [3.2.4.1.](#3.2.4.1) A seniority system;
|
94
|
+
* [3.2.4.2.](#3.2.4.2) A merit system;
|
95
|
+
* [3.2.4.3.](#3.2.4.3) A system which measures earnings by quantity or quality of production; or
|
96
|
+
* [3.2.4.4.](#3.2.4.4) A differential based on any other factor other than sex, gender, sexual orientation, race, ethnicity, nationality, religion, caste, age, medical disability or impairment, and/or any other like circumstances (See 29 U.S.C.A. § 206(d)(1); Article 23, _United Nations Universal Declaration of Human Rights_; Article 7, _International Covenant on Economic, Social and Cultural Rights_; Article 26, _International Covenant on Civil and Political Rights_); and
|
97
|
+
* [3.2.5.](#3.2.5) Allow for reasonable limitation of working hours and periodic holidays with pay (See Article 24, _United Nations Universal Declaration of Human Rights_; Article 7, _International Covenant on Economic, Social and Cultural Rights_).
|
98
|
+
|
99
|
+
**[4.](#4) SUPPLY CHAIN IMPACTED PARTIES:**
|
100
|
+
|
101
|
+
_This section identifies additional individuals or entities that a Licensee could harm as a result of violating the Ethical Standards section, the condition that the Licensee must voluntarily accept a Duty of Care for those individuals or entities, and the right to a private right of action that those individuals or entities possess as a result of violations of the Ethical Standards section._
|
102
|
+
|
103
|
+
[4.1.](#4.1) In addition to the above Ethical Standards, Licensee voluntarily accepts a Duty of Care for Supply Chain Impacted Parties of this License, including individuals and communities impacted by violations of the Ethical Standards. The Duty of Care is breached when a provision within the Ethical Standards section is violated by a Licensee, one of its successors or assigns, or by an individual or entity that exists within the Supply Chain prior to a good or service reaching the Licensee.
|
104
|
+
|
105
|
+
[4.2.](#4.2) Breaches of the Duty of Care, as stated within this section, shall create a private right of action, allowing any Supply Chain Impacted Party harmed by the Licensee to take legal action against the Licensee in accordance with applicable negligence laws, whether they be in tort law, delict law, and/or similar bodies of law closely related to tort and/or delict law, regardless if Licensee is directly responsible for the harms suffered by a Supply Chain Impacted Party. Nothing in this section shall be interpreted to include acts committed by individuals outside of the scope of his/her/their employment.
|
106
|
+
|
107
|
+
[5.](#5) **NOTICE:** _This section explains when a Licensee must notify others of the License._
|
108
|
+
|
109
|
+
[5.1.](#5.1) _Distribution of Notice_: Licensee must ensure that everyone who receives a copy of or uses any part of Software from Licensee, with or without changes, also receives the License and the copyright notice included with Software (and if included by the Licensor, patent, trademark, and attribution notice). Licensee must ensure that License is prominently displayed so that any individual or entity seeking to download, copy, use, or otherwise receive any part of Software from Licensee is notified of this License and its terms and conditions. Licensee must cause any modified versions of the Software to carry prominent notices stating that Licensee changed the Software.
|
110
|
+
|
111
|
+
[5.2.](#5.2) _Modified Software_: Licensee is free to create modifications of the Software and distribute only the modified portion created by Licensee, however, any derivative work stemming from the Software or its code must be distributed pursuant to this License, including this Notice provision.
|
112
|
+
|
113
|
+
[5.3.](#5.3) _Recipients as Licensees_: Any individual or entity that uses, copies, modifies, reproduces, distributes, or prepares derivative work based upon the Software, all or part of the Software’s code, or a derivative work developed by using the Software, including a portion of its code, is a Licensee as defined above and is subject to the terms and conditions of this License.
|
114
|
+
|
115
|
+
**[6.](#6) REPRESENTATIONS AND WARRANTIES:**
|
116
|
+
|
117
|
+
[6.1.](#6.1) _Disclaimer of Warranty_: TO THE FULL EXTENT ALLOWED BY LAW, THIS SOFTWARE COMES “AS IS,” WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED, AND LICENSOR SHALL NOT BE LIABLE TO ANY PERSON OR ENTITY FOR ANY DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THIS LICENSE, UNDER ANY LEGAL CLAIM.
|
118
|
+
|
119
|
+
[6.2.](#6.2) _Limitation of Liability_: LICENSEE SHALL HOLD LICENSOR HARMLESS AGAINST ANY AND ALL CLAIMS, DEBTS, DUES, LIABILITIES, LIENS, CAUSES OF ACTION, DEMANDS, OBLIGATIONS, DISPUTES, DAMAGES, LOSSES, EXPENSES, ATTORNEYS' FEES, COSTS, LIABILITIES, AND ALL OTHER CLAIMS OF EVERY KIND AND NATURE WHATSOEVER, WHETHER KNOWN OR UNKNOWN, ANTICIPATED OR UNANTICIPATED, FORESEEN OR UNFORESEEN, ACCRUED OR UNACCRUED, DISCLOSED OR UNDISCLOSED, ARISING OUT OF OR RELATING TO LICENSEE’S USE OF THE SOFTWARE. NOTHING IN THIS SECTION SHOULD BE INTERPRETED TO REQUIRE LICENSEE TO INDEMNIFY LICENSOR, NOR REQUIRE LICENSOR TO INDEMNIFY LICENSEE.
|
120
|
+
|
121
|
+
**[7.](#7) TERMINATION**
|
122
|
+
|
123
|
+
[7.1.](#7.1) _Violations of Ethical Standards or Breaching Duty of Care_: If Licensee violates the Ethical Standards section or Licensee, or any other person or entity within the Supply Chain prior to a good or service reaching the Licensee, breaches its Duty of Care to Supply Chain Impacted Parties, Licensee must remedy the violation or harm caused by Licensee within 30 days of being notified of the violation or harm. If Licensee fails to remedy the violation or harm within 30 days, all rights in the Software granted to Licensee by License will be null and void as between Licensor and Licensee.
|
124
|
+
|
125
|
+
[7.2.](#7.2) _Failure of Notice_: If any person or entity notifies Licensee in writing that Licensee has not complied with the Notice section of this License, Licensee can keep this License by taking all practical steps to comply within 30 days after the notice of noncompliance. If Licensee does not do so, Licensee’s License (and all rights licensed hereunder) will end immediately.
|
126
|
+
|
127
|
+
[7.3.](#7.3) _Judicial Findings_: In the event Licensee is found by a civil, criminal, administrative, or other court of competent jurisdiction, or some other adjudicating body with legal authority, to have committed actions which are in violation of the Ethical Standards or Supply Chain Impacted Party sections of this License, all rights granted to Licensee by this License will terminate immediately.
|
128
|
+
|
129
|
+
[7.4.](#7.4) _Patent Litigation_: If Licensee institutes patent litigation against any entity (including a cross-claim or counterclaim in a suit) alleging that the Software, all or part of the Software’s code, or a derivative work developed using the Software, including a portion of its code, constitutes direct or contributory patent infringement, then any patent license, along with all other rights, granted to Licensee under this License will terminate as of the date such litigation is filed.
|
130
|
+
|
131
|
+
[7.5.](#7.5) _Additional Remedies_: Termination of the License by failing to remedy harms in no way prevents Licensor or Supply Chain Impacted Party from seeking appropriate remedies at law or in equity.
|
132
|
+
|
133
|
+
**[8.](#8) MISCELLANEOUS:**
|
134
|
+
|
135
|
+
[8.1.](#8.1) _Conditions_: Sections 3, 4.1, 5.1, 5.2, 7.1, 7.2, 7.3, and 7.4 are conditions of the rights granted to Licensee in the License.
|
136
|
+
|
137
|
+
[8.2.](#8.2) _Equitable Relief_: Licensor and any Supply Chain Impacted Party shall be entitled to equitable relief, including injunctive relief or specific performance of the terms hereof, in addition to any other remedy to which they are entitled at law or in equity.
|
138
|
+
|
139
|
+
[8.3.](#8.3) _Copyleft_: Modified software, source code, or other derivative work must be licensed, in its entirety, under the exact same conditions as this License.
|
140
|
+
|
141
|
+
[8.4.](#8.4) _Severability_: If any term or provision of this License is determined to be invalid, illegal, or unenforceable by a court of competent jurisdiction, any such determination of invalidity, illegality, or unenforceability shall not affect any other term or provision of this License or invalidate or render unenforceable such term or provision in any other jurisdiction. If the determination of invalidity, illegality, or unenforceability by a court of competent jurisdiction pertains to the terms or provisions contained in the Ethical Standards section of this License, all rights in the Software granted to Licensee shall be deemed null and void as between Licensor and Licensee.
|
142
|
+
|
143
|
+
[8.5.](#8.5) _Section Titles_: Section titles are solely written for organizational purposes and should not be used to interpret the language within each section.
|
144
|
+
|
145
|
+
[8.6.](#8.6) _Citations_: Citations are solely written to provide context for the source of the provisions in the Ethical Standards.
|
146
|
+
|
147
|
+
[8.7.](#8.7) _Section Summaries_: Some sections have a brief _italicized description_ which is provided for the sole purpose of briefly describing the section and should not be used to interpret the terms of the License.
|
148
|
+
|
149
|
+
[8.8.](#8.8) _Entire License_: This is the entire License between the Licensor and Licensee with respect to the claims released herein and that the consideration stated herein is the only consideration or compensation to be paid or exchanged between them for this License. This License cannot be modified or amended except in a writing signed by Licensor and Licensee.
|
150
|
+
|
151
|
+
[8.9.](#8.9) _Successors and Assigns_: This License shall be binding upon and inure to the benefit of the Licensor’s and Licensee’s respective heirs, successors, and assigns.
|
data/README.md
CHANGED
@@ -7,8 +7,8 @@ It is closely modeled after WAT, the WebAssembly text format, and at this stage
|
|
7
7
|
generates WAT and compiles and validates it using [the WebAssembly Binary Toolkit][1].
|
8
8
|
|
9
9
|
Due to the flexibility of WAT this library is very flexible in what structures
|
10
|
-
it allows you to create.
|
11
|
-
valid WASM.
|
10
|
+
it allows you to create. Be aware that you can build modules which are not
|
11
|
+
valid WASM. Always validate your modules by using `#to_wasm.valid?`.
|
12
12
|
|
13
13
|
## Keyword conflict
|
14
14
|
|
@@ -20,7 +20,7 @@ of `public_send`, etc.
|
|
20
20
|
## Folding
|
21
21
|
|
22
22
|
WAG supports generating both the "folded" and "unfolded" variants of the WAT
|
23
|
-
language.
|
23
|
+
language. As an example here are two implementations of Euclid's Greatest
|
24
24
|
Common Divisor algorithm:
|
25
25
|
|
26
26
|
### Example of unfolded generation
|
@@ -68,6 +68,7 @@ end
|
|
68
68
|
```
|
69
69
|
|
70
70
|
### Example of folded generation
|
71
|
+
|
71
72
|
```ruby
|
72
73
|
folded = WAG::Module.new.build do
|
73
74
|
func(:gcd) do
|
@@ -154,7 +155,6 @@ Or install it yourself as:
|
|
154
155
|
|
155
156
|
$ gem install wag
|
156
157
|
|
157
|
-
|
158
158
|
## Development
|
159
159
|
|
160
160
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -163,8 +163,16 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
163
163
|
|
164
164
|
## Contributing
|
165
165
|
|
166
|
-
Bug reports and pull requests are welcome
|
166
|
+
Bug reports and pull requests are welcome at https://code.harton.nz/james/wag.
|
167
167
|
|
168
168
|
## License
|
169
169
|
|
170
|
-
|
170
|
+
This software is licensed under the terms of the
|
171
|
+
[HL3-FULL](https://firstdonoharm.dev), see the `LICENSE.md` file included with
|
172
|
+
this package for the terms.
|
173
|
+
|
174
|
+
This license actively proscribes this software being used by and for some
|
175
|
+
industries, countries and activities. If your usage of this software doesn't
|
176
|
+
comply with the terms of this license, then [contact me](mailto:james@harton.nz)
|
177
|
+
with the details of your use-case to organise the purchase of a license - the
|
178
|
+
cost of which may include a donation to a suitable charity or NGO.
|
data/lib/wag/data.rb
CHANGED
data/lib/wag/element.rb
CHANGED
data/lib/wag/export.rb
CHANGED
data/lib/wag/import.rb
CHANGED
data/lib/wag/instructions/br.rb
CHANGED
data/lib/wag/module.rb
CHANGED
@@ -16,8 +16,8 @@ module WAG
|
|
16
16
|
@types = []
|
17
17
|
end
|
18
18
|
|
19
|
-
def build(&
|
20
|
-
instance_exec(&
|
19
|
+
def build(&)
|
20
|
+
instance_exec(&)
|
21
21
|
self
|
22
22
|
end
|
23
23
|
|
@@ -76,14 +76,14 @@ module WAG
|
|
76
76
|
func
|
77
77
|
end
|
78
78
|
|
79
|
-
def table(elements, type = :
|
79
|
+
def table(elements, type = :funcref, &block)
|
80
80
|
table = Table.new(elements, type)
|
81
81
|
@tables << table
|
82
82
|
table.instance_exec(&block) if block
|
83
83
|
table
|
84
84
|
end
|
85
85
|
|
86
|
-
def to_sexpr # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
86
|
+
def to_sexpr # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
87
87
|
mod = [:module]
|
88
88
|
mod.concat(@imports.map(&:to_sexpr))
|
89
89
|
mod.concat(@exports.map(&:to_sexpr))
|
data/lib/wag/table.rb
CHANGED
data/lib/wag/version.rb
CHANGED
data/wag.gemspec
CHANGED
@@ -6,19 +6,19 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'wag'
|
7
7
|
spec.version = WAG::VERSION
|
8
8
|
spec.authors = ['James Harton']
|
9
|
-
spec.email = ['james@
|
9
|
+
spec.email = ['james@harton.nz']
|
10
10
|
|
11
11
|
spec.summary = 'WebAssembly Generator'
|
12
12
|
spec.description = 'Generate and compile WebAssembly code from Ruby'
|
13
|
-
spec.homepage = 'https://
|
13
|
+
spec.homepage = 'https://code.harton.nz/james/wag'
|
14
14
|
spec.license = 'Hippocratic'
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.1')
|
16
16
|
|
17
17
|
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
18
18
|
|
19
19
|
spec.metadata['homepage_uri'] = spec.homepage
|
20
|
-
spec.metadata['source_code_uri'] = 'https://
|
21
|
-
spec.metadata['changelog_uri'] = 'https://
|
20
|
+
spec.metadata['source_code_uri'] = 'https://code.harton.nz/james/wag'
|
21
|
+
spec.metadata['changelog_uri'] = 'https://code.harton.nz/james/wag'
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released. The `git
|
24
24
|
# ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -32,4 +32,5 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.require_paths = ['lib']
|
33
33
|
|
34
34
|
spec.add_runtime_dependency('dry-inflector', '~> 0.2.0')
|
35
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
35
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Harton
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-inflector
|
@@ -26,19 +26,20 @@ dependencies:
|
|
26
26
|
version: 0.2.0
|
27
27
|
description: Generate and compile WebAssembly code from Ruby
|
28
28
|
email:
|
29
|
-
- james@
|
29
|
+
- james@harton.nz
|
30
30
|
executables: []
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
+
- ".drone.yml"
|
34
35
|
- ".gitignore"
|
35
|
-
- ".gitlab-ci.yml"
|
36
36
|
- ".rspec"
|
37
37
|
- ".rubocop.yml"
|
38
|
+
- ".tool-versions"
|
38
39
|
- ".travis.yml"
|
39
40
|
- Gemfile
|
40
41
|
- Gemfile.lock
|
41
|
-
- LICENSE.
|
42
|
+
- LICENSE.md
|
42
43
|
- README.md
|
43
44
|
- Rakefile
|
44
45
|
- bin/console
|
@@ -270,14 +271,15 @@ files:
|
|
270
271
|
- lib/wag/wasm.rb
|
271
272
|
- lib/wag/wat.rb
|
272
273
|
- wag.gemspec
|
273
|
-
homepage: https://
|
274
|
+
homepage: https://code.harton.nz/james/wag
|
274
275
|
licenses:
|
275
276
|
- Hippocratic
|
276
277
|
metadata:
|
277
|
-
homepage_uri: https://
|
278
|
-
source_code_uri: https://
|
279
|
-
changelog_uri: https://
|
280
|
-
|
278
|
+
homepage_uri: https://code.harton.nz/james/wag
|
279
|
+
source_code_uri: https://code.harton.nz/james/wag
|
280
|
+
changelog_uri: https://code.harton.nz/james/wag
|
281
|
+
rubygems_mfa_required: 'true'
|
282
|
+
post_install_message:
|
281
283
|
rdoc_options: []
|
282
284
|
require_paths:
|
283
285
|
- lib
|
@@ -285,15 +287,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
285
287
|
requirements:
|
286
288
|
- - ">="
|
287
289
|
- !ruby/object:Gem::Version
|
288
|
-
version:
|
290
|
+
version: '3.1'
|
289
291
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
290
292
|
requirements:
|
291
293
|
- - ">="
|
292
294
|
- !ruby/object:Gem::Version
|
293
295
|
version: '0'
|
294
296
|
requirements: []
|
295
|
-
rubygems_version: 3.
|
296
|
-
signing_key:
|
297
|
+
rubygems_version: 3.3.7
|
298
|
+
signing_key:
|
297
299
|
specification_version: 4
|
298
300
|
summary: WebAssembly Generator
|
299
301
|
test_files: []
|
data/.gitlab-ci.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
image: ruby:latest
|
2
|
-
|
3
|
-
stages:
|
4
|
-
- test
|
5
|
-
- release
|
6
|
-
|
7
|
-
before_script:
|
8
|
-
- apt-get update && apt-get install wabt && rm -rf /var/cache/apt
|
9
|
-
- bundle install
|
10
|
-
|
11
|
-
test:
|
12
|
-
stage: test
|
13
|
-
script:
|
14
|
-
- bundle exec rspec
|
15
|
-
|
16
|
-
rubocop:
|
17
|
-
stage: test
|
18
|
-
script:
|
19
|
-
- bundle exec rspec
|
20
|
-
|
21
|
-
release:
|
22
|
-
stage: release
|
23
|
-
only:
|
24
|
-
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
25
|
-
except:
|
26
|
-
- branches
|
27
|
-
script:
|
28
|
-
- gem build
|
29
|
-
artifacts:
|
30
|
-
name: "wag-$CI_COMMIT_TAG.gem"
|
31
|
-
paths:
|
32
|
-
- wag-*.gem
|
data/LICENSE.txt
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
Copyright 2020 James Harton
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
4
|
-
this software and associated documentation files (the "Software"), to deal in
|
5
|
-
the Software without restriction, including without limitation the rights to
|
6
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
7
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
8
|
-
subject to the following conditions:
|
9
|
-
|
10
|
-
* The above copyright notice and this permission notice shall be included in all
|
11
|
-
copies or substantial portions of the Software.
|
12
|
-
|
13
|
-
* No Harm: The software may not be used by anyone for systems or activities that
|
14
|
-
actively and knowingly endanger, harm, or otherwise threaten the physical,
|
15
|
-
mental, economic, or general well-being of other individuals or groups, in
|
16
|
-
violation of the United Nations Universal Declaration of Human Rights
|
17
|
-
(https://www.un.org/en/universal-declaration-human-rights/).
|
18
|
-
|
19
|
-
* Services: If the Software is used to provide a service to others, the licensee
|
20
|
-
shall, as a condition of use, require those others not to use the service in any
|
21
|
-
way that violates the No Harm clause above.
|
22
|
-
|
23
|
-
* Enforceability: If any portion or provision of this License shall to any
|
24
|
-
extent be declared illegal or unenforceable by a court of competent
|
25
|
-
jurisdiction, then the remainder of this License, or the application of such
|
26
|
-
portion or provision in circumstances other than those as to which it is so
|
27
|
-
declared illegal or unenforceable, shall not be affected thereby, and each
|
28
|
-
portion and provision of this Agreement shall be valid and enforceable to the
|
29
|
-
fullest extent permitted by law.
|
30
|
-
|
31
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
32
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
33
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
34
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
35
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
36
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
37
|
-
|
38
|
-
This Hippocratic License is an Ethical Source license
|
39
|
-
(https://ethicalsource.dev) derived from the MIT License, amended to limit the
|
40
|
-
impact of the unethical use of open source software.
|