Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve whitepaper code and small fixes #103

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/core/reader/types/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ impl Debug for DataSegment {
/// ;; for hardcoded offsets, we'll usually use i32.const because of wasm being x86 arch
/// )
/// ```

///
/// Since the span has only the start and length and acts a reference, we print the start and end (both inclusive, notice the '..=')
/// We print it in both decimal and hexadecimal so it's easy to trace in something like <https://webassembly.github.io/wabt/demo/wat2wasm/>
Expand Down
54 changes: 13 additions & 41 deletions whitepaper/main.typ
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
/* imports */
#import "@preview/acrostiche:0.4.0": *
#import "@preview/ccicons:1.0.0": *

/* variables and setup */
#let title = [WASM Interpreter for Safety -- White Paper]

/* TODO make this multi-author capable */
#let author = "Wanja Zaeske"
#let affiliation = [
Department Safety Critical Systems & Systems Engineering \
German Aerospace Center (DLR) \
#link("mailto:[email protected]")
]

#set document(
title: title, author: author, keywords: ("WebAssembly", "Safety-Critical"),
#import "@preview/acrostiche:0.4.1": *
#import "template.typ": setup_template

#show: setup_template.with(
title: [WASM Interpreter for Safety -- White Paper],
/* TODO make this multi-author capable */
author: "Wanja Zaeske", keywords: ("WebAssembly", "Safety-Critical"),
/* TODO set affiliation per author (or for multiple authors at once) */
affiliation: [
Department Safety Critical Systems & Systems Engineering \
German Aerospace Center (DLR) \
#link("mailto:[email protected]")
],
)

#init-acronyms(
Expand All @@ -23,31 +20,6 @@
),
)

/* style */
#set page(
paper: "a4", header: context{
if counter(page).get().first() > 1 [
#align(right, title),
]
}, footer: context[
#set text(8pt)
License: #link("https://creativecommons.org/licenses/by-sa/4.0/")[CC-BY-SA #cc-by-sa]
#h(1fr) #counter(page).display("1 of 1", both: true) \

Copyright © 2024-#datetime.today().year() German Aerospace Center (DLR). All
rights reserved.
], columns: 1,
)

#set heading(numbering: "1.")

#align(center, text(17pt)[*#title*])

#grid(columns: (1fr), align(center)[
#author \
#affiliation
])

= Introduction
This white paper provides an overview over our WebAssembly interpreter
@our-repo. It Primarily serves to highlight and explain design decisions and the
Expand Down
34 changes: 34 additions & 0 deletions whitepaper/template.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#import "@preview/ccicons:1.0.0": cc-by-sa

#let setup_template(title: [], author: [], keywords: (), affiliation: [], contents) = {
set document(title: title, author: author, keywords: keywords)
set page(
paper: "a4", columns: 1, header: context{
if counter(page).get().first() > 1 {
align(right, title)
}
}, footer: context{
set text(8pt)
let left_footer = [
License: #link("https://creativecommons.org/licenses/by-sa/4.0/")[CC-BY-SA #cc-by-sa] \
Copyright © 2024-#datetime.today().year() German Aerospace Center (DLR). All
rights reserved.
]
let right_footer = counter(page).display("1 of 1", both: true)

grid(columns: (1fr, auto), align: (left, right), left_footer, right_footer)
},
)

// Style
set heading(numbering: "1.")

align(center, text(17pt)[*#title*])

grid(columns: (1fr), align(center)[
#author \
#affiliation
])

contents
}
Loading