Skip to content

Commit

Permalink
upgrade to v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hitchhooker committed Nov 26, 2023
1 parent 551c9f6 commit f999961
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 37 deletions.
137 changes: 112 additions & 25 deletions Cargo.lock

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

21 changes: 11 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ version = "0.1.0"
edition = "2021"

[dependencies]
gloo-net = { version = "0.2", features = ["http"] }
leptos = { version = "0.5.0-rc2", features = ["csr", "nightly"] }
leptos_meta = { version = "0.5.0-rc2", features = ["csr", "nightly"] }
leptos_router = { version = "0.5.0-rc2", features = ["csr", "nightly"] }
polkavm = "0.1.1"
js-sys = "0.3.64"
web-sys = { version = "0.3.64", features = ["HtmlInputElement", "DataTransfer", "DragEvent", "File", "FileList", "FileReader", "ProgressEvent"] }
cargo_toml = "0.17.1"
gloo-net = { version = "0.4", features = ["http"] }
leptos = { version = "0.5.2", features = ["csr", "nightly"] }
leptos_meta = { version = "0.5.2", features = ["csr", "nightly"] }
leptos_router = { version = "0.5.2", features = ["csr", "nightly"] }
polkavm = "0.2.0"
js-sys = "0.3.65"
web-sys = { version = "0.3.65", features = ["HtmlInputElement", "DataTransfer", "DragEvent", "File", "FileList", "FileReader", "ProgressEvent"] }

# dependecies for client (enable when csr or hydrate set)
wasm-bindgen = { version = "0.2" }
log = "0.4.17"
wasm-bindgen = { version = "0.2.88" }
log = "0.4.20"
console_log = { version = "1"}
console_error_panic_hook = { version = "0.1"}
console_error_panic_hook = { version = "0.1.7"}

[workspace.metadata.leptos]
name = "polkarun"
8 changes: 6 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::rc::Rc;
use wasm_bindgen::{closure::Closure, JsCast};
use web_sys::{DragEvent, File, FileReader, HtmlInputElement, ProgressEvent};


#[component]
pub fn App() -> impl IntoView {
provide_meta_context();
Expand Down Expand Up @@ -35,7 +36,7 @@ fn Navigation() -> impl IntoView {
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250" height="40" width="40">
<path fill="#E1FF66" class="octo-background" d="M 249.57771,250.29409 C 163.6834,162.06673 87.406263,88.122635 -0.4222853,0.29408743 H 249.57771 Z"></path>
<path fill="currentColor" class="octo-body" d="m 194.57892,71.296301 c -2,-4 -5.00268,-7.999511 -9.00269,-11.999515 -3.99999,-3.999997 -7.9995,-7.002681 -11.9995,-9.002681 -4.00001,-14.000002 -8.99659,-16.998292 -8.99659,-16.998292 -8,3.999999 -11.00464,8.998533 -11.00462,10.998545 -6.00001,0 -10.99732,2.000735 -15.99732,7.000731 -16,16.000004 -10.00195,29.997316 -2.00195,40.997318 -3,0 -6.99854,0.998782 -10.99855,4.998771 L 113.57917,109.2968 c -2,1 -5.99975,-1.00097 -5.99975,-1.00097 l 26.99584,26.99584 c 0,0 -1.99999,-3.99877 0,-4.99877 l 14.00147,-14.00147 c 2.00001,-3 3.00294,-5.9956 3.00293,-7.9956 11,8 23.99732,14.99804 40.99732,-2.00195 5,-5.00001 7.00073,-9.997326 7.00073,-15.997325 -0.90398,-9.744341 -2.80609,-14.23012 -4.99878,-19.000243 z"></path>
<path fill="currentColor" class="octo-arm" d="m 121.28633,101.84712 c -14.99999,-9.000009 -8.99999,-19.00001 -8.99999,-19.00001 2.99999,-6.999997 1.99999,-10.999997 1.99999,-10.999997 -1,-7.000002 3,-1.999998 3,-1.999998 4.00001,4.999996 2,11 2,11 -2.99999,9.999998 5.00001,14.999998 9,15.999996" style="transform-origin: 110px 120px;"></path>
<path fill="currentColor" class="octo-arm" sd="m 121.28633,101.84712 c -14.99999,-9.000009 -8.99999,-19.00001 -8.99999,-19.00001 2.99999,-6.999997 1.99999,-10.999997 1.99999,-10.999997 -1,-7.000002 3,-1.999998 3,-1.999998 4.00001,4.999996 2,11 2,11 -2.99999,9.999998 5.00001,14.999998 9,15.999996" style="transform-origin: 110px 120px;"></path>
<path fill="currentColor" class="octo-ear" d="m 210.61601,77.354548 c 0,0 -2.99732,-5.000738 -15.99732,-7.000737 -0.0144,-0.02843 0.007,0.01428 0,0 -0.007,-0.01428 -3.99055,0.468874 -3.99055,0.468874 l 5.4469,19.797551 3.57294,-1.284473 c 2.01561,-1.004006 6.98378,-3.016688 10.96801,-11.981199 z" style="transform-origin: 100px 80px;"></path>
<path fill="#E1FF66" class="octo-face" d="m 157.89355,66.610672 c -3.6953,-3.732717 -7.91112,-5.499913 -12.18983,-5.109056 -4.40252,0.402191 -7.13979,2.856546 -7.87463,3.598819 -7.07601,7.147691 -5.83073,16.6566 3.50711,26.774603 1.74973,1.898424 3.65469,3.889989 5.66306,5.91869 1.98876,2.008926 3.9938,3.970152 5.96079,5.829492 11.66194,11.03287 19.88339,7.51635 24.72642,2.62392 4.69996,-4.74761 6.92511,-12.647837 -0.93566,-20.588227 -0.19312,-0.195097 -0.5156,-0.479793 -1.31843,-1.179779 -1.71474,-1.495896 -4.90485,-4.280358 -7.8452,-7.250494 -3.2474,-3.28029 -6.32518,-6.797215 -8.16252,-8.899526 -0.85763,-0.980686 -1.27935,-1.464133 -1.5311,-1.718439 z"></path>
<path fill="currentColor" class="octo-mouth" d="m 152.14888,95.779316 c -0.16786,-0.167854 -0.4399,-0.167678 -0.60757,-6e-6 -0.66926,0.669255 -2.20394,0.630882 -3.25661,-0.42178 -0.15188,-0.151888 -0.28137,-0.314719 -0.39094,-0.484545 -0.27436,-0.424649 -0.42501,-0.891266 -0.49172,-1.329545 -0.0135,-0.08772 -0.0233,-0.174308 -0.0303,-0.259131 -0.021,-0.254464 -0.0144,-0.493507 0.0111,-0.702245 0.0423,-0.347542 0.13665,-0.610438 0.24371,-0.717497 0.16767,-0.167672 0.16785,-0.439717 0,-0.607563 -0.16785,-0.167854 -0.43989,-0.167672 -0.60756,-10e-7 -0.0866,0.08662 -0.16552,0.201023 -0.23441,0.337652 -0.10292,0.205165 -0.18327,0.460877 -0.23241,0.749235 -0.0491,0.288359 -0.0669,0.609536 -0.0456,0.945785 0.0215,0.336058 0.0827,0.68736 0.19117,1.036157 0.13593,0.435767 0.34628,0.867413 0.6472,1.260503 0.10041,0.130907 0.21071,0.257691 0.33174,0.37874 0.63088,0.63088 1.38245,0.973575 2.10837,1.079738 0.10362,0.01503 0.20695,0.02546 0.30898,0.03102 0.20444,0.01112 0.40511,0.0038 0.59878,-0.02134 0.48383,-0.06276 0.92265,-0.235099 1.26338,-0.498709 0.0681,-0.05273 0.13235,-0.109022 0.19225,-0.168918 0.16821,-0.167853 0.16803,-0.439896 3.6e-4,-0.607565 z"></path>
Expand Down Expand Up @@ -115,9 +116,12 @@ fn Disassembler() -> impl IntoView {
let (unified_data, set_unified_data) = create_signal(Vec::new());
let (disassembled_data, set_disassembled_data) = create_signal(String::new());

let version = "0.2"; // TODO: we should generate this from Cargo.toml instead of hardcoding
let title = format!("polkavm-v{} disassembler", version).to_string();

view! {
<div class="my-0 mx-auto max-w-3xl p-6">
<h2 class="text-4xl text-center">"polkavm disassembler"</h2>
<h2 class="text-4xl text-center">{title}</h2>
<FileUploadComponent on_file_uploaded=move |data_option| {
if let Some(data) = data_option {
set_unified_data(unified_representation(&data));
Expand Down

0 comments on commit f999961

Please sign in to comment.