Debian Codegraph @

playground/pages/parse.html

raw
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>wasm-tools parse</title>
6 <script type="module" src="parse.js"></script>
7 <link rel="stylesheet" href="style.css">
8 <style>
9 .textarea-container {
10 flex-grow: 1;
11 padding: .4rem;
12 display: grid;
13 grid-column-gap: calc(.8rem + 8px);;
14 grid-template-columns: 1fr 1fr;
15 grid-template-rows: min-content auto 1fr;
16 grid-template-areas:
17 "h h"
18 "a b"
19 "c d"
20 }
21
22 textarea {
23 resize: none;
24 box-sizing: border-box;
25 padding: .4rem;
26 height: calc(100% - .4rem);
27 width: 100%;
28 }
29
30 button {
31 font-size: inherit;
32 /* color: #505050; */
33 }
34
35 .description {
36 grid-area: h;
37 }
38
39 .input-header {
40 grid-area: a;
41 padding-bottom: .4rem;
42 }
43 .output-header {
44 grid-area: b;
45 }
46
47 .input {
48 grid-area: c;
49 }
50 .output {
51 grid-area: d
52 }
53 </style>
54 </head>
55
56 <header>
57 <h1>wasm-tools parse</h1>
58 </header>
59
60 <div class="textarea-container">
61 <div class="description">
62 <p>Translate from the WebAssembly text format to binary using <a href="https://github.com/bytecodealliance/wasm-tools"><code>wasm-tools parse</code></a>.
63 You can go the other direction using <a href="print"><code>print</code></a>.</p>
64 </div>
65 <div class="input-header">wat</div>
66 <div class="input">
67 <textarea id="input">(module
68 (import "foo" "bar" (func (param f32)))
69 (memory (data "hi"))
70 (type (func (param i32) (result i32)))
71 (start 1)
72 (table 0 1 funcref)
73 (func)
74 (func (type 1)
75 i32.const 42
76 drop)
77 (export "e" (func 1)))</textarea>
78 </div>
79
80 <div class="output-header">
81 wasm <button id="download" disabled>Download</button>
82 </div>
83 <div class="output">
84 <textarea id="output"></textarea>
85 </div>
86 </div>