diff --git a/flake.lock b/flake.lock index 21b3ce75..61c61eef 100644 --- a/flake.lock +++ b/flake.lock @@ -196,11 +196,11 @@ "typst-packages": { "flake": false, "locked": { - "lastModified": 1731485222, - "narHash": "sha256-uhXDznbGLS4s6d2S8OHUCzpgmJQ1H2HCJug7kRIY0Jw=", + "lastModified": 1733827512, + "narHash": "sha256-++W3zUwRreWSZmPP/sUTpQZjOrj5chnQZhlmePm521M=", "owner": "typst", "repo": "packages", - "rev": "4979ee3923fb0143e5d076854cb0d94bbf367a2c", + "rev": "dfd4a3ee4a819b11640361610bc0a3eb10cd64e7", "type": "github" }, "original": { diff --git a/src/core/reader/types/data.rs b/src/core/reader/types/data.rs index 8451f717..c92ce6b6 100644 --- a/src/core/reader/types/data.rs +++ b/src/core/reader/types/data.rs @@ -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 diff --git a/whitepaper/main.typ b/whitepaper/main.typ index c5efa4e7..71263ac5 100644 --- a/whitepaper/main.typ +++ b/whitepaper/main.typ @@ -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:wanja.zaeske@dlr.de") -] - -#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:wanja.zaeske@dlr.de") + ], ) #init-acronyms( @@ -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 diff --git a/whitepaper/template.typ b/whitepaper/template.typ new file mode 100644 index 00000000..a14e8ec9 --- /dev/null +++ b/whitepaper/template.typ @@ -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 +}