Skip to content

Commit 1804e6c

Browse files
committed
Add initial version of layered standard spec
Signed-off-by: Pierre R. Mai <pmai@pmsf.de>
1 parent c44d0f8 commit 1804e6c

6 files changed

Lines changed: 517 additions & 10 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build Examples
22

33
on:
44
push:
@@ -38,13 +38,13 @@ jobs:
3838
- name: Upload FMU artefacts
3939
uses: actions/upload-artifact@v7
4040
with:
41-
name: fmus
41+
name: FMI-LS-WASM-example-fmus
4242
path: build/*.fmu
4343

4444
- name: Upload runner binary artefacts
4545
uses: actions/upload-artifact@v7
4646
with:
47-
name: runners
47+
name: FMI-LS-WASM-example-runners
4848
path: |
4949
build/adder-fmu-c-runner-build/adder-fmu-c-runner
5050
build/adder-fmu-rust-runner-build/adder-fmu-rust-runner

.github/workflows/build-spec.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build Specification
2+
3+
on:
4+
push:
5+
branches-ignore: [ 'temp/*' ]
6+
tags: ['*']
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
build-spec:
12+
runs-on: ubuntu-24.04
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v6
17+
with:
18+
submodules: recursive
19+
20+
- name: Generate revnumber
21+
run: |
22+
[[ $GITHUB_REF_TYPE == "tag" ]] && REVNUMBER=${GITHUB_REF:11} || REVNUMBER=${GITHUB_SHA:0:7}
23+
echo "REVNUMBER=$REVNUMBER" >> $GITHUB_ENV
24+
25+
- name: Generate HTML
26+
uses: avattathil/asciidoctor-action@master
27+
with:
28+
program: asciidoctor --attribute=revnumber=${{ env.REVNUMBER }} --attribute=revdate=$(date +%F) docs/index.adoc
29+
30+
- name: Copy license
31+
run: cp LICENSE.txt docs
32+
33+
- name: Copy wit files
34+
run: cp -r wit docs/
35+
36+
- name: Create ZIP archive
37+
uses: actions/upload-artifact@v7
38+
with:
39+
name: FMI-LS-WASM-spec
40+
path: |
41+
docs/index.html
42+
docs/LICENSE.txt
43+
docs/wit/*
44+
docs/theme/css/*.css
45+
docs/theme/images/*.svg
46+
docs/theme/js/*.js
47+
if-no-files-found: error
48+
49+
- name: Extract branch name
50+
id: extract_branch
51+
shell: bash
52+
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
53+
54+
- name: Deploy to GitHub Pages
55+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
56+
uses: peaceiris/actions-gh-pages@v4
57+
with:
58+
github_token: ${{ secrets.GITHUB_TOKEN }}
59+
publish_dir: docs
60+
destination_dir: ${{ steps.extract_branch.outputs.branch }}

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "examples/fmi-standard"]
22
path = examples/fmi-standard
33
url = https://github.com/modelica/fmi-standard.git
4+
[submodule "docs/theme"]
5+
path = docs/theme
6+
url = https://github.com/modelica/ma-asciidoctor-theme

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
# FMI 3.0 → WebAssembly Component Model Mapping
1+
# FMI Layered Standard WebAssembly (FMI-LS-WASM)
22

3-
[![Build](https://github.com/modelica/fmi-ls-wasm/actions/workflows/build.yml/badge.svg)](https://github.com/modelica/fmi-ls-wasm/actions/workflows/build.yml)
3+
[![Build Specification](https://github.com/modelica/fmi-ls-wasm/actions/workflows/build-spec.yml/badge.svg)](https://github.com/modelica/fmi-ls-wasm/actions/workflows/build-spec.yml)
4+
[![Build Examples](https://github.com/modelica/fmi-ls-wasm/actions/workflows/build-examples.yml/badge.svg)](https://github.com/modelica/fmi-ls-wasm/actions/workflows/build-examples.yml)
45

5-
_Note that this repository contains working drafts for what might become an fmi-ls-wasm layered standard for a webassembly-based portable binary platform for FMI.
6-
Everything is unofficial and subject to change prior to any official release._
6+
This repository contains a current prototype draft for the FMI Layered
7+
Standard WebAssembly (fmi-ls-wasm) based on the [Functional Mock-up Interface][FMI]
8+
3.0 standard for the exchange of simulation models.
9+
It presents a mapping of the [FMI 3.0][FMI3] C API to the [WebAssembly Component Model](https://component-model.bytecodealliance.org/) interface description language (WIT).
710

8-
WIT definitions that map the [FMI 3.0](https://svn.modelica.org/fmi/branches/public/specifications/v3.0/) C API to the [WebAssembly Component Model](https://component-model.bytecodealliance.org/) interface description language (WIT).
11+
Note that this draft is being worked on actively, and thus is subject to change without notice.
912

10-
Also included are examples show-casing the WIT definitions, using Rust,
11-
C and WAT implementations.
13+
This is currently not normative, nor is this document to be considered
14+
officially endorsed by the Modelica Association or other involved
15+
organisations prior to official adoption.
16+
17+
The [FMI 3.0 Layered Standard WebAssembly][spec] is currently maintained on
18+
[GitHub][githubspec] and is published [here][spec]. It is based on
19+
the [FMI][] standard.
20+
21+
Also included are examples show-casing the WIT definitions, using Rust, C and WAT implementations.
22+
23+
[FMI]: https://fmi-standard.org/
24+
[githubspec]: docs/index.adoc
25+
[spec]: https://modelica.github.io/fmi-ls-wasm/main/
1226

1327
## File layout
1428

0 commit comments

Comments
 (0)