Skip to content

Commit 68b4323

Browse files
committed
Manually update demo
1 parent dd8a937 commit 68b4323

4 files changed

Lines changed: 42 additions & 3 deletions

File tree

1.bootstrap.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

a4dab4322dacddab5497.module.wasm

2.35 MB
Binary file not shown.

bootstrap.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,49 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title>RustPython Starter Application</title>
5+
<title>RustPython Demo</title>
6+
<style type="text/css" media="screen">
7+
textarea {
8+
font-family: monospace;
9+
}
10+
11+
#code {
12+
height: 35vh;
13+
width: 95vw;
14+
}
15+
16+
#console {
17+
height: 35vh;
18+
width: 95vw;
19+
}
20+
21+
#run-btn {
22+
width: 4em;
23+
height: 2em;
24+
font-size: 24px;
25+
}
26+
</style>
627
</head>
728
<body>
29+
<h1>RustPython Demo</h1>
30+
<p>RustPython is a Python interpreter writter in Rust. This demo is compiled from Rust to WebAssembly so it runs in the browser</p>
31+
<p>Please input your python code below and click <kbd>Run</kbd>:</p>
32+
<textarea id="code">n1 = 0
33+
n2 = 1
34+
count = 0
35+
until = 10
36+
37+
print("These are the first " + str(until) + " number in a Fibonacci sequence:")
38+
39+
while count < until:
40+
print(n1)
41+
n1, n2 = n2, n1 + n2
42+
count += 1
43+
</textarea>
44+
<button id="run-btn">Run &#9655;</button>
845
<script src="./bootstrap.js"></script>
46+
<h3>Standard Output</h3>
47+
<textarea id="console">Loading...</textarea>
948

1049
<a href="https://github.com/RustPython/RustPython"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
1150
</body>

0 commit comments

Comments
 (0)