Skip to content

Commit c1289dc

Browse files
authored
Merge pull request #39 from WebAssembly/merge
Merge with main
2 parents f92513b + 72e2faa commit c1289dc

File tree

24 files changed

+1206
-1180
lines changed

24 files changed

+1206
-1180
lines changed

document/core/Makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ spectec:
7676

7777
SPECTECPAT = $(SPECTECSPEC)/*.$(SPECTECEXT)
7878
SPECTECFILES = $(shell ls $(SPECTECPAT))
79-
RSTDIRS = $(shell ls -d [a-z]*/ util/[a-z]*/)
79+
RSTDIRS = $(shell ls -d [a-z]*/ util/[a-z]*/ | grep -v util/katex)
8080
RSTFILES = $(shell ls -d *.rst [a-z]*/*.rst) $(GENERATED)
8181
CTRLFILES = $(shell ls Makefile *.* util/*.* util/bikeshed/*.*) $(shell ls static/*)
8282
ALLFILES = $(RSTDIRS) $(CTRLFILES) _splice #$(RSTFILES)
@@ -97,12 +97,9 @@ $(SPLICEDIR)/$(BUILDDIR): $(SPLICEDIR)
9797
$(BUILDDIR): $(SPLICEDIR)/$(BUILDDIR)
9898
ln -s $< $@
9999

100-
$(RSTDIRS:%=$(SPLICEDIR)/%):: $(SPLICEDIR)
100+
$(RSTDIRS:%=$(SPLICEDIR)/%): $(SPLICEDIR)
101101
mkdir -p $@
102102

103-
$(SPLICEDIR)/util/katex:: util/katex
104-
cp -R $< $@ # F it!
105-
106103
$(SPLICEDIR)/_splice: $(SPLICEDIR) $(RSTFILES) $(SPECTECFILES)
107104
@echo Modified $?
108105
@echo ${if ${filter %.$(SPECTECEXT), $?}, $(RSTFILES), ${filter %.rst, $?}} >$@
@@ -184,13 +181,16 @@ singlehtml: $(SPLICEDFILES)
184181
singlehtml-nested: $(GENERATED)
185182
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
186183

187-
.PHONY: bikeshed bikeshed-nested
184+
.PHONY: bikeshed bikshed-fixup bikeshed-nested
188185
bikeshed: $(SPLICEDFILES)
186+
(cd util/katex/ && yarn && yarn build && npm install --only=prod)
187+
mkdir -p $(SPLICEDIR)/util/katex
188+
cp -Rf util/katex/* $(SPLICEDIR)/util/katex
189189
(cd $(SPLICEDIR) && make bikeshed-nested)
190190
@echo
191191
@echo "Build finished. The HTML page is in $(BUILDDIR)/html/bikeshed/."
192192

193-
bikeshed-nested: $(GENERATED)
193+
bikeshed-fixup: $(GENERATED)
194194
$(SPHINXBUILD) -b singlehtml -c util/bikeshed \
195195
$(ALLSPHINXOPTS) $(BUILDDIR)/bikeshed_singlehtml
196196
python3 util/bikeshed_fixup.py $(BUILDDIR)/bikeshed_singlehtml/index.html \
@@ -201,10 +201,12 @@ bikeshed-nested: $(GENERATED)
201201
@tail -n10 _build/bikeshed_singlehtml/index_fixed.html
202202
@echo
203203
@echo =========================================================================
204+
205+
bikeshed-nested: bikeshed-fixup
204206
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
205207
bikeshed spec --md-status=$(W3C_STATUS) --md-deadline=$(DEADLINE) index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
206208
mkdir -p $(BUILDDIR)/html/bikeshed/
207-
(cd util/katex/ && yarn && yarn build && npm install --only=prod)
209+
# (cd util/katex/ && yarn && yarn build && npm install --only=prod)
208210
python3 util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
209211
>$(BUILDDIR)/html/bikeshed/index.html
210212
mkdir -p $(BUILDDIR)/html/bikeshed/katex/dist/

document/core/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,5 +518,12 @@
518518
'macros': {
519519
'multicolumn': ['', 2] # Bummer, MathJax can't handle multicolumn, ignore it
520520
}
521+
},
522+
'options': {
523+
'menuOptions': {
524+
'settings': {
525+
'enrich': False, # Activating this apparently increases page load times by 4x
526+
}
527+
}
521528
}
522529
}

document/core/util/bikeshed_fixup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def Main():
5656
# an error — which in turn causes the W3C pubrules checker to refuse to
5757
# autopublish the resulting bikeshed output.
5858
data = data.replace(
59-
"""\href{#binary-sint}{\href{#syntax-int}""",
60-
"""{\href{#syntax-int}""")
59+
"""\\href{#binary-sint}{\\href{#syntax-int}""",
60+
"""{\\href{#syntax-int}""")
6161

6262
# Strip the entire <head> element from the the sphinx output — because it
6363
# contains several <meta>, <script>, and <link> elements that are unnecessary

document/core/util/mathjax2katex.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def ReplaceMath(cache, data):
7373
data = data.replace('\\mbox', '\\text')
7474
data = data.replace('\\begin{split}', '\\begin{aligned}')
7575
data = data.replace('\\end{split}', '\\end{aligned}')
76+
data = re.sub('\\\\multicolumn\\{[0-9]*\\}\\{[a-z]*\\}', '', data) # Katex can't handle it
7677
data = data.replace('&amp;', '&') # Messed up by Bikeshed
7778
data = data.replace('&lt;', '<') # Messed up by Bikeshed
7879
data = data.replace('&gt;', '>') # Messed up by Bikeshed

document/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <h3>Legacy Extensions</h3>
9797
<li><a href="legacy/exceptions/core/_download/WebAssembly-Legacy-Exceptions.pdf">PDF version</a></li>
9898
</ul>
9999
</li>
100-
<li><p><b>JavaScirpt Embedding</b></p>
100+
<li><p><b>JavaScript Embedding</b></p>
101101
<ul>
102102
<li><a href="legacy/exceptions/js-api/">W3C version</a></li>
103103
</ul>

document/web-api/index.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ additional APIs that are implemented by Web user agents but are outside the scop
8888
<pre class="idl">
8989
[Exposed=(Window,Worker)]
9090
partial namespace WebAssembly {
91-
Promise&lt;Module> compileStreaming(Promise&lt;Response> source, optional WebAssemblyCompileOptions options);
91+
Promise&lt;Module> compileStreaming(Promise&lt;Response> source, optional WebAssemblyCompileOptions options = {});
9292
Promise&lt;WebAssemblyInstantiatedSource> instantiateStreaming(
93-
Promise&lt;Response> source, optional object importObject, optional WebAssemblyCompileOptions options);
93+
Promise&lt;Response> source, optional object importObject, optional WebAssemblyCompileOptions options = {});
9494
};
9595
</pre>
9696

specification/wasm-1.0/A-binary.spectec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ grammar Bmut : mut =
103103
| 0x01 => MUT
104104

105105
grammar Blimits : limits =
106-
| 0x00 n:Bu32 => `[n .. ]
106+
| 0x00 n:Bu32 => `[n .. eps]
107107
| 0x01 n:Bu32 m:Bu32 => `[n .. m]
108108

109109
grammar Bglobaltype : globaltype =

specification/wasm-2.0/A-binary.spectec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ grammar Bmut : mut =
118118
| 0x01 => MUT
119119

120120
grammar Blimits : limits =
121-
| 0x00 n:Bu32 => `[n .. ]
121+
| 0x00 n:Bu32 => `[n .. eps]
122122
| 0x01 n:Bu32 m:Bu32 => `[n .. m]
123123

124124
grammar Bglobaltype : globaltype =

specification/wasm-3.0/5.2-binary.types.spectec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ grammar Brectype : rectype =
8181
;; External types
8282

8383
grammar Blimits : (addrtype, limits) =
84-
| 0x00 n:Bu64 => (I32, `[n .. ])
84+
| 0x00 n:Bu64 => (I32, `[n .. eps])
8585
| 0x01 n:Bu64 m:Bu64 => (I32, `[n .. m])
86-
| 0x04 n:Bu64 => (I64, `[n .. ])
86+
| 0x04 n:Bu64 => (I64, `[n .. eps])
8787
| 0x05 n:Bu64 m:Bu64 => (I64, `[n .. m])
8888

8989
grammar Btagtype : tagtype =

specification/wasm-3.0/6.2-text.types.spectec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ grammar Taddrtype/abbrev : addrtype = ... | eps == "i32"
129129

130130

131131
grammar Tlimits : limits =
132-
| n:Tu64 => `[n .. ]
132+
| n:Tu64 => `[n .. eps]
133133
| n:Tu64 m:Tu64 => `[n .. m]
134134

135135

0 commit comments

Comments
 (0)