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
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/tamil.rs
src/snowball/algorithms/tamil.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 10] = &[ Among...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
true
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/norwegian.rs
src/snowball/algorithms/norwegian.rs
//! This file was generated automatically by the Snowball to Rust compiler //! Snowball 2.0.0 - https://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; ...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/dutch.rs
src/snowball/algorithms/dutch.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 11] = &[ Among...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/english.rs
src/snowball/algorithms/english.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 3] = &[ Among(...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
true
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/romanian.rs
src/snowball/algorithms/romanian.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 3] = &[ Among(...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/swedish.rs
src/snowball/algorithms/swedish.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 37] = &[ Among...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/turkish.rs
src/snowball/algorithms/turkish.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 10] = &[ Among...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
true
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/examples/stem-file/main.rs
examples/stem-file/main.rs
extern crate rust_stemmers; use rust_stemmers::{Algorithm, Stemmer}; fn main() { let en_stemmer = Stemmer::create(Algorithm::English); assert_eq!(en_stemmer.stem("fruitlessly"), "fruitless"); }
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/rustyvctl/old.build.rs
rustyvctl/old.build.rs
use std::env; fn main() { let os = env::var("CARGO_CFG_TARGET_OS"); if os == Ok("uefi".to_string()) { println!("cargo:rustc-flags='-Clink-args= /subsystem:EFI_APPLICATION"); } }
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/rustyvctl/src/main.rs
rustyvctl/src/main.rs
//! A UEFI executable for communicating with the //! [hypervisor](../hypervisor/index.html). //! Invoke via the UEFI shell like so: //! ```text //! UEFI Interactive Shell v2.2 //! EDK II //! UEFI v2.70 (EDK II, 0x00010000) //! Mapping table //! FS0: Alias(s):F0a:;BLK0: //! PciRoot(0x0)/Pci(0x1,0x1)/Ata(...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor_abi/src/lib.rs
hypervisor_abi/src/lib.rs
//! Hypercall ABI //! The hypervisor will handle hypercalls via the CPUID instruction. //! Hypercalls must have a magic number HYPERCALL_MAGIC in RAX and a valid //! hypercall reason in RBX. //! Values will be returned in RAX, RBX, RCX, and RDX according to the //! hypercall reason. #![no_std] use core::arch::x86_64:...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/linux/src/lib.rs
linux/src/lib.rs
//! A shim layer between the C code making up the Linux kernel module and the //! [hypervisor](../hypervisor/index.html) module. //! This code gets compiled into a static library which is linked into the //! kernel module #![no_std] #![warn(missing_docs)] extern crate hypervisor; use core::convert::TryFrom; /// The ...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/vmcs_fields.rs
hypervisor/src/vmcs_fields.rs
//! Defines the fields of the vmcs and their contents. #![allow(non_upper_case_globals)] #![allow(unused)] #[repr(u64)] pub enum VmcsField { VirtualProcessorID = 0x0000_0000, PostedIntrNV = 0x0000_0002, GuestEsSelector = 0x0000_0800, GuestCsSelector = 0x0000_0802, GuestSsSelector = 0x0000_0804, ...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/register_state.rs
hypervisor/src/register_state.rs
//! Defines structures for working with the register state during a VM exit or //! interrupt. /// Stores the state of the general purpose registers. /// The order must be the same as the order of the pushes and pops in the assembly functions _host_entrypoint and _service_interrupt. /// This structure does not include ...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/isr.rs
hypervisor/src/isr.rs
//! This module defines various interrupt service routines, or ISRs. //! An interrupt service routine is called via the hardware when an interrupt //! occurs. //! These ISRs must be installed into the Interrupt Descriptor Table. //! This module mostly names functions defined elsewhere in assembly. /// The type of an I...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/interrupts.rs
hypervisor/src/interrupts.rs
//! This module defines various structurs used by the hypervisor to set up the //! host Interrupt Descriptor Table and handle interrupts and exceptions received //! by the host. use crate::isr; use spin::Mutex; use crate::register_state::InterruptRegisterState; #[allow(unused)] #[derive(Copy, Clone, Default)] #[repr(...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/segmentation.rs
hypervisor/src/segmentation.rs
//! Defines structures and code for working with x86 segments. use log::trace; use x86; const GDT_ENTRY_ACCESS_PRESENT: u8 = 1 << 7; // See Intel manual Table 24-2 ch 24-4 vol 3c const VMX_INFO_SEGMENT_UNUSABLE: u32 = 1 << 16; /// GDT entries are packed in a complicated way meant to be backwards /// compatible since...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/vmx.rs
hypervisor/src/vmx.rs
//! Functions for working with the intel VMX extensions. use ::log::{error, info, trace}; use x86; use core::{mem, ptr}; use crate::msr::{rdmsr, rdmsrl, wrmsr, Msr}; use crate::vmcs_fields::VmcsField; use crate::{vmcs, VCpu}; const IA32_FEATURE_CONTROL_LOCK_BIT: u32 = 1 << 0; const IA32_FEATURE_CONTROL_VMX_ENABLED_O...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/vmexit_handlers.rs
hypervisor/src/vmexit_handlers.rs
//! This module defines the host's VM exit handlers. //use crate::interrupt_controller; use crate::hypercall_handler; use crate::register_state::GeneralPurposeRegisterState; use crate::vmcs_dump; use crate::vmcs_fields::VmcsField; use crate::vmexit_reasons::*; use crate::vmx; use crate::vmx::vmread; use crate::vmx::vmw...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/lib.rs
hypervisor/src/lib.rs
#![no_std] #![feature(asm)] #![feature(lang_items)] #![allow(unknown_lints)] #![warn(missing_docs)] //! A library implementing a mostly-passthrough hypervisor. //! A mostly passthrough hypervisor mostly virtualizes the guest and does very //! little emulation of hardware or devices, but can be used to inspect guest //...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/vmcs_dump.rs
hypervisor/src/vmcs_dump.rs
//! Dump the state of the current vmcs. use crate::vmcs; use crate::vmcs_fields::VmcsField; use crate::vmx::vmread; use log::debug; /// Log the state of the current vmcs at debug level. pub fn dump() { let val = vmread(VmcsField::VirtualProcessorID).unwrap_or(0xbadc0de); debug!("VirtualProcessorID: {:x}", val)...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/vcpu.rs
hypervisor/src/vcpu.rs
//! This module defines functions for working with VCpus. use crate::VCpu; use x86::bits64::segmentation::fs_deref; /// Get a reference to the current VCpu structure. /// The reference is static because the VCpu structure must outlive the /// hypervisor. /// Each CPU has data used to represent the guest stored in the ...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/panic.rs
hypervisor/src/panic.rs
//! This module handles hypervisor panics. #![cfg(not(test))] use core::sync::atomic; use core::panic::PanicInfo; use crate::UNSYNCHRONIZED_LOGGER; /// Prevent recursive panicking. static HAVE_PANICKED: atomic::AtomicBool = atomic::AtomicBool::new(false); /// Called by the rust runtime when a panic occurs. /// Set...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/debug.rs
hypervisor/src/debug.rs
//! This module defines functions useful for debugging the hypervisor. /// A breakpoint function for debuggers to hook. /// /// This does NOT generate an int 3 breakpoint instruction. /// Instead it does the bochs magic breakpoint instruction to cause bochs to break if we are running under bochs and that feature is en...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/interrupt_controller.rs
hypervisor/src/interrupt_controller.rs
//! This module defines a virtual interrupt controller to be used by each core. use log::trace; use crate::msr; use crate::vmcs_fields::PinBasedControlsVmxPreemption; use crate::{ vcpu::get_current_vcpu, vmcs_fields::{CpuBasedControlsInterruptWindowExiting, VmcsField}, vmx::{vmread, vmwrite}, }; const VM_...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/vmcs.rs
hypervisor/src/vmcs.rs
//! This module defines functions used for setting up the guest's virtual //! machine control structures. use crate::msr::{rdmsr, rdmsrl, Msr}; use crate::segmentation::{get_current_gdt, unpack_gdt_entry}; use crate::vmcs_fields::*; use crate::vmx::{read_dr7, vmread, vmwrite}; use crate::VCpu; use core::convert::TryFro...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/vmexit_reasons.rs
hypervisor/src/vmexit_reasons.rs
//! Defines the codes representing the reason a VM exit occurred. #![allow(dead_code)] pub const VMEXIT_REASON_NMI_OR_EXCEPTION: u64 = 0; pub const VMEXIT_REASON_EXTERNAL_INTERRUPT: u64 = 1; pub const VMEXIT_REASON_TRIPLE_FAULT: u64 = 2; pub const VMEXIT_REASON_INIT_SIGNAL: u64 = 3; pub const VMEXIT_REASON_START_UP_IP...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/hypercall_handler.rs
hypervisor/src/hypercall_handler.rs
use crate::register_state::GeneralPurposeRegisterState; const HYPERVISOR_VERSION: &str = env!("CARGO_PKG_VERSION"); fn parse_version(version_string: &str) -> [u32; 3] { let mut index = 0; let mut version: [u32; 3] = [0, 0, 0]; for c in version_string.chars() { if index > version.len() { ...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/hypervisor/src/msr.rs
hypervisor/src/msr.rs
//! This module is used to work with Model Specific Registers. //! A Model Specific Register, or MSR, is a hardware register used to configure //! the hardware, learn about the current hardware configuration, or monitor the //! state of the hardware. //! MSRs may be unique per core, unique per NUMA node, or global for ...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/uefi/build.rs
uefi/build.rs
use std::path::Path; use std::process::Command; use std::{env, error::Error}; const ASM_FILES: [&str; 2] = ["host_entrypoint.S", "isr.S"]; fn main() -> Result<(), Box<dyn Error>> { let src_dir = &format!("{}/src", env::var("CARGO_MANIFEST_DIR").unwrap()); let out_dir = env::var("OUT_DIR").unwrap(); let fu...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/uefi/src/main.rs
uefi/src/main.rs
//! A UEFI Runtime Service which implements a mostly-passthrough //! [hypervisor](../hypervisor/index.html). //! Invoke via the UEFI shell like so: //! ```text //! UEFI Interactive Shell v2.2 //! EDK II //! UEFI v2.70 (EDK II, 0x00010000) //! Mapping table //! FS0: Alias(s):F0a:;BLK0: //! PciRoot(0x0)/P...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/dmesg_logger/src/lib.rs
dmesg_logger/src/lib.rs
#![no_std] #![warn(missing_docs)] //! A logging facade for writing logging information to the Linux Kernel System //! Log. use log; use core::fmt; use core::fmt::Write; extern "C" { fn printk(fmt: *const u8, ...) -> i32; } /// A logger which writes to the Linux Kernel System Log. pub struct DMesgLogger {} str...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/pcuart/src/lib.rs
pcuart/src/lib.rs
#![no_std] #![feature(asm)] #![warn(missing_docs)] //! A logging crate for writing logs to a PC's COM port. //! For more information see the Wikipedia page for the //! [16550 UART //chip](https://en.wikipedia.org/wiki/16550_UART), and the OS //! Dev wiki page on [Serial Ports](https://wiki.osdev.org/Serial_Ports). us...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
iankronquist/rustyvisor
https://github.com/iankronquist/rustyvisor/blob/1fae5813b5c42c58bdc654b93209b46badae2dae/pcuart/src/logger.rs
pcuart/src/logger.rs
use log; use super::{Uart, UartBaudRate, UartComPort}; use core::fmt::Write; use spin::Mutex; /// A logger object suitable to writing logging information to a UART. /// Unlike the UART object, this handles synchronization. pub struct UartLogger { port: Mutex<Uart>, } /// Allows direct write access to a uart COM ...
rust
MIT
1fae5813b5c42c58bdc654b93209b46badae2dae
2026-01-04T20:25:32.050337Z
false
gahag/bgrep
https://github.com/gahag/bgrep/blob/921f84d6aa7d5daabe0d95a24ba912cfac8cdb5a/src/args.rs
src/args.rs
use std::ffi::OsString; use std::path::PathBuf; use clap::{self, App, Arg, ArgMatches}; use clap::{crate_authors, crate_version, crate_name, crate_description}; /// The output mode. #[derive(Debug)] pub enum Output { FileName, Bytes, Offset } impl Default for Output { fn default() -> Output { Output::FileNa...
rust
BSD-3-Clause
921f84d6aa7d5daabe0d95a24ba912cfac8cdb5a
2026-01-04T20:25:30.957998Z
false
gahag/bgrep
https://github.com/gahag/bgrep/blob/921f84d6aa7d5daabe0d95a24ba912cfac8cdb5a/src/grep.rs
src/grep.rs
use std::io; use std::io::{Read, Write}; use std::fs::File; use std::path::{Path, PathBuf}; use std::fmt::Display; use regex::bytes::{Regex, RegexBuilder}; use crate::args::{self, Args}; /// Build the regex pattern with the given options. /// By default, the `unicode` flag is set to false, and `dot_matches_new_line...
rust
BSD-3-Clause
921f84d6aa7d5daabe0d95a24ba912cfac8cdb5a
2026-01-04T20:25:30.957998Z
false
gahag/bgrep
https://github.com/gahag/bgrep/blob/921f84d6aa7d5daabe0d95a24ba912cfac8cdb5a/src/main.rs
src/main.rs
mod args; mod grep; use std::env; use std::io::{self, Write}; use std::process; use args::Command; /// Main does not return because we use `process::exit`. fn main() -> ! { /// Run bgrep with `std::env::args_os`, outputting to stdout. /// Error detail may be outputted to stderr. /// Returns whether there was ...
rust
BSD-3-Clause
921f84d6aa7d5daabe0d95a24ba912cfac8cdb5a
2026-01-04T20:25:30.957998Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/src/lib.rs
src/lib.rs
//! **wgpu-text** is a wrapper over **[glyph-brush](https://github.com/alexheretic/glyph-brush)** //! for simpler text rendering in **[wgpu](https://github.com/gfx-rs/wgpu)**. //! //! This project was inspired by and is similar to [wgpu_glyph](https://github.com/hecrj/wgpu_glyph), //! but has additional features and is...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/src/error.rs
src/error.rs
use std::{error::Error, fmt::Display}; /// Result of `TextBrush` errors and problems. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum BrushError { /// Cache texture exceeded the limitations stated in `wgpu::Device`. TooBigCacheTexture(u32), } impl Error for BrushError {} impl Display for BrushError { ...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/src/pipeline.rs
src/pipeline.rs
use std::num::NonZeroU32; use glyph_brush::{ Rectangle, ab_glyph::{Rect, point}, }; use wgpu::util::DeviceExt; use crate::{Matrix, cache::Cache}; /// Responsible for drawing text. #[derive(Debug)] pub struct Pipeline { inner: wgpu::RenderPipeline, cache: Cache, vertex_buffer: wgpu::Buffer, v...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/src/brush.rs
src/brush.rs
use std::num::NonZeroU32; use crate::{ Matrix, error::BrushError, pipeline::{Pipeline, Vertex}, }; use glyph_brush::{ BrushAction, DefaultSectionHasher, Extra, GlyphCruncher, Section, SectionGlyphIter, ab_glyph::{Font, FontArc, FontRef, InvalidFont, Rect}, }; /// Wrapper over [`glyph_brush::GlyphB...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/src/cache.rs
src/cache.rs
use glyph_brush::Rectangle; use wgpu::util::DeviceExt; use crate::Matrix; /// Responsible for texture caching and the global matrix. #[derive(Debug)] pub struct Cache { pub bind_group_layout: wgpu::BindGroupLayout, pub bind_group: wgpu::BindGroup, matrix_buffer: wgpu::Buffer, texture: wgpu::Texture, ...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/examples/simple.rs
examples/simple.rs
#[path = "ctx.rs"] mod ctx; use ctx::Ctx; use glyph_brush::OwnedSection; use glyph_brush::ab_glyph::FontRef; use std::sync::Arc; use std::time::{Duration, Instant}; use wgpu_text::glyph_brush::{ BuiltInLineBreaker, Layout, OwnedText, Section, Text, VerticalAlign, }; use wgpu_text::{BrushBuilder, TextBrush}; use wi...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/examples/depth.rs
examples/depth.rs
#[path = "ctx.rs"] mod ctx; use ctx::Ctx; use glyph_brush::OwnedSection; use glyph_brush::ab_glyph::FontRef; use std::sync::Arc; use std::time::{Duration, Instant}; use wgpu::{DepthStencilState, TextureView}; use wgpu_text::glyph_brush::{ BuiltInLineBreaker, Layout, OwnedText, Section, Text, VerticalAlign, }; use ...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/examples/ctx.rs
examples/ctx.rs
use std::sync::Arc; use pollster::block_on; use wgpu::{Device, Queue, Surface, SurfaceConfiguration}; // TODO add cache texture preview example // TODO add mip-mapping example // TODO add wasm example pub struct Ctx { pub device: Device, pub queue: Queue, pub surface: Surface<'static>, pub config: Sur...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/examples/performance.rs
examples/performance.rs
#[path = "ctx.rs"] mod ctx; use ctx::Ctx; use glyph_brush::ab_glyph::FontRef; use rand::Rng; use std::sync::Arc; use std::time::{Duration, Instant}; use wgpu_text::glyph_brush::{BuiltInLineBreaker, Layout, Section, Text}; use wgpu_text::{BrushBuilder, TextBrush}; use winit::application::ApplicationHandler; use winit::...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/examples/custom_target/custom_target.rs
examples/custom_target/custom_target.rs
mod camera; #[path = "../ctx.rs"] mod ctx; mod pipeline; use camera::Camera; use ctx::Ctx; use glyph_brush::ab_glyph::FontRef; use glyph_brush::{OwnedSection, OwnedText, VerticalAlign}; use pipeline::{Vertex, create_pipeline}; use std::sync::Arc; use std::time::{Duration, Instant}; use wgpu::util::DeviceExt; use wgpu:...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/examples/custom_target/pipeline.rs
examples/custom_target/pipeline.rs
#[repr(C)] #[derive(Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable)] pub struct Vertex { pub position: [f32; 3], pub tex_pos: [f32; 2], } impl Vertex { pub fn buffer_layout<'a>() -> wgpu::VertexBufferLayout<'a> { wgpu::VertexBufferLayout { array_stride: std::mem::size_of::<Vertex...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
Blatko1/wgpu-text
https://github.com/Blatko1/wgpu-text/blob/0a411831589eeda112f63c0d59a74b6f08b68d75/examples/custom_target/camera.rs
examples/custom_target/camera.rs
use nalgebra::{Matrix4, Point3, Vector3}; pub struct Camera { pub eye: Point3<f32>, pub target: Point3<f32>, up: Vector3<f32>, pub aspect: f32, pub fov: f32, near: f32, far: f32, pub controller: CameraController, pub global_matrix: Matrix4<f32>, } #[rustfmt::skip] const OPENGL_TO_W...
rust
MIT
0a411831589eeda112f63c0d59a74b6f08b68d75
2026-01-04T20:25:30.143858Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-repl/src/lib.rs
oxeylyzer-repl/src/lib.rs
pub mod corpus_transposition; pub mod flags; pub mod repl; pub mod tui; #[test] fn thing() { let x = std::path::PathBuf::from("this/is/a/path"); println!("{}", x.display()) } // fn main() { // use languages::*; // let x = CorpusConfig::new("english", None); // } // use oxeylyzer_core::load_text; // fn p...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-repl/src/repl.rs
oxeylyzer-repl/src/repl.rs
use std::io::Write; use std::path::Path; use indexmap::IndexMap; use itertools::Itertools; use oxeylyzer_core::{generate::LayoutGeneration, layout::*, load_text, rayon, weights::Config}; use crate::corpus_transposition::CorpusConfig; use crate::tui::*; pub struct Repl { language: String, gen: LayoutGeneratio...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-repl/src/flags.rs
oxeylyzer-repl/src/flags.rs
use std::path::PathBuf; xflags::xflags! { cmd repl { /// Analyze a layout. You can also specify a number to analyze a previously generated layout. cmd analyze a view layout { required name_or_nr: String } /// Compare two layouts cmd compare c comp cmp { ...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-repl/src/tui.rs
oxeylyzer-repl/src/tui.rs
use std::io::Write; use oxeylyzer_core::generate::LayoutGeneration; use oxeylyzer_core::language_data::LanguageData; use oxeylyzer_core::layout::*; use oxeylyzer_core::rayon::iter::ParallelIterator; use ansi_rgb::{rgb, Colorable}; use indicatif::{ParallelProgressIterator, ProgressBar, ProgressStyle}; pub fn readline...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-repl/src/corpus_transposition.rs
oxeylyzer-repl/src/corpus_transposition.rs
use glob::glob; use oxeylyzer_core::translation::*; use serde::Deserialize; use std::fs::File; use std::io::Read; use std::path::PathBuf; #[derive(Deserialize, Default)] struct Multiple { #[serde(default)] uppercase_versions: bool, list: Vec<[String; 2]>, } #[derive(Deserialize, Default)] struct OneToOne...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-repl/src/bin/main.rs
oxeylyzer-repl/src/bin/main.rs
// use oxeylyzer_core::generate_annealing::test; use oxeylyzer_repl::repl; fn main() -> Result<(), String> { repl::Repl::run() } // fn main() { // test() // }
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/benches/generation.rs
benches/generation.rs
#![allow(dead_code)] use std::hint::black_box; use diol::prelude::*; use oxeylyzer_core::{ generate::*, utility::{PosPair, POSSIBLE_SWAPS}, }; fn main() -> std::io::Result<()> { let mut g = LayoutGeneration::new("english", "./static/", None).unwrap(); let saved = g.load_layouts("./static/layouts", "e...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/load_text.rs
oxeylyzer-core/src/load_text.rs
use crate::translation::Translator; use std::fs::{read_dir, File}; use std::iter::FromIterator; use std::path::PathBuf; use std::time::Instant; use ahash::AHashMap as HashMap; use anyhow::Result; use file_chunker::FileChunker; use indexmap::IndexMap; use rayon::iter::{IntoParallelRefIterator, ParallelBridge, Parallel...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/lib.rs
oxeylyzer-core/src/lib.rs
pub mod generate; pub mod language_data; pub mod languages_cfg; pub mod layout; pub mod load_text; pub mod translation; pub mod trigram_patterns; pub mod utility; pub mod weights; pub use rayon; pub use serde;
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/translation.rs
oxeylyzer-core/src/translation.rs
use ahash::AHashMap as HashMap; use anyhow::Result; use smartstring::{Compact, LazyCompact, SmartString}; #[derive(Clone)] pub struct Translator { pub table: HashMap<char, SmartString<Compact>>, pub is_raw: bool, pub(crate) is_empty: bool, } impl Default for Translator { fn default() -> Self { ...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/languages_cfg.rs
oxeylyzer-core/src/languages_cfg.rs
use ahash::AHashMap as HashMap; use std::io::Read; pub fn read_cfg() -> HashMap<String, String> { let mut res = HashMap::default(); if let Ok(mut f) = std::fs::File::open("languages_default.cfg") { let mut file_contents = String::new(); f.read_to_string(&mut file_contents).unwrap(); f...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/layout.rs
oxeylyzer-core/src/layout.rs
use crate::trigram_patterns::{TrigramPattern, TRIGRAM_COMBINATIONS}; use crate::utility::*; pub type CharToFinger = [usize; 60]; pub type Matrix<T> = [T; 30]; pub(crate) trait LayoutInternal<T: Copy + Default> { unsafe fn cu(&self, i: usize) -> T; unsafe fn swap_xy_no_bounds(&mut self, i1: usize, i2: usize);...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/utility.rs
oxeylyzer-core/src/utility.rs
use std::collections::hash_map::Entry; use crate::languages_cfg::read_cfg; use ahash::AHashMap as HashMap; use arrayvec::ArrayVec; use nanorand::{tls_rng, Rng}; use serde::Deserialize; #[inline] pub fn shuffle_pins<const N: usize, T>(slice: &mut [T], pins: &[usize]) { let mapping: ArrayVec<_, N> = (0..slice.len(...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/language_data.rs
oxeylyzer-core/src/language_data.rs
use anyhow::Result; use arrayvec::ArrayVec; // use fxhash::FxHashMap; use ahash::AHashMap as HashMap; use indexmap::IndexMap; use itertools::Itertools; use serde::Deserialize; use serde_json; use std::fs::File; use std::io::prelude::*; use std::path::Path; use crate::utility::ConvertU8; pub type CharacterData = Arra...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/generate.rs
oxeylyzer-core/src/generate.rs
use std::hint::unreachable_unchecked; use std::path::Path; use anyhow::Result; // use fxhash::FxHashMap; use ahash::AHashMap as HashMap; use indexmap::IndexMap; use itertools::Itertools; use rayon::iter::{IntoParallelIterator, ParallelIterator}; use crate::language_data::{BigramData, LanguageData, TrigramData}; use c...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
true
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/weights.rs
oxeylyzer-core/src/weights.rs
use crate::utility::KeyboardType; use serde::Deserialize; use std::fs::File; use std::io::Read; #[derive(Deserialize, Debug)] pub struct WeightDefaultsLoad { pub language: String, pub keyboard_type: String, pub trigram_precision: usize, pub max_cores: usize, } #[derive(Deserialize, Debug, Clone, Defau...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/trigram_patterns.rs
oxeylyzer-core/src/trigram_patterns.rs
#[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum TrigramPattern { Alternate, AlternateSfs, Inroll, Outroll, Onehand, Redirect, RedirectSfs, BadRedirect, BadRedirectSfs, Sfb, BadSfb, Sft, Other, Invalid, } #[repr(u8)] #[derive(Copy, Clone, Debug)] enum Hand {...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/generate/michaelll.rs
oxeylyzer-core/src/generate/michaelll.rs
use crate::{ generate::LayoutGeneration, utility::*, layout::* }; const ALGORITHM_ROUNDS: usize = 16; const CHANCE_TO_USE_PREVIOUS_LAYOUT: f64 = 0.2; const RUNS_BEFORE_CHANCE_INC: usize = 1; const RUNS_BEFORE_SWAPS_INC: usize = 1; const RUNS_BEFORE_GTB_ROUNDS_INC: usize = 4; const GTB_ROUNDS: usize = 1; co...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/generate/obsolete.rs
oxeylyzer-core/src/generate/obsolete.rs
use crate::{generate::LayoutGeneration, layout::*, utility::*}; impl LayoutGeneration { #[allow(dead_code)] pub(crate) fn score_with_precision( &self, layout: &FastLayout, trigram_precision: usize, ) -> f64 { let effort = (0..layout.matrix.len()) .map(|i| self.ch...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/generate/iterative.rs
oxeylyzer-core/src/generate/iterative.rs
use crate::{ utility::*, generate::{LayoutGeneration, pinned_swaps}, layout::{FastLayout, Layout} }; use rayon::iter::{ParallelIterator, IntoParallelIterator}; impl LayoutGeneration { pub fn gen_iteratively(&self) { let mut pins = Vec::<usize>::with_capacity(30); let mut best = FastLay...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
o-x-e-y/oxeylyzer
https://github.com/o-x-e-y/oxeylyzer/blob/d6b1fa0cb80cfa21f1bafd736d783107aacca0bf/oxeylyzer-core/src/generate/desshaw.rs
oxeylyzer-core/src/generate/desshaw.rs
use crate::{ utility::*, generate::LayoutGeneration, layout::FastLayout }; use arrayvec::ArrayVec; use ahash::AHashMap as HashMap; trait LayoutHeuristic { fn evaluate(incomplete: IncompleteLayout); } #[derive(Default)] struct IncompleteLayout { layout: FastLayout, chars_to_place: [char; 30], ...
rust
Apache-2.0
d6b1fa0cb80cfa21f1bafd736d783107aacca0bf
2026-01-04T20:23:49.059116Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/consts.rs
arkworks4/src/consts.rs
use kzg::eth::c_bindings::{blst_fp, blst_fp2, blst_p1, blst_p2}; use crate::kzg_types::{ArkG1, ArkG2}; /** The G1 identity/infinity */ #[rustfmt::skip] pub const G1_IDENTITY: ArkG1 = ArkG1::from_blst_p1( blst_p1 { x: blst_fp { l: [0, 0, 0, 0, 0, 0], }, y: blst_fp { l: [0, 0, 0, 0, 0, 0], }, z: blst_fp { l...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/das.rs
arkworks4/src/das.rs
use crate::kzg_proofs::FFTSettings; use crate::kzg_types::ArkFr as BlstFr; use kzg::{DASExtension, Fr}; use std::cmp::Ordering; impl FFTSettings { fn das_fft_extension_stride(&self, ab: &mut [BlstFr], stride: usize) { match ab.len().cmp(&2_usize) { Ordering::Less => {} Ordering::Gre...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/lib.rs
arkworks4/src/lib.rs
pub mod consts; pub mod das; pub mod eip_4844; pub mod eip_7594; pub mod fft; pub mod fft_g1; pub mod fk20_proofs; pub mod kzg_proofs; pub mod kzg_types; pub mod poly; pub mod recover; pub mod utils; pub mod zero_poly;
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/eip_4844.rs
arkworks4/src/eip_4844.rs
extern crate alloc; use crate::kzg_proofs::KZGSettings as LKZGSettings; #[cfg(feature = "c_bindings")] use crate::utils::PRECOMPUTATION_TABLES; #[cfg(feature = "c_bindings")] use kzg::{ eth::{ self, c_bindings::{Blob, Bytes32, Bytes48, CKZGSettings, CKzgRet, KZGCommitment, KZGProof}, }, Fr,...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/kzg_proofs.rs
arkworks4/src/kzg_proofs.rs
#![allow(non_camel_case_types)] extern crate alloc; use super::utils::{blst_poly_into_pc_poly, PolyData}; use crate::kzg_types::{ArkFp, ArkFr, ArkG1Affine, ArkG1ProjAddAffine}; use crate::kzg_types::{ArkFr as BlstFr, ArkG1, ArkG2}; use alloc::sync::Arc; use ark_bls12_381::Bls12_381; use ark_ec::pairing::Pairing; use a...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/eip_7594.rs
arkworks4/src/eip_7594.rs
extern crate alloc; use kzg::EcBackend; use crate::kzg_proofs::FFTSettings; use crate::kzg_proofs::KZGSettings; use crate::kzg_types::ArkFp; use crate::kzg_types::ArkFr; use crate::kzg_types::ArkG1; use crate::kzg_types::ArkG1Affine; use crate::kzg_types::ArkG1ProjAddAffine; use crate::kzg_types::ArkG2; use crate::ut...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/poly.rs
arkworks4/src/poly.rs
use super::kzg_proofs::FFTSettings; use super::utils::{blst_poly_into_pc_poly, PolyData}; use crate::kzg_types::ArkFr as BlstFr; use crate::utils::pc_poly_into_blst_poly; use crate::zero_poly::pad_poly; use ark_bls12_381::Fr; use ark_poly::univariate::DensePolynomial; use ark_poly::DenseUVPolynomial; use ark_std::{log2...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/kzg_types.rs
arkworks4/src/kzg_types.rs
use crate::consts::{ G1_GENERATOR, G1_IDENTITY, G1_NEGATIVE_GENERATOR, G2_GENERATOR, G2_NEGATIVE_GENERATOR, SCALE2_ROOT_OF_UNITY, }; use crate::fft_g1::g1_linear_combination; use crate::kzg_proofs::{ eval_poly, expand_root_of_unity, pairings_verify, FFTSettings as LFFTSettings, KZGSettings as LKZGSettin...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/zero_poly.rs
arkworks4/src/zero_poly.rs
use super::kzg_proofs::FFTSettings; use super::utils::{blst_poly_into_pc_poly, pc_poly_into_blst_poly, PolyData}; use crate::kzg_types::ArkFr as BlstFr; use kzg::common_utils::next_pow_of_2; use kzg::{FFTFr, Fr as FrTrait, ZeroPoly}; use std::cmp::{min, Ordering}; use std::ops::Neg; pub(crate) fn pad_poly(poly: &PolyD...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/fk20_proofs.rs
arkworks4/src/fk20_proofs.rs
use crate::consts::G1_IDENTITY; use crate::kzg_proofs::{FFTSettings, KZGSettings}; use crate::kzg_types::{ArkFp, ArkFr as BlstFr, ArkG1, ArkG1Affine, ArkG1ProjAddAffine, ArkG2}; use crate::utils::PolyData; use kzg::common_utils::reverse_bit_order; use kzg::{FFTFr, FK20MultiSettings, FK20SingleSettings, Fr, G1Mul, Poly,...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/utils.rs
arkworks4/src/utils.rs
use crate::kzg_proofs::FFTSettings; use crate::kzg_types::{ArkFp, ArkFr, ArkG1, ArkG1Affine, ArkG1ProjAddAffine}; use ark_bls12_381::{g1, g2, Fq, Fq2, Fr as Bls12Fr}; use ark_ec::models::short_weierstrass::Projective; use ark_ff::Fp2; use ark_poly::univariate::DensePolynomial as DensePoly; use ark_poly::DenseUVPolynomi...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/fft_g1.rs
arkworks4/src/fft_g1.rs
use crate::consts::G1_GENERATOR; use crate::kzg_proofs::FFTSettings; use crate::kzg_types::{ArkFp, ArkFr, ArkG1, ArkG1Affine}; use crate::kzg_types::ArkG1ProjAddAffine; use kzg::msm::msm_impls::msm; use kzg::msm::precompute::PrecomputationTable; use kzg::{Fr as KzgFr, G1Mul}; use kzg::{FFTG1, G1}; use std::ops::MulA...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/recover.rs
arkworks4/src/recover.rs
use crate::consts::SCALE_FACTOR; use crate::kzg_proofs::FFTSettings; use crate::kzg_types::ArkFr as BlstFr; use crate::utils::PolyData; use kzg::{FFTFr, Fr, Poly, PolyRecover, ZeroPoly}; #[cfg(feature = "parallel")] use kzg::common_utils::next_pow_of_2; #[cfg(feature = "parallel")] static mut INVERSE_FACTORS: Vec<Bl...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/src/fft.rs
arkworks4/src/fft.rs
use crate::kzg_proofs::FFTSettings; use crate::kzg_types::ArkFr as BlstFr; use kzg::{FFTFr, Fr as FFr}; impl FFTFr<BlstFr> for FFTSettings { fn fft_fr(&self, data: &[BlstFr], inverse: bool) -> Result<Vec<BlstFr>, String> { if data.len() > self.max_width { return Err(String::from("data length is...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/consts.rs
arkworks4/tests/consts.rs
#[cfg(test)] mod tests { use kzg_bench::tests::consts::{ expand_roots_is_plausible, new_fft_settings_is_plausible, roots_of_unity_are_plausible, roots_of_unity_is_the_expected_size, roots_of_unity_out_of_bounds_fails, }; use rust_kzg_arkworks4::consts::SCALE2_ROOT_OF_UNITY; use rust_kzg_...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/das.rs
arkworks4/tests/das.rs
#[cfg(test)] mod tests { use kzg_bench::tests::das::{das_extension_test_known, das_extension_test_random}; use rust_kzg_arkworks4::kzg_proofs::FFTSettings; use rust_kzg_arkworks4::kzg_types::ArkFr; #[test] fn das_extension_test_known_() { das_extension_test_known::<ArkFr, FFTSettings>(); ...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/eip_4844.rs
arkworks4/tests/eip_4844.rs
#[cfg(test)] mod tests { use kzg::eip_4844::{ blob_to_kzg_commitment_rust, blob_to_polynomial, bytes_to_blob, compute_blob_kzg_proof_rust, compute_challenge_rust, compute_kzg_proof_rust, compute_powers, evaluate_polynomial_in_evaluation_form, verify_blob_kzg_proof_batch_rust, verify_...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/kzg_proofs.rs
arkworks4/tests/kzg_proofs.rs
#[cfg(test)] mod tests { use kzg_bench::tests::kzg_proofs::{ commit_to_nil_poly, commit_to_too_long_poly_returns_err, proof_multi, proof_single, trusted_setup_in_correct_form, }; use rust_kzg_arkworks4::eip_7594::ArkBackend; use rust_kzg_arkworks4::kzg_proofs::generate_trusted_setup; ...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/eip_7594.rs
arkworks4/tests/eip_7594.rs
#[cfg(test)] mod tests { use kzg::eip_4844::bytes_to_blob; use kzg_bench::tests::eip_7594::{ test_vectors_compute_cells, test_vectors_compute_cells_and_kzg_proofs, test_vectors_compute_verify_cell_kzg_proof_batch_challenge, test_vectors_recover_cells_and_kzg_proofs, test_vectors_verify_c...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/msm.rs
arkworks4/tests/msm.rs
#[cfg(test)] mod tests { use kzg_bench::tests::msm::msm_slice::{ test_msm_slice_window_size_1, test_msm_slice_window_size_16, test_msm_slice_window_size_2, test_msm_slice_window_size_3, }; #[test] pub fn test_msm_slice_window_size_1_() { test_msm_slice_window_size_1() } ...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/poly.rs
arkworks4/tests/poly.rs
#[cfg(test)] mod tests { use kzg_bench::tests::poly::{ create_poly_of_length_ten, poly_div_by_zero, poly_div_fast_test, poly_div_long_test, poly_div_random, poly_eval_0_check, poly_eval_check, poly_eval_nil_check, poly_inverse_simple_0, poly_inverse_simple_1, poly_mul_direct_test, poly_mul_f...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/zero_poly.rs
arkworks4/tests/zero_poly.rs
#[cfg(test)] mod tests { use kzg_bench::tests::zero_poly::{ check_test_data, reduce_partials_random, test_reduce_partials, zero_poly_252, zero_poly_all_but_one, zero_poly_known, zero_poly_random, }; use rust_kzg_arkworks4::kzg_proofs::FFTSettings; use rust_kzg_arkworks4::kzg_types::ArkFr...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/bls12_381.rs
arkworks4/tests/bls12_381.rs
#[cfg(test)] mod tests { use kzg::common_utils::log_2_byte; use kzg_bench::tests::bls12_381::*; use rust_kzg_arkworks4::fft_g1::g1_linear_combination; use rust_kzg_arkworks4::kzg_proofs::pairings_verify; use rust_kzg_arkworks4::kzg_types::{ ArkFp, ArkFr, ArkG1, ArkG1Affine, ArkG1ProjAddAffin...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/fk20_proofs.rs
arkworks4/tests/fk20_proofs.rs
#[cfg(test)] mod tests { use kzg_bench::tests::fk20_proofs::*; use rust_kzg_arkworks4::eip_7594::ArkBackend; use rust_kzg_arkworks4::fk20_proofs::{KzgFK20MultiSettings, KzgFK20SingleSettings}; use rust_kzg_arkworks4::kzg_proofs::generate_trusted_setup; #[test] fn test_fk_single() { fk_...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/bucket_msm.rs
arkworks4/tests/bucket_msm.rs
#[cfg(test)] mod tests { use kzg_bench::tests::msm::bucket_msm::{ test_process_point_and_slices_deal_three_points, test_process_point_and_slices_glv_deal_two_points, }; use rust_kzg_arkworks4::kzg_types::{ArkFp, ArkG1, ArkG1Affine, ArkG1ProjAddAffine}; #[test] pub fn test_process_po...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/fft_g1.rs
arkworks4/tests/fft_g1.rs
#[cfg(test)] mod tests { use kzg_bench::tests::fft_g1::{compare_ft_fft, roundtrip_fft, stride_fft}; use rust_kzg_arkworks4::fft_g1::{fft_g1_fast, fft_g1_slow, make_data}; use rust_kzg_arkworks4::kzg_proofs::FFTSettings; use rust_kzg_arkworks4::kzg_types::{ArkFr, ArkG1}; #[test] fn roundtrip_fft...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/fft_fr.rs
arkworks4/tests/fft_fr.rs
mod batch_adder; #[cfg(test)] mod tests { use kzg_bench::tests::fft_fr::{compare_sft_fft, inverse_fft, roundtrip_fft, stride_fft}; use rust_kzg_arkworks4::fft::{fft_fr_fast, fft_fr_slow}; use rust_kzg_arkworks4::kzg_proofs::FFTSettings; use rust_kzg_arkworks4::kzg_types::ArkFr; #[test] fn comp...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/batch_adder.rs
arkworks4/tests/batch_adder.rs
#[cfg(test)] mod tests { use kzg_bench::tests::msm::batch_adder::{ test_batch_add, test_batch_add_indexed, test_batch_add_indexed_single_bucket, test_batch_add_step_n, test_phase_one_p_add_p, test_phase_one_p_add_q, test_phase_one_p_add_q_twice, test_phase_one_zero_or_neg, test_phase_two_p_a...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/tests/recover.rs
arkworks4/tests/recover.rs
#[cfg(test)] mod recover_tests { use kzg_bench::tests::recover::*; use rust_kzg_arkworks4::kzg_proofs::FFTSettings; use rust_kzg_arkworks4::kzg_types::ArkFr as Fr; use rust_kzg_arkworks4::utils::PolyData; #[test] fn recover_simple_() { recover_simple::<Fr, FFTSettings, PolyData, PolyDat...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false
grandinetech/rust-kzg
https://github.com/grandinetech/rust-kzg/blob/d47acbdf587753f466a5e6842395e03930ae1f96/arkworks4/benches/das.rs
arkworks4/benches/das.rs
use criterion::{criterion_group, criterion_main, Criterion}; use kzg_bench::benches::das::bench_das_extension; use rust_kzg_arkworks4::kzg_proofs::FFTSettings; use rust_kzg_arkworks4::kzg_types::ArkFr; fn bench_das_extension_(c: &mut Criterion) { bench_das_extension::<ArkFr, FFTSettings>(c); } criterion_group! { ...
rust
Apache-2.0
d47acbdf587753f466a5e6842395e03930ae1f96
2026-01-04T20:22:26.256259Z
false