Skip to content

Commit 848ebad

Browse files
authored
Merge pull request #20 from dhil/wasmfx
Restore WasmFX changes
2 parents 7f67637 + a9ec313 commit 848ebad

File tree

197 files changed

+31170
-5456
lines changed

Some content is hidden

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

197 files changed

+31170
-5456
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI for interpreter & tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ interpreter/**, test/** ]
7+
8+
pull_request:
9+
branches: [ main ]
10+
paths: [ interpreter/**, test/** ]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
interpreter:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@v2
21+
- name: Setup OCaml
22+
uses: ocaml/setup-ocaml@v2
23+
with:
24+
ocaml-compiler: 4.14.x
25+
- name: Setup OCaml tools
26+
run: opam install --yes ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v2
29+
with:
30+
node-version: 19.x
31+
- name: Build interpreter
32+
run: cd interpreter && opam exec make
33+
- name: Run tests
34+
# TODO: disable node.js run until it fully implements proposal
35+
# run: cd interpreter && opam exec make JS=node ci
36+
run: cd interpreter && opam exec make test

.github/workflows/ci-spec.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: CI for specs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ document/** ]
7+
8+
pull_request:
9+
branches: [ main ]
10+
paths: [ document/** ]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
build-core-spec:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@v2
21+
with:
22+
submodules: "recursive"
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: 16
27+
- name: Setup Bikeshed
28+
run: pip install bikeshed && bikeshed update
29+
- name: Setup TexLive
30+
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
31+
- name: Setup Sphinx
32+
run: pip install six && pip install sphinx==5.1.0
33+
- name: Build main spec
34+
run: cd document/core && make main
35+
- name: Run Bikeshed
36+
run: cd document/core && make bikeshed
37+
- name: Upload artifact
38+
uses: actions/upload-artifact@v2
39+
with:
40+
name: core-rendered
41+
path: document/core/_build/html
42+
43+
build-js-api-spec:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Checkout repo
47+
uses: actions/checkout@v2
48+
- name: Setup Bikeshed
49+
run: pip install bikeshed && bikeshed update
50+
- name: Run Bikeshed
51+
run: bikeshed spec "document/js-api/index.bs" "document/js-api/index.html"
52+
- name: Upload artifact
53+
uses: actions/upload-artifact@v2
54+
with:
55+
name: js-api-rendered
56+
path: document/js-api/index.html
57+
58+
build-web-api-spec:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Checkout repo
62+
uses: actions/checkout@v2
63+
- name: Setup Bikeshed
64+
run: pip install bikeshed && bikeshed update
65+
- name: Run Bikeshed
66+
run: bikeshed spec "document/web-api/index.bs" "document/web-api/index.html"
67+
- name: Upload artifact
68+
uses: actions/upload-artifact@v2
69+
with:
70+
name: web-api-rendered
71+
path: document/web-api/index.html
72+
73+
publish-spec:
74+
runs-on: ubuntu-latest
75+
needs: [build-core-spec, build-js-api-spec, build-web-api-spec]
76+
steps:
77+
- name: Checkout repo
78+
uses: actions/checkout@v2
79+
- name: Create output directory
80+
run: mkdir _output && cp document/index.html _output/index.html
81+
- name: Download core spec artifact
82+
uses: actions/download-artifact@v2
83+
with:
84+
name: core-rendered
85+
path: _output/core
86+
- name: Download JS API spec artifact
87+
uses: actions/download-artifact@v2
88+
with:
89+
name: js-api-rendered
90+
path: _output/js-api
91+
- name: Download Web API spec artifact
92+
uses: actions/download-artifact@v2
93+
with:
94+
name: web-api-rendered
95+
path: _output/web-api
96+
- name: Publish to GitHub Pages
97+
if: github.ref == 'refs/heads/main'
98+
uses: peaceiris/actions-gh-pages@v3
99+
with:
100+
publish_dir: ./_output
101+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/main.yml

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

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Mirror main branch to master branch
2+
13
on:
24
push:
35
branches:
@@ -8,8 +10,7 @@ jobs:
810
runs-on: ubuntu-latest
911
name: Mirror main branch to master branch
1012
steps:
11-
- name: Mirror action step
12-
id: mirror
13+
- name: Mirror branch
1314
uses: google/[email protected]
1415
with:
1516
github-token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,38 @@
1-
![Build Status](https://github.com/WebAssembly/spec/actions/workflows/main.yml/badge.svg)
1+
[![CI for specs](https://github.com/wasmfx/specfx/actions/workflows/ci-spec.yml/badge.svg)](https://github.com/wasmfx/specfx/actions/workflows/ci-spec.yml)
2+
[![CI for interpreter & tests](https://github.com/wasmfx/specfx/actions/workflows/ci-interpreter.yml/badge.svg)](https://github.com/wasmfx/specfx/actions/workflows/ci-interpreter.yml)
3+
4+
# Typed Continuations Proposal for WebAssembly
5+
6+
This repository is a clone of
7+
[github.com/WebAssembly/spec/](https://github.com/WebAssembly/spec/).
8+
It is meant for discussion, prototype specification and implementation
9+
of a proposal to add support for different patterns of non-local
10+
control flow to WebAssembly.
11+
12+
The proposal is fully implemented as part of the reference interpreter.
13+
14+
* See the [explainer](proposals/continuations/Explainer.md) for a high-level summary of the proposal.
15+
16+
* See the [overview](proposals/continuations/Overview.md) for a more formal description of the proposal.
17+
18+
* See the [examples](proposals/continuations/examples) for Wasm code for implementing various different features including lightweight threads, actors, and async/await.
19+
20+
Original `README` from upstream repository follows.
221

322
# spec
423

5-
This repository holds the sources for the WebAssembly draft specification
6-
(to seed a future
7-
[WebAssembly Working Group](https://lists.w3.org/Archives/Public/public-new-work/2017Jun/0005.html)),
8-
a reference implementation, and the official testsuite.
24+
This repository holds a prototypical reference implementation for WebAssembly,
25+
which is currently serving as the official specification. Eventually, we expect
26+
to produce a specification either written in human-readable prose or in a formal
27+
specification language.
28+
29+
It also holds the WebAssembly testsuite, which tests numerous aspects of
30+
conformance to the spec.
31+
32+
View the work-in-progress spec at [webassembly.github.io/spec](https://webassembly.github.io/spec/).
933

10-
A formatted version of the spec is available here:
11-
[webassembly.github.io/spec](https://webassembly.github.io/spec/),
34+
At this time, the contents of this repository are under development and known
35+
to be "incomplet and inkorrect".
1236

1337
Participation is welcome. Discussions about new features, significant semantic
1438
changes, or any specification change likely to generate substantial discussion

document/core/Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ pdf: $(GENERATED) latexpdf
105105
clean:
106106
rm -rf $(BUILDDIR)
107107
rm -rf $(STATICDIR)
108+
rm -f $(GENERATED)
108109

109110
.PHONY: html
110111
html: $(GENERATED)
@@ -138,13 +139,19 @@ singlehtml: $(GENERATED)
138139
bikeshed: $(GENERATED)
139140
$(SPHINXBUILD) -b singlehtml -c util/bikeshed \
140141
$(ALLSPHINXOPTS) $(BUILDDIR)/bikeshed_singlehtml
141-
python util/bikeshed_fixup.py $(BUILDDIR)/bikeshed_singlehtml/index.html \
142+
python3 util/bikeshed_fixup.py $(BUILDDIR)/bikeshed_singlehtml/index.html \
142143
>$(BUILDDIR)/bikeshed_singlehtml/index_fixed.html
144+
@echo ==== Showing contents of _build/bikeshed_singlehtml/index_fixed.html ====
145+
@head -n10 _build/bikeshed_singlehtml/index_fixed.html
146+
@echo ... skipping $$(expr `cat _build/bikeshed_singlehtml/index_fixed.html | wc -l` - 20) lines ...
147+
@tail -n10 _build/bikeshed_singlehtml/index_fixed.html
148+
@echo
149+
@echo =========================================================================
143150
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
144151
bikeshed spec index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
145152
mkdir -p $(BUILDDIR)/html/bikeshed/
146153
(cd util/katex/ && yarn && yarn build && npm install --only=prod)
147-
python util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
154+
python3 util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
148155
>$(BUILDDIR)/html/bikeshed/index.html
149156
mkdir -p $(BUILDDIR)/html/bikeshed/katex/dist/
150157
cp -r util/katex/dist/* $(BUILDDIR)/html/bikeshed/katex/dist/
@@ -261,7 +268,7 @@ latex:
261268
"(use \`make latexpdf' here to do that automatically)."
262269

263270
.PHONY: latexpdf
264-
latexpdf:
271+
latexpdf: $(GENERATED)
265272
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
266273
@echo "Running LaTeX files through pdflatex..."
267274
$(MAKE) -C $(BUILDDIR)/latex LATEXMKOPTS=" </dev/null" all-pdf >$(BUILDDIR)/latex/LOG 2>&1 || cat $(BUILDDIR)/latex/LOG

0 commit comments

Comments
 (0)