repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/setup_program_test/duplicate_wallet_names.rs
packages/fuels-macros/tests/ui/setup_program_test/duplicate_wallet_names.rs
use fuels_macros::setup_program_test; setup_program_test!( Wallets("wallet1", "wallet1"), Abigen(Contract(name = "MyContract", project = "some_project")) ); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/setup_program_test/abigen_command_is_missing.rs
packages/fuels-macros/tests/ui/setup_program_test/abigen_command_is_missing.rs
use fuels_macros::setup_program_test; setup_program_test!(Deploy( name = "some_instance", contract = "SomeUnknownContract", wallet = "some_wallet" )); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/setup_program_test/unknown_contract.rs
packages/fuels-macros/tests/ui/setup_program_test/unknown_contract.rs
use fuels_macros::setup_program_test; setup_program_test!( Abigen(Contract(project = "some_project", name = "MismatchedName")), Deploy( name = "some_instance", contract = "SomeUnknownContract", wallet = "some_wallet" ) ); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/setup_program_test/invalid_path.rs
packages/fuels-macros/tests/ui/setup_program_test/invalid_path.rs
use fuels_macros::setup_program_test; setup_program_test!(Abigen(Contract( name = "MyContract", project = "some_project" ))); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/setup_program_test/duplicate_wallet_command.rs
packages/fuels-macros/tests/ui/setup_program_test/duplicate_wallet_command.rs
use fuels_macros::setup_program_test; setup_program_test!( Wallets("wallet1"), Wallets("wallet2"), Abigen(Contract(name = "MyContract", project = "some_project")) ); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/setup_program_test/unknown_options_value.rs
packages/fuels-macros/tests/ui/setup_program_test/unknown_options_value.rs
use fuels_macros::setup_program_test; setup_program_test!(Options(profile = "not_a_profile")); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/abigen/unrecognized_attribute.rs
packages/fuels-macros/tests/ui/abigen/unrecognized_attribute.rs
use fuels_macros::abigen; abigen!(Contract( name = "SomeName", abi = "some-abi.json", unknown = "something" )); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/abigen/missing_abi_attribute.rs
packages/fuels-macros/tests/ui/abigen/missing_abi_attribute.rs
use fuels_macros::abigen; abigen!(Contract(name = "SomeName")); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/abigen/missing_name_attr.rs
packages/fuels-macros/tests/ui/abigen/missing_name_attr.rs
use fuels_macros::abigen; abigen!(Contract(abi = "some-abi.json")); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/abigen/invalid_abi_value.rs
packages/fuels-macros/tests/ui/abigen/invalid_abi_value.rs
use fuels_macros::abigen; abigen!(Contract(name = "SomeName", abi = true,)); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/abigen/duplicate_attribute.rs
packages/fuels-macros/tests/ui/abigen/duplicate_attribute.rs
use fuels_macros::abigen; abigen!(Contract( abi = "some-abi.json", abi = "some-abi2.json", name = "SomeName", abi = "some-abi3.json", )); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/abigen/malformed_abi.rs
packages/fuels-macros/tests/ui/abigen/malformed_abi.rs
use fuels_macros::abigen; abigen!(Contract(name = "SomeName", abi = r#"{}"#)); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/abigen/invalid_program_type.rs
packages/fuels-macros/tests/ui/abigen/invalid_program_type.rs
use fuels_macros::abigen; abigen!(SomeInvalidProgramType( name = "SomeName", abi = "some-abi.json" )); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/abigen/invalid_abi_path.rs
packages/fuels-macros/tests/ui/abigen/invalid_abi_path.rs
use fuels_macros::abigen; abigen!(Contract(name = "SomeName", abi = "some_abi.json")); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/abigen/invalid_name_value.rs
packages/fuels-macros/tests/ui/abigen/invalid_name_value.rs
use fuels_macros::abigen; abigen!(Contract(name = true, abi = "some-abi.json",)); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/derive/tokenizable/only_one_variant_element_supported.rs
packages/fuels-macros/tests/ui/derive/tokenizable/only_one_variant_element_supported.rs
use fuels_macros::Tokenizable; #[derive(Tokenizable)] enum SomeEnum { // problem because no elements present B(), } #[derive(Tokenizable)] enum AnotherEnum { A(u64, u32), } fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/derive/tokenizable/tuple_like_structs_not_supported.rs
packages/fuels-macros/tests/ui/derive/tokenizable/tuple_like_structs_not_supported.rs
use fuels_macros::Tokenizable; #[derive(Tokenizable)] struct SomeStruct(pub u64, pub String); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/derive/tokenizable/struct_like_enum_variants_not_supported.rs
packages/fuels-macros/tests/ui/derive/tokenizable/struct_like_enum_variants_not_supported.rs
use fuels_macros::Tokenizable; #[derive(Tokenizable)] enum SomeEnum { A, B { something: u64 }, } fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/derive/tokenizable/only_generic_types_are_supported.rs
packages/fuels-macros/tests/ui/derive/tokenizable/only_generic_types_are_supported.rs
use fuels_macros::Tokenizable; #[derive(Tokenizable)] enum SomeEnum<const T: usize> { A, } #[derive(Tokenizable)] enum AnotherEnum<'a> { A(&'a u64), } #[derive(Tokenizable)] struct SomeStruct<const T: usize> {} #[derive(Tokenizable)] struct AnotherStruct<'a> { a: &'a u64, } fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/derive/parameterize/attribute_must_be_named_value.rs
packages/fuels-macros/tests/ui/derive/parameterize/attribute_must_be_named_value.rs
use fuels_macros::Parameterize; #[derive(Parameterize)] #[FuelsTypesPath] enum SomeEnum { A(u8), } #[derive(Parameterize)] #[FuelsTypesPath = true] struct SomeStruct {} fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/derive/parameterize/only_one_variant_element_supported.rs
packages/fuels-macros/tests/ui/derive/parameterize/only_one_variant_element_supported.rs
use fuels_macros::Parameterize; #[derive(Parameterize)] enum SomeEnum { // problem because no elements present B(), } #[derive(Parameterize)] enum AnotherEnum { A(u64, u32), } fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/derive/parameterize/tuple_like_structs_not_supported.rs
packages/fuels-macros/tests/ui/derive/parameterize/tuple_like_structs_not_supported.rs
use fuels_macros::Parameterize; #[derive(Parameterize)] struct SomeStruct(pub u64, pub String); fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/derive/parameterize/struct_like_enum_variants_not_supported.rs
packages/fuels-macros/tests/ui/derive/parameterize/struct_like_enum_variants_not_supported.rs
use fuels_macros::Parameterize; #[derive(Parameterize)] enum SomeEnum { A, B { something: u64 }, } fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-macros/tests/ui/derive/parameterize/only_generic_types_are_supported.rs
packages/fuels-macros/tests/ui/derive/parameterize/only_generic_types_are_supported.rs
use fuels_macros::Parameterize; #[derive(Parameterize)] enum SomeEnum<const T: usize> { A, } #[derive(Parameterize)] enum AnotherEnum<'a> { A(&'a u64), } #[derive(Parameterize)] struct SomeStruct<const T: usize> {} #[derive(Parameterize)] struct AnotherStruct<'a> { a: &'a u64, } fn main() {}
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/responses.rs
packages/fuels-programs/src/responses.rs
mod call; mod submit; pub use call::*; pub use submit::*;
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/contract.rs
packages/fuels-programs/src/contract.rs
mod storage; use std::fmt::Debug; use fuel_tx::{Bytes32, Contract as FuelContract, ContractId, Salt, StorageSlot}; pub use storage::*; /// Represents a contract that can be deployed either directly ([`Contract::regular`]) or through a loader [`Contract::convert_to_loader`]. /// Provides the ability to calculate the ...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/lib.rs
packages/fuels-programs/src/lib.rs
#[cfg(feature = "std")] pub mod calls; #[cfg(feature = "std")] pub mod contract; #[cfg(feature = "std")] pub mod executable; #[cfg(feature = "std")] pub mod responses; pub const DEFAULT_MAX_FEE_ESTIMATION_TOLERANCE: f32 = 0.50; pub mod debug; pub(crate) mod assembly; pub(crate) mod utils;
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/executable.rs
packages/fuels-programs/src/executable.rs
use fuels_core::{ Configurables, types::{ errors::{Context, Result}, transaction::Transaction, transaction_builders::{Blob, BlobTransactionBuilder}, tx_response::TxResponse, }, }; use crate::{ DEFAULT_MAX_FEE_ESTIMATION_TOLERANCE, assembly::script_and_predicate_loade...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/assembly.rs
packages/fuels-programs/src/assembly.rs
pub mod contract_call; pub mod cursor; pub mod script_and_predicate_loader;
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/debug.rs
packages/fuels-programs/src/debug.rs
use fuel_asm::{Instruction, Opcode}; use fuels_core::{error, types::errors::Result}; use itertools::Itertools; use crate::{ assembly::{ contract_call::{ContractCallData, ContractCallInstructions}, script_and_predicate_loader::{ LoaderCode, get_offset_for_section_containing_configurables...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/utils.rs
packages/fuels-programs/src/utils.rs
use fuels_core::types::errors::{Error, error}; pub fn prepend_msg<'a>(msg: impl AsRef<str> + 'a) -> impl Fn(Error) -> Error + 'a { move |err| match err { Error::IO(orig_msg) => { error!(IO, "{}: {}", msg.as_ref(), orig_msg) } Error::Codec(orig_msg) => { error!(Codec,...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls.rs
packages/fuels-programs/src/calls.rs
mod call_handler; mod contract_call; pub mod receipt_parser; mod script_call; pub mod traits; pub mod utils; pub use call_handler::*; pub use contract_call::*; use fuel_types::BlockHeight; pub use script_call::*; /// Used to control simulations/dry-runs #[derive(Debug, Clone)] pub struct Execution { execution_typ...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls/contract_call.rs
packages/fuels-programs/src/calls/contract_call.rs
use std::{collections::HashMap, fmt::Debug}; use fuels_core::{ constants::DEFAULT_CALL_PARAMS_AMOUNT, error, types::{ Address, AssetId, ContractId, Selector, errors::Result, input::Input, output::Output, param_types::ParamType, }, }; use crate::{assembly::contract_call::ContractCallDat...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls/receipt_parser.rs
packages/fuels-programs/src/calls/receipt_parser.rs
use std::collections::VecDeque; use fuel_tx::Receipt; use fuel_types::bytes::Bytes; use fuels_core::{ codec::{ABIDecoder, DecoderConfig}, types::{ ContractId, Token, errors::{Error, Result, error}, param_types::ParamType, }, }; pub struct ReceiptParser { receipts: VecDeque<Rece...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls/utils.rs
packages/fuels-programs/src/calls/utils.rs
use std::{collections::HashSet, iter, vec}; use fuel_abi_types::error_codes::FAILED_TRANSFER_TO_ADDRESS_SIGNAL; use fuel_asm::{RegId, op}; use fuel_tx::{ConsensusParameters, Output, PanicReason, Receipt, TxPointer, UtxoId}; use fuels_accounts::Account; use fuels_core::{ offsets::call_script_data_offset, types:...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls/call_handler.rs
packages/fuels-programs/src/calls/call_handler.rs
use crate::{ calls::{ CallParameters, ContractCall, Execution, ExecutionType, ScriptCall, receipt_parser::ReceiptParser, traits::{ContractDependencyConfigurator, ResponseParser, TransactionTuner}, utils::find_ids_of_missing_contracts, }, responses::{CallResponse, SubmitRespon...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls/traits.rs
packages/fuels-programs/src/calls/traits.rs
mod contract_dep_configurator; mod response_parser; mod transaction_tuner; pub use contract_dep_configurator::*; pub use response_parser::*; pub use transaction_tuner::*;
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls/script_call.rs
packages/fuels-programs/src/calls/script_call.rs
use std::{collections::HashSet, fmt::Debug}; use fuels_core::types::{ ContractId, errors::{Result, error}, input::Input, output::Output, }; use itertools::chain; use crate::calls::utils::{generate_contract_inputs, generate_contract_outputs, sealed}; #[derive(Debug, Clone)] /// Contains all data relev...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls/traits/contract_dep_configurator.rs
packages/fuels-programs/src/calls/traits/contract_dep_configurator.rs
use fuels_core::types::ContractId; use crate::calls::{ContractCall, ScriptCall, utils::sealed}; pub trait ContractDependencyConfigurator: sealed::Sealed { fn append_external_contract(&mut self, contract_id: ContractId); fn with_external_contracts(self, external_contracts: Vec<ContractId>) -> Self; } impl Con...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls/traits/response_parser.rs
packages/fuels-programs/src/calls/traits/response_parser.rs
use fuel_tx::Receipt; use fuels_core::{ codec::DecoderConfig, types::{Token, errors::Result, param_types::ParamType}, }; use crate::calls::{ContractCall, ScriptCall, receipt_parser::ReceiptParser, utils::sealed}; pub trait ResponseParser: sealed::Sealed { fn parse_call( &self, receipts: &[...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/calls/traits/transaction_tuner.rs
packages/fuels-programs/src/calls/traits/transaction_tuner.rs
use crate::calls::utils::calculate_required_asset_amounts; use crate::{ DEFAULT_MAX_FEE_ESTIMATION_TOLERANCE, calls::{ ContractCall, ScriptCall, utils::{build_with_tb, sealed, transaction_builder_from_contract_calls}, }, }; use fuel_tx::ConsensusParameters; use fuel_types::AssetId; use fuels...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/assembly/script_and_predicate_loader.rs
packages/fuels-programs/src/assembly/script_and_predicate_loader.rs
//! # Loader Module //! //! This module provides functionality for loading and processing binaries generated by Sway. //! **Important:** All functions within this module assume the binary adheres to the structure //! produced by Sway. Using binaries generated by other means (e.g., manually constructed binaries) //! may...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/assembly/cursor.rs
packages/fuels-programs/src/assembly/cursor.rs
use fuels_core::{error, types::errors::Result}; pub struct WasmFriendlyCursor<'a> { data: &'a [u8], } impl<'a> WasmFriendlyCursor<'a> { pub fn new(data: &'a [u8]) -> Self { Self { data } } pub fn consume(&mut self, amount: usize, ctx: &'static str) -> Result<&'a [u8]> { if self.data.l...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/assembly/contract_call.rs
packages/fuels-programs/src/assembly/contract_call.rs
use fuel_asm::{Instruction, RegId, Word, op}; use fuel_tx::{AssetId, ContractId}; use fuels_core::{constants::WORD_SIZE, error, types::errors::Result}; use super::cursor::WasmFriendlyCursor; #[derive(Debug)] pub struct ContractCallInstructions { instructions: Vec<Instruction>, gas_fwd: bool, } impl IntoItera...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/responses/submit.rs
packages/fuels-programs/src/responses/submit.rs
use std::fmt::Debug; use fuel_types::Bytes32; use fuels_accounts::Account; use fuels_core::{ traits::{Parameterize, Tokenizable}, types::errors::Result, }; use crate::{ calls::{ CallHandler, ContractCall, traits::{ContractDependencyConfigurator, ResponseParser, TransactionTuner}, }, ...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/responses/call.rs
packages/fuels-programs/src/responses/call.rs
use std::fmt::Debug; use fuel_tx::TxId; use fuels_core::{ codec::{LogDecoder, LogResult}, traits::{Parameterize, Tokenizable}, types::{errors::Result, tx_status::Success}, }; /// [`CallResponse`] is a struct that is returned by a call to the contract or script. Its value /// field holds the decoded typed ...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/contract/regular.rs
packages/fuels-programs/src/contract/regular.rs
use std::{default::Default, fmt::Debug, path::Path}; use fuel_tx::{StorageSlot, TxId}; use fuels_accounts::Account; use fuels_core::{ Configurables, constants::WORD_SIZE, error, types::{ Bytes32, ContractId, Salt, errors::{Context, Result}, transaction::{Transaction, TxPolicies}...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/contract/storage.rs
packages/fuels-programs/src/contract/storage.rs
use std::{ collections::HashMap, default::Default, fmt::Debug, io, path::{Path, PathBuf}, }; use fuel_tx::{Bytes32, StorageSlot}; use fuels_core::types::errors::{Result, error}; /// Configuration for contract storage #[derive(Debug, Clone)] pub struct StorageConfiguration { autoload_storage: b...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
FuelLabs/fuels-rs
https://github.com/FuelLabs/fuels-rs/blob/865e00c295de8b4a0a1ef7ac926c3c8266d5151b/packages/fuels-programs/src/contract/loader.rs
packages/fuels-programs/src/contract/loader.rs
use std::collections::HashSet; use fuel_tx::{Bytes32, ContractId, Salt, StorageSlot}; use fuels_accounts::Account; use fuels_core::{ constants::WORD_SIZE, types::{ errors::{Context, Result, error}, transaction::TxPolicies, transaction_builders::{Blob, BlobId, BlobTransactionBuilder, Tra...
rust
Apache-2.0
865e00c295de8b4a0a1ef7ac926c3c8266d5151b
2026-01-04T15:31:59.450823Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/build.rs
build.rs
fn main() { set_git_revision_hash(); set_windows_exe_options(); } /// Embed a Windows manifest and set some linker options. /// /// The main reason for this is to enable long path support on Windows. This /// still, I believe, requires enabling long path support in the registry. But /// if that's enabled, then...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/feature.rs
tests/feature.rs
use crate::hay::{SHERLOCK, SHERLOCK_CRLF}; use crate::util::{Dir, TestCommand, sort_lines}; // See: https://github.com/BurntSushi/ripgrep/issues/1 rgtest!(f1_sjis, |dir: Dir, mut cmd: TestCommand| { dir.create_bytes( "foo", b"\x84Y\x84u\x84\x82\x84|\x84\x80\x84{ \x84V\x84\x80\x84|\x84}\x84\x83" ...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/hay.rs
tests/hay.rs
pub const SHERLOCK: &'static str = "\ For the Doctor Watsons of this world, as opposed to the Sherlock Holmeses, success in the province of detective work must always be, to a very large extent, the result of luck. Sherlock Holmes can extract a clew from a wisp of straw or a flake of cigar ash; but Doctor Watson has to...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/misc.rs
tests/misc.rs
use crate::hay::SHERLOCK; use crate::util::{Dir, TestCommand, cmd_exists, sort_lines}; // This file contains "miscellaneous" tests that were either written before // features were tracked more explicitly, or were simply written without // linking them to a specific issue number. We should try to minimize the // additi...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/tests.rs
tests/tests.rs
// Macros useful for testing. #[macro_use] mod macros; // Corpora. mod hay; // Utilities for making tests nicer to read and easier to write. mod util; // Tests for ripgrep's handling of binary files. mod binary; // Tests related to most features in ripgrep. If you're adding something new // to ripgrep, tests should p...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/regression.rs
tests/regression.rs
use crate::hay::SHERLOCK; use crate::util::{Dir, TestCommand, sort_lines}; // See: https://github.com/BurntSushi/ripgrep/issues/16 rgtest!(r16, |dir: Dir, mut cmd: TestCommand| { dir.create_dir(".git"); dir.create(".gitignore", "ghi/"); dir.create_dir("ghi"); dir.create_dir("def/ghi"); dir.create("...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/json.rs
tests/json.rs
use std::time; use serde_derive::Deserialize; use serde_json as json; use crate::hay::{SHERLOCK, SHERLOCK_CRLF}; use crate::util::{Dir, TestCommand}; #[derive(Clone, Debug, Deserialize, PartialEq, Eq)] #[serde(tag = "type", content = "data")] #[serde(rename_all = "snake_case")] enum Message { Begin(Begin), E...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/util.rs
tests/util.rs
use std::env; use std::error; use std::ffi::OsStr; use std::fs::{self, File}; use std::io::{self, Write}; use std::path::{Path, PathBuf}; use std::process::{self, Command}; use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread; use std::time::Duration; use bstr::ByteSlice; static TEST_DIR: &'static str = "r...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/macros.rs
tests/macros.rs
#[macro_export] macro_rules! rgtest { ($name:ident, $fun:expr) => { #[test] fn $name() { let (dir, cmd) = crate::util::setup(stringify!($name)); $fun(dir, cmd); if cfg!(feature = "pcre2") { let (dir, cmd) = crate::util::setup_pcre2(stringify!($nam...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/binary.rs
tests/binary.rs
use crate::util::{Dir, TestCommand}; // This file contains a smattering of tests specifically for checking ripgrep's // handling of binary files. There's quite a bit of discussion on this in this // bug report: https://github.com/BurntSushi/ripgrep/issues/306 // Our haystack is the first 2,133 lines of Gutenberg's co...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/tests/multiline.rs
tests/multiline.rs
use crate::hay::SHERLOCK; use crate::util::{Dir, TestCommand}; // This tests that multiline matches that span multiple lines, but where // multiple matches may begin and end on the same line work correctly. rgtest!(overlap1, |dir: Dir, mut cmd: TestCommand| { dir.create("test", "xxx\nabc\ndefxxxabc\ndefxxx\nxxx");...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/fuzz/fuzz_targets/fuzz_glob.rs
fuzz/fuzz_targets/fuzz_glob.rs
#![no_main] use std::str::FromStr; use globset::Glob; libfuzzer_sys::fuzz_target!(|glob_str: &str| { let Ok(glob) = Glob::new(glob_str) else { return; }; let Ok(glob2) = Glob::from_str(glob_str) else { return; }; // Verify that a `Glob` constructed with `new` is the same as a `G...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/matcher/src/lib.rs
crates/matcher/src/lib.rs
/*! This crate provides an interface for regular expressions, with a focus on line oriented search. The purpose of this crate is to provide a low level matching interface that permits any kind of substring or regex implementation to power the search routines provided by the [`grep-searcher`](https://docs.rs/grep-search...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/matcher/src/interpolate.rs
crates/matcher/src/interpolate.rs
use memchr::memchr; /// Interpolate capture references in `replacement` and write the interpolation /// result to `dst`. References in `replacement` take the form of $N or $name, /// where `N` is a capture group index and `name` is a capture group name. The /// function provided, `name_to_index`, maps capture group na...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/matcher/tests/tests.rs
crates/matcher/tests/tests.rs
mod util; mod test_matcher;
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/matcher/tests/util.rs
crates/matcher/tests/util.rs
use std::collections::HashMap; use { grep_matcher::{Captures, Match, Matcher, NoCaptures, NoError}, regex::bytes::{CaptureLocations, Regex}, }; #[derive(Debug)] pub(crate) struct RegexMatcher { pub re: Regex, pub names: HashMap<String, usize>, } impl RegexMatcher { pub(crate) fn new(re: Regex) ->...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/matcher/tests/test_matcher.rs
crates/matcher/tests/test_matcher.rs
use { grep_matcher::{Captures, Match, Matcher}, regex::bytes::Regex, }; use crate::util::{RegexMatcher, RegexMatcherNoCaps}; fn matcher(pattern: &str) -> RegexMatcher { RegexMatcher::new(Regex::new(pattern).unwrap()) } fn matcher_no_caps(pattern: &str) -> RegexMatcherNoCaps { RegexMatcherNoCaps(Regex...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/lib.rs
crates/searcher/src/lib.rs
/*! This crate provides an implementation of line oriented search, with optional support for multi-line search. # Brief overview The principle type in this crate is a [`Searcher`], which can be configured and built by a [`SearcherBuilder`]. A `Searcher` is responsible for reading bytes from a source (e.g., a file), e...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/sink.rs
crates/searcher/src/sink.rs
use std::io; use grep_matcher::LineTerminator; use crate::{ lines::LineIter, searcher::{ConfigError, Searcher}, }; /// A trait that describes errors that can be reported by searchers and /// implementations of `Sink`. /// /// Unless you have a specialized use case, you probably don't need to /// implement th...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/macros.rs
crates/searcher/src/macros.rs
/// Like assert_eq, but nicer output for long strings. #[cfg(test)] #[macro_export] macro_rules! assert_eq_printed { ($expected:expr, $got:expr, $($tt:tt)*) => { let expected = &*$expected; let got = &*$got; let label = format!($($tt)*); if expected != got { panic!(" prin...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/lines.rs
crates/searcher/src/lines.rs
/*! A collection of routines for performing operations on lines. */ use { bstr::ByteSlice, grep_matcher::{LineTerminator, Match}, }; /// An iterator over lines in a particular slice of bytes. /// /// Line terminators are considered part of the line they terminate. All lines /// yielded by the iterator are gua...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/testutil.rs
crates/searcher/src/testutil.rs
use std::io::{self, Write}; use { bstr::ByteSlice, grep_matcher::{ LineMatchKind, LineTerminator, Match, Matcher, NoCaptures, NoError, }, regex::bytes::{Regex, RegexBuilder}, }; use crate::{ searcher::{BinaryDetection, Searcher, SearcherBuilder}, sink::{Sink, SinkContext, SinkFinish, S...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/line_buffer.rs
crates/searcher/src/line_buffer.rs
use std::io; use bstr::ByteSlice; /// The default buffer capacity that we use for the line buffer. pub(crate) const DEFAULT_BUFFER_CAPACITY: usize = 64 * (1 << 10); // 64 KB /// The behavior of a searcher in the face of long lines and big contexts. /// /// When searching data incrementally using a fixed size buffer,...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/searcher/mmap.rs
crates/searcher/src/searcher/mmap.rs
use std::{fs::File, path::Path}; use memmap::Mmap; /// Controls the strategy used for determining when to use memory maps. /// /// If a searcher is called in circumstances where it is possible to use memory /// maps, and memory maps are enabled, then it will attempt to do so if it /// believes it will make the search...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/searcher/core.rs
crates/searcher/src/searcher/core.rs
use bstr::ByteSlice; use grep_matcher::{LineMatchKind, Matcher}; use crate::{ line_buffer::BinaryDetection, lines::{self, LineStep}, searcher::{Config, Range, Searcher}, sink::{ Sink, SinkContext, SinkContextKind, SinkError, SinkFinish, SinkMatch, }, }; enum FastMatchResult { Continue...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/searcher/glue.rs
crates/searcher/src/searcher/glue.rs
use grep_matcher::Matcher; use crate::{ line_buffer::{DEFAULT_BUFFER_CAPACITY, LineBufferReader}, lines::{self, LineStep}, searcher::{Config, Range, Searcher, core::Core}, sink::{Sink, SinkError}, }; #[derive(Debug)] pub(crate) struct ReadByLine<'s, M, R, S> { config: &'s Config, core: Core<'s...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/src/searcher/mod.rs
crates/searcher/src/searcher/mod.rs
use std::{ cell::RefCell, cmp, fs::File, io::{self, Read}, path::Path, }; use { encoding_rs_io::DecodeReaderBytesBuilder, grep_matcher::{LineTerminator, Match, Matcher}, }; use crate::{ line_buffer::{ self, BufferAllocation, DEFAULT_BUFFER_CAPACITY, LineBuffer, LineBuff...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/searcher/examples/search-stdin.rs
crates/searcher/examples/search-stdin.rs
use std::env; use std::error::Error; use std::io; use std::process; use grep_regex::RegexMatcher; use grep_searcher::Searcher; use grep_searcher::sinks::UTF8; fn main() { if let Err(err) = example() { eprintln!("{}", err); process::exit(1); } } fn example() -> Result<(), Box<dyn Error>> { ...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/regex/src/config.rs
crates/regex/src/config.rs
use { grep_matcher::{ByteSet, LineTerminator}, regex_automata::meta::Regex, regex_syntax::{ ast, hir::{self, Hir}, }, }; use crate::{ ast::AstAnalysis, ban, error::Error, non_matching::non_matching_bytes, strip::strip_from_match, }; /// Config represents the configuration of a ...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/regex/src/ban.rs
crates/regex/src/ban.rs
use regex_syntax::hir::{ self, ClassBytesRange, ClassUnicodeRange, Hir, HirKind, }; use crate::error::{Error, ErrorKind}; /// Returns an error when a sub-expression in `expr` must match `byte`. pub(crate) fn check(expr: &Hir, byte: u8) -> Result<(), Error> { assert!(byte.is_ascii(), "ban byte must be ASCII");...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/regex/src/ast.rs
crates/regex/src/ast.rs
use regex_syntax::ast::{self, Ast}; /// The results of analyzing AST of a regular expression (e.g., for supporting /// smart case). #[derive(Clone, Debug)] pub(crate) struct AstAnalysis { /// True if and only if a literal uppercase character occurs in the regex. any_uppercase: bool, /// True if and only if...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/regex/src/lib.rs
crates/regex/src/lib.rs
/*! An implementation of `grep-matcher`'s `Matcher` trait for Rust's regex engine. */ #![deny(missing_docs)] pub use crate::{ error::{Error, ErrorKind}, matcher::{RegexCaptures, RegexMatcher, RegexMatcherBuilder}, }; mod ast; mod ban; mod config; mod error; mod literal; mod matcher; mod non_matching; mod stri...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/regex/src/strip.rs
crates/regex/src/strip.rs
use { grep_matcher::LineTerminator, regex_syntax::hir::{self, Hir, HirKind}, }; use crate::error::{Error, ErrorKind}; /// Return an HIR that is guaranteed to never match the given line terminator, /// if possible. /// /// If the transformation isn't possible, then an error is returned. /// /// In general, if ...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/regex/src/error.rs
crates/regex/src/error.rs
/// An error that can occur in this crate. /// /// Generally, this error corresponds to problems building a regular /// expression, whether it's in parsing, compilation or a problem with /// guaranteeing a configured optimization. #[derive(Clone, Debug)] pub struct Error { kind: ErrorKind, } impl Error { pub(c...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/regex/src/literal.rs
crates/regex/src/literal.rs
use { regex_automata::meta::Regex, regex_syntax::hir::{ self, Hir, literal::{Literal, Seq}, }, }; use crate::{config::ConfiguredHIR, error::Error}; /// A type that encapsulates "inner" literal extractiong from a regex. /// /// It uses a huge pile of heuristics to try to pluck out literals ...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/regex/src/matcher.rs
crates/regex/src/matcher.rs
use { grep_matcher::{ ByteSet, Captures, LineMatchKind, LineTerminator, Match, Matcher, NoError, }, regex_automata::{ Input, PatternID, meta::Regex, util::captures::Captures as AutomataCaptures, }, }; use crate::{config::Config, error::Error, literal::InnerLiterals}; //...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/regex/src/non_matching.rs
crates/regex/src/non_matching.rs
use { grep_matcher::ByteSet, regex_syntax::{ hir::{self, Hir, HirKind, Look}, utf8::Utf8Sequences, }, }; /// Return a confirmed set of non-matching bytes from the given expression. pub(crate) fn non_matching_bytes(expr: &Hir) -> ByteSet { let mut set = ByteSet::full(); remove_matchi...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/grep/src/lib.rs
crates/grep/src/lib.rs
/*! ripgrep, as a library. This library is intended to provide a high level facade to the crates that make up ripgrep's core searching routines. However, there is no high level documentation available yet guiding users on how to fit all of the pieces together. Every public API item in the constituent crates is docume...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/grep/examples/simplegrep.rs
crates/grep/examples/simplegrep.rs
use std::{env, error::Error, ffi::OsString, io::IsTerminal, process}; use { grep::{ cli, printer::{ColorSpecs, StandardBuilder}, regex::RegexMatcher, searcher::{BinaryDetection, SearcherBuilder}, }, termcolor::ColorChoice, walkdir::WalkDir, }; fn main() { if let Err...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/src/gitignore.rs
crates/ignore/src/gitignore.rs
/*! The gitignore module provides a way to match globs from a gitignore file against file paths. Note that this module implements the specification as described in the `gitignore` man page from scratch. That is, this module does *not* shell out to the `git` command line tool. */ use std::{ fs::File, io::{BufR...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/src/lib.rs
crates/ignore/src/lib.rs
/*! The ignore crate provides a fast recursive directory iterator that respects various filters such as globs, file types and `.gitignore` files. The precise matching rules and precedence is explained in the documentation for `WalkBuilder`. Secondarily, this crate exposes gitignore and file type matchers for use cases...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/src/pathutil.rs
crates/ignore/src/pathutil.rs
use std::{ffi::OsStr, path::Path}; use crate::walk::DirEntry; /// Returns true if and only if this entry is considered to be hidden. /// /// This only returns true if the base name of the path starts with a `.`. /// /// On Unix, this implements a more optimized check. #[cfg(unix)] pub(crate) fn is_hidden(dent: &DirEn...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/src/overrides.rs
crates/ignore/src/overrides.rs
/*! The overrides module provides a way to specify a set of override globs. This provides functionality similar to `--include` or `--exclude` in command line tools. */ use std::path::Path; use crate::{ Error, Match, gitignore::{self, Gitignore, GitignoreBuilder}, }; /// Glob represents a single glob in an o...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/src/walk.rs
crates/ignore/src/walk.rs
use std::{ cmp::Ordering, ffi::OsStr, fs::{self, FileType, Metadata}, io, path::{Path, PathBuf}, sync::atomic::{AtomicBool, AtomicUsize, Ordering as AtomicOrdering}, sync::{Arc, OnceLock}, }; use { crossbeam_deque::{Stealer, Worker as Deque}, same_file::Handle, walkdir::WalkDir,...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/src/types.rs
crates/ignore/src/types.rs
/*! The types module provides a way of associating globs on file names to file types. This can be used to match specific types of files. For example, among the default file types provided, the Rust file type is defined to be `*.rs` with name `rust`. Similarly, the C file type is defined to be `*.{c,h}` with name `c`. ...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/src/dir.rs
crates/ignore/src/dir.rs
// This module provides a data structure, `Ignore`, that connects "directory // traversal" with "ignore matchers." Specifically, it knows about gitignore // semantics and precedence, and is organized based on directory hierarchy. // Namely, every matcher logically corresponds to ignore rules from a single // directory,...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
true
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/src/default_types.rs
crates/ignore/src/default_types.rs
/// This list represents the default file types that ripgrep ships with. In /// general, any file format is fair game, although it should generally be /// limited to reasonably popular open formats. For other cases, you can add /// types to each invocation of ripgrep with the '--type-add' flag. /// /// If you would lik...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/tests/gitignore_skip_bom.rs
crates/ignore/tests/gitignore_skip_bom.rs
use ignore::gitignore::GitignoreBuilder; const IGNORE_FILE: &'static str = "tests/gitignore_skip_bom.gitignore"; /// Skip a Byte-Order Mark (BOM) at the beginning of the file, matching Git's /// behavior. /// /// Ref: <https://github.com/BurntSushi/ripgrep/issues/2177> #[test] fn gitignore_skip_bom() { let mut bu...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs
crates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs
use std::path::Path; use ignore::gitignore::{Gitignore, GitignoreBuilder}; const IGNORE_FILE: &'static str = "tests/gitignore_matched_path_or_any_parents_tests.gitignore"; fn get_gitignore() -> Gitignore { let mut builder = GitignoreBuilder::new("ROOT"); let error = builder.add(IGNORE_FILE); assert!(...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/ignore/examples/walk.rs
crates/ignore/examples/walk.rs
use std::{env, io::Write, path::Path}; use {bstr::ByteVec, ignore::WalkBuilder, walkdir::WalkDir}; fn main() { let mut path = env::args().nth(1).unwrap(); let mut parallel = false; let mut simple = false; let (tx, rx) = crossbeam_channel::bounded::<DirEntry>(100); if path == "parallel" { p...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false
BurntSushi/ripgrep
https://github.com/BurntSushi/ripgrep/blob/0a88cccd5188074de96f54a4b6b44a63971ac157/crates/core/messages.rs
crates/core/messages.rs
/*! This module defines some macros and some light shared mutable state. This state is responsible for keeping track of whether we should emit certain kinds of messages to the user (such as errors) that are distinct from the standard "debug" or "trace" log messages. This state is specifically set at startup time when ...
rust
Unlicense
0a88cccd5188074de96f54a4b6b44a63971ac157
2026-01-04T15:31:58.730867Z
false