diff --git a/docs/debugging.md b/docs/debugging.md index f10624bdc..ca62e7aec 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -31,7 +31,7 @@ export NATIVE_DEBUG_TRAP_AT_STMT=10 The trap instruction may not end up exactly where the statement is. If we want to manually set the breakpoint (for example, when executing a particular libfunc), then we can use the `DebugUtils` metadata in the code. -```rust,ignore +```rust,no_run #[cfg(feature = "with-debug-utils")] { metadata.get_mut::() @@ -65,7 +65,7 @@ export RUST_LOG="cairo_native=trace" - Try to find the minimal program to reproduce an issue, the more isolated the easier to test. - Use the `debug_utils` print utilities, more info [here](https://lambdaclass.github.io/cairo_native/cairo_native/metadata/debug_utils/struct.DebugUtils.html): -```rust,ignore +```rust,no_run #[cfg(feature = "with-debug-utils")] { metadata.get_mut::() @@ -139,7 +139,7 @@ hash, but a chain of contract/library calls. To know which contract is being called we can add some debugging prints in the replay that logs contract executions. For example: -```rust,ignore +```rust,no_run impl StarknetSyscallHandler for ReplaySyscallHandler { // ... @@ -204,7 +204,7 @@ An idea on how to do that is modifying Cairo native so that it adds a breakpoint every time a constant with that error message is generated. For example: -```rust,ignore +```rust,no_run /// Generate MLIR operations for the `felt252_const` libfunc. pub fn build_const<'ctx, 'this>( context: &'ctx Context, diff --git a/docs/execution_walkthrough.md b/docs/execution_walkthrough.md index fd6b645bb..c7fedfbf7 100644 --- a/docs/execution_walkthrough.md +++ b/docs/execution_walkthrough.md @@ -2,7 +2,7 @@ Given the following Cairo program: -```rust,ignore +```rust // This is the cairo program. It just adds two numbers together and returns the // result in an enum whose variant is selected using the result's parity. enum Parity { diff --git a/docs/gas_builtin_accounting.md b/docs/gas_builtin_accounting.md index a88636f8c..b849df358 100644 --- a/docs/gas_builtin_accounting.md +++ b/docs/gas_builtin_accounting.md @@ -52,7 +52,7 @@ amount being withdrawn. ### Example Let's illustrate this with a simple example using the following Cairo 1 code: -```rust,ignore +```rust,no_run fn run_test() { let mut i: u8 = 0; let mut val = 0; @@ -174,7 +174,7 @@ called from within the program. ### Example Let us consider the following Cairo program which uses the `pedersen` builtin: -```rust,ignore +```rust,no_run use core::integer::bitwise; use core::pedersen::pedersen; diff --git a/docs/implementing_libfuncs.md b/docs/implementing_libfuncs.md index 31b558713..603cbfc10 100644 --- a/docs/implementing_libfuncs.md +++ b/docs/implementing_libfuncs.md @@ -65,7 +65,7 @@ Libfuncs are implemented under `src/libfuncs.rs` and Using the `src/libfuncs/felt252.rs` libfuncs as a aid: -```rust,ignore +```rust,no_run /// Select and call the correct libfunc builder function from the selector. pub fn build<'ctx, 'this, TType, TLibfunc>( context: &'ctx Context, @@ -107,7 +107,7 @@ the `src/libfuncs.rs` match statement. ### Example libfunc implementation: u8_to_felt252 An example libfunc, converting a u8 to a felt252, extensively commented: -```rust,ignore +```rust,no_run /// Generate MLIR operations for the `u8_to_felt252` libfunc. pub fn build_to_felt252<'ctx, 'this, TType, TLibfunc>( // The Context from MLIR, this is like the heart of the MLIR API, its required to create most stuff like types. diff --git a/docs/overview.md b/docs/overview.md index e524dd60a..01bfe289f 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -138,7 +138,7 @@ lowering to LLVM. compiled sierra programs from an entrypoint. Programs and JIT states can be cached in contexts where their execution will be done multiple times. -```rust,ignore +```rust,no_run use starknet_types_core::felt::Felt; use cairo_native::context::NativeContext; use cairo_native::executor::JitNativeExecutor; @@ -182,7 +182,7 @@ execute a program using the JIT. Example code to run a program: -```rust,ignore +```rust,no_run use starknet_types_core::felt::Felt; use cairo_native::context::NativeContext; use cairo_native::executor::NativeExecutor; @@ -225,7 +225,7 @@ fn main() { Example code to run a Starknet contract: -```rust,ignore +```rust,no_run use starknet_types_core::felt::Felt; use cairo_lang_compiler::CompilerConfig; use cairo_lang_starknet::contract_class::compile_path; diff --git a/src/metadata/debug_utils.rs b/src/metadata/debug_utils.rs index 4da04050c..d5bbc9c1e 100644 --- a/src/metadata/debug_utils.rs +++ b/src/metadata/debug_utils.rs @@ -4,7 +4,7 @@ //! //! ## Example //! -//! ```rust,ignore +//! ```rust,no_run //! # use cairo_lang_sierra::{ //! # extensions::{ //! # core::{CoreLibfunc, CoreType},