Skip to content

Commit 686d9cf

Browse files
committed
Merge branch 'wasm-3.0' into wasm-3.0+addr64
2 parents d7ba933 + 87789ff commit 686d9cf

File tree

13 files changed

+271
-79
lines changed

13 files changed

+271
-79
lines changed

.github/workflows/ci-interpreter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout repo
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
- name: Setup OCaml
22-
uses: ocaml/setup-ocaml@v2
22+
uses: ocaml/setup-ocaml@v3
2323
with:
2424
ocaml-compiler: 4.14.x
2525
- name: Setup OCaml tools
2626
run: opam install --yes ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
2727
- name: Setup Node.js
28-
uses: actions/setup-node@v2
28+
uses: actions/setup-node@v4
2929
with:
3030
node-version: 20.x
3131
- name: Build interpreter

.github/workflows/ci-spec.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout repo
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
with:
2222
submodules: "recursive"
2323
- name: Setup Node.js
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: 16
2727
- name: Setup Bikeshed
@@ -44,7 +44,7 @@ jobs:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Checkout repo
47-
uses: actions/checkout@v2
47+
uses: actions/checkout@v4
4848
- name: Setup Bikeshed
4949
run: pip install bikeshed && bikeshed update
5050
- name: Run Bikeshed
@@ -59,7 +59,7 @@ jobs:
5959
runs-on: ubuntu-latest
6060
steps:
6161
- name: Checkout repo
62-
uses: actions/checkout@v2
62+
uses: actions/checkout@v4
6363
- name: Setup Bikeshed
6464
run: pip install bikeshed && bikeshed update
6565
- name: Run Bikeshed
@@ -128,7 +128,7 @@ jobs:
128128
runs-on: ubuntu-latest
129129
steps:
130130
- name: Checkout repo
131-
uses: actions/checkout@v2
131+
uses: actions/checkout@v4
132132
- name: Upload artifacts
133133
uses: actions/upload-artifact@v4
134134
with:
@@ -147,7 +147,7 @@ jobs:
147147
- build-spec-versions
148148
steps:
149149
- name: Checkout repo
150-
uses: actions/checkout@v2
150+
uses: actions/checkout@v4
151151
- name: Create output directory
152152
run: mkdir _output && cp document/index.html _output/index.html
153153
- name: Download core spec artifact
@@ -187,7 +187,7 @@ jobs:
187187
path: _output/versions
188188
- name: Publish to GitHub Pages
189189
if: github.ref == 'refs/heads/main'
190-
uses: peaceiris/actions-gh-pages@v3
190+
uses: peaceiris/actions-gh-pages@v4
191191
with:
192192
publish_dir: ./_output
193193
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/w3c-publish.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
name: Publish to W3C TR space
1+
name: Validate/Publish to W3C TR space
22

33
on:
44
push:
55
branches: [ main ]
66
paths: [ .github/**, document/** ]
7+
pull_request:
8+
paths: [ .github/**, document/** ]
79

810
# Allows you to run this workflow manually from the Actions tab, gh CLI tool,
911
# or REST API. THe w3c-status options correspond to the valid options for
@@ -23,30 +25,45 @@ on:
2325
- CRD
2426
- CR
2527

28+
env:
29+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
30+
W3C_STATUS: ${{ github.event_name == 'workflow_dispatch' && inputs.w3c-status || 'WD' }}
31+
2632
jobs:
2733
publish-to-w3c-TR:
28-
if: github.repository == 'WebAssembly/spec'
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
spec: [core, js-api, web-api]
2938
runs-on: ubuntu-latest
3039
steps:
3140
- name: Checkout repo
32-
uses: actions/checkout@v2
41+
uses: actions/checkout@v4
3342
with:
3443
submodules: "recursive"
3544
- name: Setup Node.js
36-
uses: actions/setup-node@v3
45+
uses: actions/setup-node@v4
3746
with:
3847
node-version: 16
3948
- name: Setup Bikeshed
4049
run: pip install bikeshed && bikeshed update
4150
- name: Setup TexLive
51+
if: ${{ matrix.spec == 'core' }}
4252
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
4353
- name: Setup Sphinx
54+
if: ${{ matrix.spec == 'core' }}
4455
run: pip install six && pip install sphinx==5.1.0
45-
- name: Publish all specs to their https://www.w3.org/TR/ URLs
46-
run: cd document && make -e WD-echidna-CI
56+
- name: Publish ${{ matrix.spec }} spec to its https://www.w3.org/TR/ URL
57+
if: env.W3C_ECHIDNA_TOKEN_CORE
58+
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna-CI
4759
env:
48-
W3C_STATUS: ${{ github.event_name == 'push' && 'CRD' || inputs.w3c-status }}
4960
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
5061
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
5162
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
52-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
63+
ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }}
64+
- name: Validate ${{ matrix.spec }} spec with Echidna
65+
if: env.W3C_USERNAME
66+
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna
67+
env:
68+
W3C_USERNAME: ${{ secrets.W3C_USERNAME }}
69+
W3C_PASSWORD: ${{ secrets.W3C_PASSWORD }}

document/core/Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ NAME = WebAssembly
1313
DECISION_URL = https://github.com/WebAssembly/meetings/blob/main/main/2024/WG-06-12.md
1414
TAR = tar
1515
DEADLINE = $(shell date -d "+30 days" +%Y-%m-%d 2>/dev/null || date -v +30d +%Y-%m-%d)
16+
ECHIDNA_DRYRUN = true
1617

1718
# Internal variables.
1819
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -196,9 +197,11 @@ WD-echidna: WD-tar
196197
curl 'https://labs.w3.org/echidna/api/request' \
197198
--user '$(W3C_USERNAME):$(W3C_PASSWORD)' \
198199
-F "tar=@$(BUILDDIR)/WD.tar" \
199-
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
200+
-F "decision=$(DECISION_URL)" \
201+
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
202+
python3 ../util/check-echidna-status.py $(BUILDDIR)
200203
@echo
201-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
204+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
202205

203206
.PHONY: WD-echidna-CI
204207
WD-echidna-CI: WD-tar
@@ -210,9 +213,11 @@ WD-echidna-CI: WD-tar
210213
curl 'https://labs.w3.org/echidna/api/request' \
211214
-F "tar=@$(BUILDDIR)/WD.tar" \
212215
-F "token=$(W3C_ECHIDNA_TOKEN_CORE)" \
213-
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
216+
-F "decision=$(DECISION_URL)" \
217+
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
218+
python3 ../util/check-echidna-status.py $(BUILDDIR)
214219
@echo
215-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
220+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
216221

217222
.PHONY: diff
218223
diff: bikeshed

document/core/exec/modules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ and list of :ref:`reference <syntax-ref>` vectors for the module's :ref:`element
441441

442442
24. Let :math:`\exportinst^\ast` be the concatenation of the :ref:`export instances <syntax-exportinst>` :math:`\exportinst_i` in index order.
443443

444-
25. Let :math:`\moduleinst` be the :ref:`module instance <syntax-moduleinst>` :math:`\{\MITYPES~\deftype^\ast,` :math:`\MIFUNCS~\funcaddr_{\F{mod}}^\ast,` :math:`\MITABLES~\tableaddr_{\F{mod}}^\ast,` :math:`\MIMEMS~\memaddr_{\F{mod}}^\ast,` :math:`\MIGLOBALS~\globaladdr_{\F{mod}}^\ast,` :math:`\MITAGS~\tagaddr_{\F{mod}}^\ast`, :math:`\MIEXPORTS~\exportinst^\ast\}`.
444+
25. Let :math:`\moduleinst` be the :ref:`module instance <syntax-moduleinst>` :math:`\{\MITYPES~\deftype^\ast,` :math:`\MIFUNCS~\funcaddr_{\F{mod}}^\ast,` :math:`\MITABLES~\tableaddr_{\F{mod}}^\ast,` :math:`\MIMEMS~\memaddr_{\F{mod}}^\ast,` :math:`\MIGLOBALS~\globaladdr_{\F{mod}}^\ast,` :math:`\MITAGS~\tagaddr_{\F{mod}}^\ast`, :math:`\MIELEMS~\elemaddr^\ast,` :math:`\MIDATAS~\dataaddr^\ast,` :math:`\MIEXPORTS~\exportinst^\ast\}`.
445445

446446
26. Return :math:`\moduleinst`.
447447

document/core/util/bikeshed_fixup.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212
def Main():
1313
data = open(sys.argv[1]).read()
1414

15-
# Make bikeshed happy
16-
# Apparently it can't handle empty line before DOCTYPE comment
17-
data = data.replace('\n<!DOCTYPE', '<!DOCTYPE')
18-
# Ensure newline before <pre>
19-
data = data.replace('<pre>', '\n<pre>')
15+
# Clean up the input for Bikeshed
2016

2117
# Don't add more than 3 levels to TOC.
2218
data = data.replace('<h5>', '<h5 class="no-toc">')
@@ -34,7 +30,8 @@ def Main():
3430
'Validation Algorithm',
3531
'Custom Sections',
3632
'Soundness',
37-
'Changes',
33+
'Type System Properties',
34+
'Change History',
3835
'Index of Types',
3936
'Index of Instructions',
4037
'Index of Semantic Rules']:
@@ -43,18 +40,6 @@ def Main():
4340
'<h3>A.' + str(number) + ' ' + section + '</h3>')
4441
number += 1
4542

46-
47-
# Drop spurious navigation.
48-
data = data.replace(
49-
"""
50-
<div class="related" role="navigation" aria-label="related navigation">
51-
<h3>Navigation</h3>
52-
<ul>
53-
<li class="nav-item nav-item-0"><a href="#">WebAssembly 1.1</a> &#187;</li>
54-
<li class="nav-item nav-item-this"><a href="">WebAssembly 1.1</a></li>
55-
</ul>
56-
</div> """, '')
57-
5843
# Use bikeshed biblio references for unicode and IEEE754
5944
data = data.replace(
6045
"""<a class="reference external" href="https://www.unicode.org/versions/latest/">Unicode</a>""",
@@ -88,6 +73,9 @@ def Main():
8873
r'\1',
8974
data, flags=re.DOTALL)
9075

76+
# Escape some latex sequences that Bikeshed interprets as macros
77+
data = data.replace(r' \\[1ex]', r' \&#x5c;\[1ex]')
78+
9179
sys.stdout.write(data)
9280

9381
Main()

document/js-api/Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ NAME = WebAssembly
66
DECISION_URL = https://github.com/WebAssembly/meetings/blob/main/main/2024/WG-06-12.md
77
TAR = tar
88
DEADLINE = $(shell date -d "+30 days" +%Y-%m-%d 2>/dev/null || date -v +30d +%Y-%m-%d)
9+
ECHIDNA_DRYRUN = true
910

1011
.PHONY: all
1112
all:
@@ -35,7 +36,6 @@ diff: all
3536
# macOS tar has no “--transform” option (only GNU tar does), so on macOS,
3637
# do “brew install tar” & run “make” like this: “TAR=gtar make -e WD-tar”
3738
WD-tar: all
38-
bikeshed spec --md-status=$(W3C_STATUS) --md-deadline=$(DEADLINE) index.bs $(BUILDDIR)/html/index.html
3939
$(TAR) -C $(BUILDDIR)/html --transform="s/index.html/Overview.html/" -cf $(BUILDDIR)/WD.tar index.html
4040
@echo "Built $(BUILDDIR)/WD.tar."
4141

@@ -50,7 +50,11 @@ WD-echidna: WD-tar
5050
curl 'https://labs.w3.org/echidna/api/request' \
5151
--user '$(W3C_USERNAME):$(W3C_PASSWORD)' \
5252
-F "tar=@$(BUILDDIR)/WD.tar" \
53-
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
53+
-F "decision=$(DECISION_URL)" \
54+
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
55+
python3 ../util/check-echidna-status.py $(BUILDDIR)
56+
@echo
57+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
5458

5559
.PHONY: WD-echidna-CI
5660
WD-echidna-CI: WD-tar
@@ -62,6 +66,8 @@ WD-echidna-CI: WD-tar
6266
curl 'https://labs.w3.org/echidna/api/request' \
6367
-F "tar=@$(BUILDDIR)/WD.tar" \
6468
-F "token=$(W3C_ECHIDNA_TOKEN_JSAPI)" \
65-
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
69+
-F "decision=$(DECISION_URL)" \
70+
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
71+
python3 ../util/check-echidna-status.py $(BUILDDIR)
6672
@echo
67-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
73+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"

0 commit comments

Comments
 (0)