Skip to content

Commit 2b5fc81

Browse files
committed
Merge #57: Update SimplicityHL to latest released version
66e1a6a remove use of deprecated encoding function (Andrew Poelstra) 67720ab SimplicityHl: use released version 0.3 (Andrew Poelstra) 6715eb1 SimplicityHL: use released version 0.2 (Andrew Poelstra) 12c7daf clippy: turn on a bunch of pedantic lints (Andrew Poelstra) 1858e6d clippy: fix a bunch of "trivial" lints (Andrew Poelstra) ab54fed delete merkle.rs and unused supporting code (Andrew Poelstra) 837cb9c Define a MSRV of 1.78.0 (Andrew Poelstra) Pull request description: Should unblock #56 After this and #56 we should cut a new release and attempt to update the production site. ACKs for top commit: delta1: ACK 66e1a6a; ran cargo test locally Tree-SHA512: a978c947e4eeef2a9c341cef0a4d41891ced5c3aabb35ec415ba35d68da30ef5301d520be0da32958bb28e57f16c9888a4101a722d184c6dd9ad5ca775f1e9fe
2 parents d9e83ef + 66e1a6a commit 2b5fc81

File tree

20 files changed

+444
-317
lines changed

20 files changed

+444
-317
lines changed

Cargo.lock

Lines changed: 232 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 127 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ lib-profile-release = "wasm-release"
1414

1515
[dependencies]
1616
itertools = "0.13.0"
17-
#simplicityhl = "0.2.0"
18-
simplicityhl = { package = "simfony", git = "https://github.com/BlockstreamResearch/simplicityhl", rev = "d5284014e9f67593e50b272f1f676ea8d09f6ec8" }
17+
simplicityhl = { version = "0.3.0" }
1918
leptos = { version = "0.6.14", features = ["csr"] }
2019
leptos_router = { version = "0.6.15", features = ["csr"] }
2120
console_error_panic_hook = "0.1.7"
@@ -34,3 +33,129 @@ serde_json = "1.0"
3433

3534
[dev-dependencies]
3635
wasm-bindgen-test = "0.3.50"
36+
37+
[lints.clippy]
38+
# Exclude lints we don't think are valuable.
39+
needless_question_mark = "allow" # https://github.com/rust-bitcoin/rust-bitcoin/pull/2134
40+
manual_range_contains = "allow" # More readable than clippy's format.
41+
needless_raw_string_hashes = "allow" # No reason not to use raw strings
42+
uninlined_format_args = "allow" # This is a subjective style choice.
43+
float_cmp = "allow" # Bitcoin floats are typically limited to 8 decimal places and we want them exact.
44+
manual_let_else = "allow" # unsure about this one on stylistic grounds
45+
map_unwrap_or = "allow" # encourages use of `map_or_else` which takes two closures that the reader can't really distinguish
46+
match_bool = "allow" # Adds extra indentation and LOC.
47+
match_same_arms = "allow" # Collapses things that are conceptually unrelated to each other.
48+
must_use_candidate = "allow" # Useful for audit but many false positives.
49+
similar_names = "allow" # Too many (subjectively) false positives.
50+
single_match_else = "allow" # bad style; creates long lines and extra lines
51+
# Exhaustive list of pedantic clippy lints
52+
assigning_clones = "warn"
53+
bool_to_int_with_if = "warn"
54+
borrow_as_ptr = "warn"
55+
case_sensitive_file_extension_comparisons = "warn"
56+
cast_lossless = "warn"
57+
cast_possible_truncation = "allow" # All casts should include a code comment (except test code).
58+
cast_possible_wrap = "allow" # Same as above re code comment.
59+
cast_precision_loss = "warn"
60+
cast_ptr_alignment = "warn"
61+
cast_sign_loss = "allow" # All casts should include a code comment (except in test code).
62+
checked_conversions = "warn"
63+
cloned_instead_of_copied = "warn"
64+
copy_iterator = "warn"
65+
default_trait_access = "warn"
66+
doc_link_with_quotes = "warn"
67+
doc_markdown = "warn"
68+
empty_enum = "warn"
69+
enum_glob_use = "warn"
70+
expl_impl_clone_on_copy = "warn"
71+
explicit_deref_methods = "warn"
72+
explicit_into_iter_loop = "warn"
73+
explicit_iter_loop = "warn"
74+
filter_map_next = "warn"
75+
flat_map_option = "warn"
76+
fn_params_excessive_bools = "warn"
77+
from_iter_instead_of_collect = "warn"
78+
if_not_else = "warn"
79+
ignored_unit_patterns = "warn"
80+
implicit_clone = "warn"
81+
implicit_hasher = "warn"
82+
inconsistent_struct_constructor = "warn"
83+
index_refutable_slice = "warn"
84+
inefficient_to_string = "warn"
85+
inline_always = "warn"
86+
into_iter_without_iter = "warn"
87+
invalid_upcast_comparisons = "warn"
88+
items_after_statements = "warn"
89+
iter_filter_is_ok = "warn"
90+
iter_filter_is_some = "warn"
91+
iter_not_returning_iterator = "warn"
92+
iter_without_into_iter = "warn"
93+
large_digit_groups = "warn"
94+
large_futures = "warn"
95+
large_stack_arrays = "warn"
96+
large_types_passed_by_value = "warn"
97+
linkedlist = "warn"
98+
macro_use_imports = "warn"
99+
manual_assert = "warn"
100+
manual_instant_elapsed = "warn"
101+
manual_is_power_of_two = "warn"
102+
manual_is_variant_and = "warn"
103+
manual_ok_or = "warn"
104+
manual_string_new = "warn"
105+
many_single_char_names = "warn"
106+
match_wildcard_for_single_variants = "warn"
107+
maybe_infinite_iter = "warn"
108+
mismatching_type_param_order = "warn"
109+
missing_errors_doc = "allow" # FIXME this triggers 184 times; we should fix most
110+
missing_fields_in_debug = "warn"
111+
missing_panics_doc = "allow" # FIXME this one has 40 triggers
112+
mut_mut = "warn"
113+
naive_bytecount = "warn"
114+
needless_bitwise_bool = "warn"
115+
needless_continue = "warn"
116+
needless_for_each = "warn"
117+
needless_pass_by_value = "warn"
118+
no_effect_underscore_binding = "warn"
119+
no_mangle_with_rust_abi = "warn"
120+
option_as_ref_cloned = "warn"
121+
option_option = "warn"
122+
ptr_as_ptr = "warn"
123+
ptr_cast_constness = "warn"
124+
pub_underscore_fields = "warn"
125+
range_minus_one = "warn"
126+
range_plus_one = "warn"
127+
redundant_closure_for_method_calls = "warn"
128+
redundant_else = "warn"
129+
ref_as_ptr = "warn"
130+
ref_binding_to_reference = "warn"
131+
ref_option = "warn"
132+
ref_option_ref = "warn"
133+
return_self_not_must_use = "warn"
134+
same_functions_in_if_condition = "warn"
135+
semicolon_if_nothing_returned = "warn"
136+
should_panic_without_expect = "warn"
137+
single_char_pattern = "warn"
138+
stable_sort_primitive = "warn"
139+
str_split_at_newline = "warn"
140+
string_add_assign = "warn"
141+
struct_excessive_bools = "warn"
142+
struct_field_names = "warn"
143+
too_many_lines = "allow" # FIXME 14 triggers for this lint; probably most should be fixed
144+
transmute_ptr_to_ptr = "warn"
145+
trivially_copy_pass_by_ref = "warn"
146+
unchecked_duration_subtraction = "warn"
147+
unicode_not_nfc = "warn"
148+
unnecessary_box_returns = "warn"
149+
unnecessary_join = "warn"
150+
unnecessary_literal_bound = "warn"
151+
unnecessary_wraps = "warn"
152+
unnested_or_patterns = "warn"
153+
unreadable_literal = "warn"
154+
unsafe_derive_deserialize = "warn"
155+
unused_async = "warn"
156+
unused_self = "warn"
157+
used_underscore_binding = "warn"
158+
used_underscore_items = "warn"
159+
verbose_bit_mask = "warn"
160+
wildcard_imports = "warn"
161+
zero_sized_map_values = "warn"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ SimplicityHL looks and feels like [Rust](https://www.rust-lang.org). Just how Ru
66

77
[A live demo is running](https://ide.simplicity-lang.org).
88

9+
This project should build on Rust **1.78.0**.
10+
911
## Develop the project
1012

1113
### Using Docker

clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
msrv = "1.78.0"

src/components/analysis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use leptos::*;
1+
use leptos::{component, view, IntoView, ReadSignal, Signal, SignalGet};
22
use std::str::FromStr;
33
use std::sync::Arc;
44

src/components/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn App() -> impl IntoView {
2828
provide_context(ActiveRunTab::default());
2929

3030
if program.is_empty() {
31-
select_example(examples::get("✍️️ P2PK").expect("P2PK example should exist"))
31+
select_example(examples::get("✍️️ P2PK").expect("P2PK example should exist"));
3232
}
3333

3434
view! {

src/components/footer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use leptos::{component, create_signal, view, IntoView, SignalGet, SignalSet, *};
1+
use leptos::{component, create_signal, view, wasm_bindgen, IntoView, SignalGet, SignalSet};
22
use wasm_bindgen::JsCast;
33

44
#[cfg(target_arch = "wasm32")]
@@ -69,7 +69,7 @@ fn NewsletterForm() -> impl IntoView {
6969

7070
spawn_local(async move {
7171
match subscribe_to_newsletter(email_value).await {
72-
Ok(_) => {
72+
Ok(()) => {
7373
set_status.set(FormStatus::Success);
7474
set_message
7575
.set("Thank you for subscribing! We'll keep you updated.".to_string());

src/components/merkle.rs

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/components/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::needless_pass_by_value)] // leptos has broken lifetime parsing
2+
13
mod analysis;
24
mod app;
35
mod copy_to_clipboard;

src/components/navbar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn Navbar(
2323
match child {
2424
TabView::Tab { name, children } => {
2525
tabs_content.push((name, children));
26-
button_bar.push(view! {<TabButton tab_name=name active_tab=active_tab />})
26+
button_bar.push(view! {<TabButton tab_name=name active_tab=active_tab />});
2727
}
2828
TabView::Button { children } => button_bar.push(children().into_view()),
2929
}

0 commit comments

Comments
 (0)