Skip to content

Commit 3d4dcb6

Browse files
realise we can't generate smart contracts as its now in another repo 🤔
1 parent 53a879c commit 3d4dcb6

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

‎.husky/pre-push‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
bun run lint:markdown
2-
bun run check:links
3-
bun run script:generate-smart-contract-docs
2+
bun run script:links
43
bun run build

‎src/pages/provers/terminology.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ A request - sometimes called an order - placed on the Boundless Market includes:
4646

4747
Also referred to as the client, the party submitting orders to the market, and receiving proofs from the Boundless Market.
4848

49-
[page-proof-lifecycle]: /provers/proof-lifecycle
49+
[page-proof-lifecycle]: /developers/proof-lifecycle
5050
[r0-page-dev-mode]: https://dev.risczero.com/api/next/generating-proofs/dev-mode
5151
[r0-term-clock-cycles]: https://dev.risczero.com/terminology#clock-cycles
5252
[r0-term-guest-program]: https://dev.risczero.com/terminology#guest-program

‎test-rust-code/build.rs‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414

1515
use glob::glob;
1616
use regex::Regex;
17-
use std::{
18-
fmt::{Write},
19-
fs,
20-
};
17+
use std::{fmt::Write, fs};
2118

2219
#[derive(Debug)]
2320
struct RustSnippet {
@@ -26,8 +23,8 @@ struct RustSnippet {
2623
}
2724

2825
fn main() {
29-
let mut rust_code = String::from(
30-
r#"// ---------------------------------------------------------------------------
26+
let mut rust_code = String::from(
27+
r#"// ---------------------------------------------------------------------------
3128
// DO NOT EDIT THIS FILE!
3229
//
3330
// This file is automatically generated by `build.rs`. It collects all Rust
@@ -38,27 +35,33 @@ r#"// --------------------------------------------------------------------------
3835
//
3936
// To make changes, edit the Rust snippets in the `.mdx` files directly.
4037
// ---------------------------------------------------------------------------
41-
"#);
38+
"#,
39+
);
4240
let pattern = "../src/pages/**/*.mdx"; // Original glob
4341
for entry in glob(pattern).unwrap() {
4442
let path = entry.unwrap();
4543
println!("cargo:rerun-if-changed={}", path.display());
4644

4745
let content = fs::read_to_string(&path).expect("Failed to read file");
48-
46+
4947
let snippets = extract_rust_snippets(&content);
5048
if snippets.is_empty() {
5149
continue;
5250
}
5351

54-
let stem = path.file_stem().unwrap().to_str().unwrap().replace('-', "_");
52+
let stem = path
53+
.file_stem()
54+
.unwrap()
55+
.to_str()
56+
.unwrap()
57+
.replace('-', "_");
5558

5659
for (i, snippet) in snippets.iter().enumerate() {
5760
writeln!(rust_code, "#[test]").unwrap();
5861
if !snippet.should_run {
5962
writeln!(rust_code, "#[ignore]").unwrap();
6063
}
61-
64+
6265
writeln!(rust_code, "#[allow(dead_code, unused_assignments, unused_variables, unused_imports, unused_mut, non_snake_case)]").unwrap();
6366
writeln!(rust_code, "fn {stem}_mdx_{i}_test() {{").unwrap();
6467
writeln!(rust_code, "{}", snippet.content).unwrap();
@@ -143,4 +146,4 @@ fn extract_rust_snippets(content: &str) -> Vec<RustSnippet> {
143146
}
144147
})
145148
.collect()
146-
}
149+
}

0 commit comments

Comments
 (0)