Skip to content

Commit

Permalink
Merge pull request #20 from dhil/wasmfx
Browse files Browse the repository at this point in the history
Restore WasmFX changes
  • Loading branch information
dhil committed Jan 25, 2024
2 parents 7f67637 + a9ec313 commit 848ebad
Show file tree
Hide file tree
Showing 197 changed files with 31,170 additions and 5,456 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci-interpreter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI for interpreter & tests

on:
push:
branches: [ main ]
paths: [ interpreter/**, test/** ]

pull_request:
branches: [ main ]
paths: [ interpreter/**, test/** ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
interpreter:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.14.x
- name: Setup OCaml tools
run: opam install --yes ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 19.x
- name: Build interpreter
run: cd interpreter && opam exec make
- name: Run tests
# TODO: disable node.js run until it fully implements proposal
# run: cd interpreter && opam exec make JS=node ci
run: cd interpreter && opam exec make test
101 changes: 101 additions & 0 deletions .github/workflows/ci-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: CI for specs

on:
push:
branches: [ main ]
paths: [ document/** ]

pull_request:
branches: [ main ]
paths: [ document/** ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build-core-spec:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Setup TexLive
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- name: Setup Sphinx
run: pip install six && pip install sphinx==5.1.0
- name: Build main spec
run: cd document/core && make main
- name: Run Bikeshed
run: cd document/core && make bikeshed
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: core-rendered
path: document/core/_build/html

build-js-api-spec:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Run Bikeshed
run: bikeshed spec "document/js-api/index.bs" "document/js-api/index.html"
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: js-api-rendered
path: document/js-api/index.html

build-web-api-spec:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Run Bikeshed
run: bikeshed spec "document/web-api/index.bs" "document/web-api/index.html"
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: web-api-rendered
path: document/web-api/index.html

publish-spec:
runs-on: ubuntu-latest
needs: [build-core-spec, build-js-api-spec, build-web-api-spec]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Create output directory
run: mkdir _output && cp document/index.html _output/index.html
- name: Download core spec artifact
uses: actions/download-artifact@v2
with:
name: core-rendered
path: _output/core
- name: Download JS API spec artifact
uses: actions/download-artifact@v2
with:
name: js-api-rendered
path: _output/js-api
- name: Download Web API spec artifact
uses: actions/download-artifact@v2
with:
name: web-api-rendered
path: _output/web-api
- name: Publish to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./_output
github_token: ${{ secrets.GITHUB_TOKEN }}
103 changes: 0 additions & 103 deletions .github/workflows/main.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Mirror main branch to master branch

on:
push:
branches:
Expand All @@ -8,8 +10,7 @@ jobs:
runs-on: ubuntu-latest
name: Mirror main branch to master branch
steps:
- name: Mirror action step
id: mirror
- name: Mirror branch
uses: google/mirror-branch-action@v1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
![Build Status](https://github.com/WebAssembly/spec/actions/workflows/main.yml/badge.svg)
[![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)
[![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)

# Typed Continuations Proposal for WebAssembly

This repository is a clone of
[github.com/WebAssembly/spec/](https://github.com/WebAssembly/spec/).
It is meant for discussion, prototype specification and implementation
of a proposal to add support for different patterns of non-local
control flow to WebAssembly.

The proposal is fully implemented as part of the reference interpreter.

* See the [explainer](proposals/continuations/Explainer.md) for a high-level summary of the proposal.

* See the [overview](proposals/continuations/Overview.md) for a more formal description of the proposal.

* See the [examples](proposals/continuations/examples) for Wasm code for implementing various different features including lightweight threads, actors, and async/await.

Original `README` from upstream repository follows.

# spec

This repository holds the sources for the WebAssembly draft specification
(to seed a future
[WebAssembly Working Group](https://lists.w3.org/Archives/Public/public-new-work/2017Jun/0005.html)),
a reference implementation, and the official testsuite.
This repository holds a prototypical reference implementation for WebAssembly,
which is currently serving as the official specification. Eventually, we expect
to produce a specification either written in human-readable prose or in a formal
specification language.

It also holds the WebAssembly testsuite, which tests numerous aspects of
conformance to the spec.

View the work-in-progress spec at [webassembly.github.io/spec](https://webassembly.github.io/spec/).

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

Participation is welcome. Discussions about new features, significant semantic
changes, or any specification change likely to generate substantial discussion
Expand Down
13 changes: 10 additions & 3 deletions document/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ pdf: $(GENERATED) latexpdf
clean:
rm -rf $(BUILDDIR)
rm -rf $(STATICDIR)
rm -f $(GENERATED)

.PHONY: html
html: $(GENERATED)
Expand Down Expand Up @@ -138,13 +139,19 @@ singlehtml: $(GENERATED)
bikeshed: $(GENERATED)
$(SPHINXBUILD) -b singlehtml -c util/bikeshed \
$(ALLSPHINXOPTS) $(BUILDDIR)/bikeshed_singlehtml
python util/bikeshed_fixup.py $(BUILDDIR)/bikeshed_singlehtml/index.html \
python3 util/bikeshed_fixup.py $(BUILDDIR)/bikeshed_singlehtml/index.html \
>$(BUILDDIR)/bikeshed_singlehtml/index_fixed.html
@echo ==== Showing contents of _build/bikeshed_singlehtml/index_fixed.html ====
@head -n10 _build/bikeshed_singlehtml/index_fixed.html
@echo ... skipping $$(expr `cat _build/bikeshed_singlehtml/index_fixed.html | wc -l` - 20) lines ...
@tail -n10 _build/bikeshed_singlehtml/index_fixed.html
@echo
@echo =========================================================================
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
bikeshed spec index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
mkdir -p $(BUILDDIR)/html/bikeshed/
(cd util/katex/ && yarn && yarn build && npm install --only=prod)
python util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
python3 util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
>$(BUILDDIR)/html/bikeshed/index.html
mkdir -p $(BUILDDIR)/html/bikeshed/katex/dist/
cp -r util/katex/dist/* $(BUILDDIR)/html/bikeshed/katex/dist/
Expand Down Expand Up @@ -261,7 +268,7 @@ latex:
"(use \`make latexpdf' here to do that automatically)."

.PHONY: latexpdf
latexpdf:
latexpdf: $(GENERATED)
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex LATEXMKOPTS=" </dev/null" all-pdf >$(BUILDDIR)/latex/LOG 2>&1 || cat $(BUILDDIR)/latex/LOG
Expand Down
Loading

0 comments on commit 848ebad

Please sign in to comment.