Skip to content

Commit cccc16b

Browse files
committed
Merge remote-tracking branch 'upstream/wasm-3.0'
2 parents 98953e8 + 9b20411 commit cccc16b

File tree

338 files changed

+47754
-6006
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

338 files changed

+47754
-6006
lines changed

.github/workflows/ci-interpreter.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: CI for interpreter & tests
33
on:
44
push:
55
branches: [ main ]
6-
paths: [ interpreter/**, test/** ]
6+
paths: [ .github/**, interpreter/**, test/** ]
77

88
pull_request:
99
branches: [ main ]
10-
paths: [ interpreter/**, test/** ]
10+
paths: [ .github/**, interpreter/**, test/** ]
1111

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
@@ -21,14 +21,16 @@ jobs:
2121
- name: Setup OCaml
2222
uses: ocaml/setup-ocaml@v2
2323
with:
24-
ocaml-compiler: 4.12.x
24+
ocaml-compiler: 4.14.x
2525
- name: Setup OCaml tools
26-
run: opam install --yes ocamlbuild.0.14.0 ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
26+
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
2828
uses: actions/setup-node@v2
2929
with:
3030
node-version: 19.x
3131
- name: Build interpreter
3232
run: cd interpreter && opam exec make
3333
- name: Run tests
34-
run: cd interpreter && opam exec make all
34+
# TODO: reactiate node once it supports all of Wasm 3.0
35+
# run: cd interpreter && opam exec make JS=node ci
36+
run: cd interpreter && opam exec make ci

.github/workflows/ci-spec.yml

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: CI for specs
33
on:
44
push:
55
branches: [ main ]
6-
paths: [ document/** ]
6+
paths: [ .github/**, document/** ]
77

88
pull_request:
99
branches: [ main ]
10-
paths: [ document/** ]
10+
paths: [ .github/**, document/** ]
1111

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
@@ -70,9 +70,63 @@ jobs:
7070
name: web-api-rendered
7171
path: document/web-api/index.html
7272

73+
build-code-metadata-spec:
74+
runs-on: ubuntu-latest
75+
needs: [build-core-spec]
76+
steps:
77+
- name: Checkout repo
78+
uses: actions/checkout@v2
79+
with:
80+
submodules: "recursive"
81+
- name: Setup TexLive
82+
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
83+
- name: Setup Sphinx
84+
run: pip install six && pip install sphinx==5.1.0
85+
- name: Build main spec
86+
run: cd document/metadata/code && make main
87+
- name: Upload artifact
88+
uses: actions/upload-artifact@v2
89+
with:
90+
name: code-metadata-rendered
91+
path: document/metadata/code/_build/html
92+
93+
build-legacy-exceptions-core-spec:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Checkout repo
97+
uses: actions/checkout@v2
98+
with:
99+
submodules: "recursive"
100+
- name: Setup TexLive
101+
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
102+
- name: Setup Sphinx
103+
run: pip install six && pip install sphinx==5.1.0
104+
- name: Build main spec
105+
run: cd document/legacy/exceptions/core && make main
106+
- name: Upload artifact
107+
uses: actions/upload-artifact@v2
108+
with:
109+
name: legacy-exceptions-core-rendered
110+
path: document/legacy/exceptions/core/_build/html
111+
112+
build-legacy-exceptions-js-api-spec:
113+
runs-on: ubuntu-latest
114+
steps:
115+
- name: Checkout repo
116+
uses: actions/checkout@v2
117+
- name: Setup Bikeshed
118+
run: pip install bikeshed && bikeshed update
119+
- name: Run Bikeshed
120+
run: bikeshed spec "document/legacy/exceptions/js-api/index.bs" "document/legacy/exceptions/js-api/index.html"
121+
- name: Upload artifact
122+
uses: actions/upload-artifact@v2
123+
with:
124+
name: legacy-exceptions-js-api-rendered
125+
path: document/legacy/exceptions/js-api/index.html
126+
73127
publish-spec:
74128
runs-on: ubuntu-latest
75-
needs: [build-core-spec, build-js-api-spec, build-web-api-spec]
129+
needs: [build-core-spec, build-js-api-spec, build-web-api-spec, build-code-metadata-spec, build-legacy-exceptions-core-spec, build-legacy-exceptions-js-api-spec]
76130
steps:
77131
- name: Checkout repo
78132
uses: actions/checkout@v2
@@ -93,6 +147,21 @@ jobs:
93147
with:
94148
name: web-api-rendered
95149
path: _output/web-api
150+
- name: Download code metadata spec artifact
151+
uses: actions/download-artifact@v2
152+
with:
153+
name: code-metadata-rendered
154+
path: _output/metadata/code
155+
- name: Download legacy exceptions core spec artifact
156+
uses: actions/download-artifact@v2
157+
with:
158+
name: legacy-exceptions-core-rendered
159+
path: _output/legacy/exceptions/core
160+
- name: Download legacy exceptions JS API spec artifact
161+
uses: actions/download-artifact@v2
162+
with:
163+
name: legacy-exceptions-js-api-rendered
164+
path: _output/legacy/exceptions/js-api
96165
- name: Publish to GitHub Pages
97166
if: github.ref == 'refs/heads/main'
98167
uses: peaceiris/actions-gh-pages@v3

.github/workflows/mirror-to-master.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/w3c-publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish to W3C TR space
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ .github/**, document/** ]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
jobs:
12+
publish-to-w3c-TR:
13+
if: github.repository == 'WebAssembly/spec'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v2
18+
with:
19+
submodules: "recursive"
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 16
24+
- name: Setup Bikeshed
25+
run: pip install bikeshed && bikeshed update
26+
- name: Setup TexLive
27+
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
28+
- name: Setup Sphinx
29+
run: pip install six && pip install sphinx==5.1.0
30+
- name: Publish all specs to their https://www.w3.org/TR/ URLs
31+
run: cd document && make -e WD-echidna-CI
32+
env:
33+
STATUS: --md-status=WD
34+
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
35+
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
36+
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
37+
YARN_ENABLE_IMMUTABLE_INSTALLS: false

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ Original `README` from upstream repository follows...
1515

1616
# spec
1717

18-
This repository holds the sources for the WebAssembly draft specification
19-
(to seed a future
20-
[WebAssembly Working Group](https://lists.w3.org/Archives/Public/public-new-work/2017Jun/0005.html)),
21-
a reference implementation, and the official testsuite.
18+
This repository holds the sources for the WebAssembly specification,
19+
a reference implementation, and the official test suite.
2220

2321
A formatted version of the spec is available here:
2422
[webassembly.github.io/spec](https://webassembly.github.io/spec/),

document/Makefile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
DIRS = core js-api web-api
1+
DIRS = core js-api web-api metadata/code legacy/exceptions
22
FILES = index.html
33
BUILDDIR = _build
4+
TAR = tar
45

56
# Global targets.
67

@@ -24,6 +25,25 @@ clean: $(DIRS:%=clean-%)
2425
.PHONY: diff
2526
diff: $(DIRS:%=diff-%)
2627

28+
# macOS: do “brew install tar” & run “make” as: TAR=gtar make -e WD-tar
29+
.PHONY: WD-tar
30+
WD-tar:
31+
for dir in $(DIRS); \
32+
do STATUS=--md-status=WD TAR=$(TAR) $(MAKE) -e -C $$dir $@;\
33+
done
34+
35+
# macOS: do “brew install tar” & run “make” as: TAR=gtar make -e WD-echidna
36+
.PHONY: WD-echidna
37+
WD-echidna:
38+
for dir in $(DIRS); \
39+
do $(MAKE) -e -C $$dir $@;\
40+
done
41+
42+
.PHONY: WD-echidna-CI
43+
WD-echidna-CI:
44+
for dir in $(DIRS); \
45+
do $(MAKE) -e -C $$dir $@;\
46+
done
2747

2848
# Directory-specific targets.
2949

document/core/Makefile

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ BUILDDIR = _build
99
STATICDIR = _static
1010
DOWNLOADDIR = _download
1111
NAME = WebAssembly
12+
DECISION_URL = https://github.com/WebAssembly/meetings/blob/main/main/2017/WG-12-06.md
13+
TAR = tar
1214

1315
# Internal variables.
1416
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -78,7 +80,7 @@ publish-main: clean main bikeshed-keep deploy
7880
all: pdf html bikeshed
7981

8082
.PHONY: main
81-
main: pdf html
83+
main: macrosok pdf html
8284

8385
# Dirty hack to avoid rebuilding the Bikeshed version for every push.
8486
.PHONY: bikeshed-keep
@@ -95,6 +97,10 @@ GENERATED = appendix/index-instructions.rst
9597
%.rst: %.py
9698
(cd `dirname $@`; ./`basename $^`)
9799

100+
.PHONY: macrosok
101+
macrosok: $(GENERATED)
102+
sh util/check_macros.sh
103+
98104
.PHONY: pdf
99105
pdf: $(GENERATED) latexpdf
100106
mkdir -p $(BUILDDIR)/html/$(DOWNLOADDIR)
@@ -148,7 +154,7 @@ bikeshed: $(GENERATED)
148154
@echo
149155
@echo =========================================================================
150156
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
151-
bikeshed spec index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
157+
bikeshed spec $(STATUS) index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
152158
mkdir -p $(BUILDDIR)/html/bikeshed/
153159
(cd util/katex/ && yarn && yarn build && npm install --only=prod)
154160
python3 util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
@@ -163,9 +169,11 @@ bikeshed: $(GENERATED)
163169
@echo "Build finished. The HTML page is in $(BUILDDIR)/html/bikeshed/."
164170

165171
.PHONY: WD-tar
172+
# macOS tar has no “--transform” option (only GNU tar does), so on macOS,
173+
# do “brew install tar” & run “make” like this: “TAR=gtar make -e WD-tar”
166174
WD-tar: bikeshed
167175
@echo "Building tar file..."
168-
tar cvf \
176+
$(TAR) cvf \
169177
$(BUILDDIR)/WD.tar \
170178
--transform='s|$(BUILDDIR)/html/bikeshed/||' \
171179
--transform='s|index.html|Overview.html|' \
@@ -190,6 +198,20 @@ WD-echidna: WD-tar
190198
@echo
191199
@echo "Published working draft. Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
192200

201+
.PHONY: WD-echidna-CI
202+
WD-echidna-CI: WD-tar
203+
@if [ -z $(W3C_ECHIDNA_TOKEN_CORE) ] || \
204+
[ -z $(DECISION_URL) ] ; then \
205+
echo "Must provide W3C_ECHIDNA_TOKEN_CORE and DECISION_URL environment variables"; \
206+
exit 1; \
207+
fi
208+
curl 'https://labs.w3.org/echidna/api/request' \
209+
-F "tar=@$(BUILDDIR)/WD.tar" \
210+
-F "token=$(W3C_ECHIDNA_TOKEN_CORE)" \
211+
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
212+
@echo
213+
@echo "Published working draft. Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
214+
193215
.PHONY: diff
194216
diff: bikeshed
195217
@echo "Downloading the old single-file html spec..."

0 commit comments

Comments
 (0)