From 611aac08c9bd80323330a2f256519a0c5437f7da Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Wed, 9 Dec 2020 19:28:19 -0600 Subject: [PATCH 1/3] Implement the explainer as an html table --- _layouts/home.html | 43 +++++++++++++++++++++++++++++++++++++- assets/img/python-logo.svg | 1 + assets/img/wasm-logo.svg | 18 ++++++++++++++++ assets/style.css | 24 +++++++++++++++++++++ 4 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 assets/img/python-logo.svg create mode 100644 assets/img/wasm-logo.svg diff --git a/_layouts/home.html b/_layouts/home.html index 8ae464c5f..b190f4640 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -26,7 +26,48 @@
- RustPython Explainer + + + + + + + + + + + + + + + + + + + + + + + +
+ Python Logo + Python +
+ ↓ +
+ + RustPython +
+ → +
Python embedded in Rust apps
+ ↓ +
+ WebAssembly Logo + WebAssembly +
+ → +
Python on the Web

diff --git a/assets/img/python-logo.svg b/assets/img/python-logo.svg new file mode 100644 index 000000000..6f521503a --- /dev/null +++ b/assets/img/python-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/img/wasm-logo.svg b/assets/img/wasm-logo.svg new file mode 100644 index 000000000..5eba1e63a --- /dev/null +++ b/assets/img/wasm-logo.svg @@ -0,0 +1,18 @@ + + + + + web-assembly-icon + + + + + + + + + diff --git a/assets/style.css b/assets/style.css index 757f0d8cd..94af9e155 100644 --- a/assets/style.css +++ b/assets/style.css @@ -112,6 +112,11 @@ code.highlighter-rouge, mark.code { color: #fff; } +.color-py { + background-color: #ffd343; + color: #306998; +} + /* alignment */ .d-flex-space-between { justify-content: space-between; @@ -129,6 +134,12 @@ code.highlighter-rouge, mark.code { text-align: center; } +.valign-center { + display:flex; + align-items: center; + justify-content: center; +} + .justify-center { justify-content: center; align-items: center; @@ -144,6 +155,10 @@ code.highlighter-rouge, mark.code { padding: 5px; } +.vpad-small { + padding: 5px 0; +} + .mb-1 { margin-bottom: 1em; } @@ -251,6 +266,15 @@ ul.list-inline { height: 80px; } +.explainer-icon { + height: 30px; + margin-right: 5px; +} + +.rustpy-name { + padding: 5px 7px; +} + .goal { line-height: 1.5em; } From a7ad83380b6f0eba30a3d252658975246cec2b91 Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Wed, 9 Dec 2020 20:24:49 -0600 Subject: [PATCH 2/3] Make stuff look better on medium-width devices and phones --- _layouts/home.html | 14 ++++++-------- assets/media.css | 8 +++++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/_layouts/home.html b/_layouts/home.html index b190f4640..fcd91162e 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -2,15 +2,15 @@ layout: default --- - -

+ +
-
+
{{ site.title }}

@@ -20,12 +20,10 @@

-
- - -
-
+ + +
diff --git a/assets/media.css b/assets/media.css index ed39f8e14..ea178282b 100644 --- a/assets/media.css +++ b/assets/media.css @@ -34,7 +34,7 @@ } -/* desktop , tablets */ +/* smaller laptops, tablets */ @media (min-width: 768px) { .mt-md-4 { margin-top: 4em; @@ -85,6 +85,12 @@ } } +@media (min-width: 1366px) { + .w-lg-25 { + width: 25%; + } +} + /* fixes for ipad */ @media (min-width: 992px) { From 6a67128b9a6789e8f2d38317ae3a49d0161a270f Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Wed, 9 Dec 2020 20:52:19 -0600 Subject: [PATCH 3/3] Change the explainer text --- index.markdown | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/index.markdown b/index.markdown index c34f0a9e8..22376fe3e 100644 --- a/index.markdown +++ b/index.markdown @@ -3,7 +3,11 @@ # To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults layout: home -explainer: "CPython is the common implementation of Python. We love C, but we love Rust a little more 😉... that's why we're working on a RustPython, a Python implementation written in Rust. We are doing it for fun, to learn about writing interpreters, and to have a useful, usable and embeddable implementation of Python in Rust." +explainer: + RustPython is a Python interpreter written in Rust. RustPython can be + embedded into Rust programs to use Python as a scripting language for your + application, or it can be compiled to WebAssembly in order to run Python + in the browser. RustPython is free and open-source under the MIT license. build-from-source-link: https://github.com/RustPython/RustPython @@ -19,8 +23,23 @@ installation: - command: "conda install rustpython -c conda-forge" goals: - - goal: "Full Python-3 environment entirely in Rust (not CPython bindings) with a clean implementation, without compatiblity hacks. " - - goal: "Fast, reliable and secure implementation of Python that can be used with Rust or compiled to WebAssembly. " + - goal: + Full Python-3 environment entirely in Rust (not CPython bindings), with + a clean implementation and no compatiblity hacks. + # TODO: integrate this into the "goals" boxes + progress: + # TODO: actually measure how much of the test suite we run + RustPython can currently run a little less than half of the CPython + regression test suite, and our API is relatively unstable and + doesn't require decades of backwards-compatibility. + - goal: + Fast, reliable and secure implementation of Python that can be used + from Rust or compiled to WebAssembly. + progress: + RustPython currently runs about 10 times slower than CPython, but there's + still lots of optimizations to be made. RustPython can be easily embedded + into Rust programs simply by adding a line to Cargo.toml, and natively + supports WebAssembly; see our demo above. --- # Why RustPython?