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
teenjuna/prae
https://github.com/teenjuna/prae/blob/bd2bfd476108ebcfcb91c2710fdf92eb123a169d/prae/tests/validate.rs
prae/tests/validate.rs
use assert_matches::assert_matches; use prae::{MapOriginalError, Wrapper}; #[derive(Debug, PartialEq, Eq)] pub struct UsernameError; impl std::fmt::Display for UsernameError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "username is empty") } } prae::define! { #...
rust
Unlicense
bd2bfd476108ebcfcb91c2710fdf92eb123a169d
2026-01-04T20:20:00.811147Z
false
teenjuna/prae
https://github.com/teenjuna/prae/blob/bd2bfd476108ebcfcb91c2710fdf92eb123a169d/prae/tests/adjust.rs
prae/tests/adjust.rs
use prae::Wrapper; prae::define! { #[derive(Debug)] Username: String; adjust |u| *u = u.trim().to_owned(); } #[test] fn construction_adjusted() { let u = Username::new(" ").unwrap(); assert_eq!(u.get(), ""); } #[test] fn mutation_adjusted() { let mut u = Username::new("something").unwrap(); ...
rust
Unlicense
bd2bfd476108ebcfcb91c2710fdf92eb123a169d
2026-01-04T20:20:00.811147Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d10p1.rs
2024/d10p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] use std::mem::MaybeUninit; use std::simd::prelude::*; pub fn run(input: &str) -> i64 { part1(input) as i64 } #[inline(always)] pub fn part1(inp...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d07p2.rs
2024/d07p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] #![feature(fn_align)] use std::simd::prelude::*; pub fn run(input...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d03p2.rs
2024/d03p2.rs
// Original by: ameo #![feature(array_chunks, array_windows, duration_constructors, portable_simd)] use std::{ fmt::Display, simd::{cmp::SimdPartialEq, u8x32, u8x64}, }; // pub const INPUT: &'static [u8] = include_bytes!("../inputs/day3.txt"); fn parse_digit(c: u8) -> usize { (c - 48) as usize } #[inlin...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d16p2.rs
2024/d16p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::mem::MaybeUninit; pub fn run(input: &str) -> i64 { part2(input) as i64 } #[inl...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d04p1.rs
2024/d04p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] use std::ops::Range; use std::simd::cmp::SimdPartialEq; use std::simd::u8x64; pub fn run(input: &str) -> i64 { part1(input) as i64 } pub fn part1(input: &str) -> u32 { let input = input.as_bytes(); const R1: Range<usize> = ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d20p1.rs
2024/d20p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::mem::transmute; use std::simd::prelude::*; pub fn run(in...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d11p1.rs
2024/d11p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] pub fn run(input: &str) -> i64 { part1(input) as i64 } #[inline(always)] pub fn part1(input: &str) -> u32 { unsafe { inner_part1(input) } } ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d06p2.rs
2024/d06p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] use std::simd::prelude::*; pub fn run(input: &str) -> i64 { part2(input) as i64 } pub fn part2(input: &str) -> u32 { unsafe { inner_part2(in...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d08p2.rs
2024/d08p2.rs
// Original by: bendn #![allow( confusable_idents, uncommon_codepoints, non_upper_case_globals, internal_features, mixed_script_confusables, static_mut_refs, incomplete_features )] #![feature( slice_swap_unchecked, generic_const_exprs, iter_array_chunks, get_many_mut, may...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
true
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d07p1.rs
2024/d07p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] #![feature(fn_align)] use std::simd::prelude::*; pub fn run(input...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d09p1.rs
2024/d09p1.rs
// Original by: alion02 #![feature(thread_local, portable_simd, core_intrinsics)] #![allow( clippy::pointers_in_nomem_asm_block, clippy::erasing_op, static_mut_refs, internal_features, clippy::missing_safety_doc, clippy::identity_op, clippy::zero_prefixed_literal )] #[allow(unused)] use std...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d21p1.rs
2024/d21p1.rs
// Original by: bendn #![allow(warnings)] #![allow( confusable_idents, uncommon_codepoints, non_upper_case_globals, internal_features, mixed_script_confusables, static_mut_refs, incomplete_features )] #![feature( iter_repeat_n, slice_swap_unchecked, generic_const_exprs, iter_...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
true
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d02p1.rs
2024/d02p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] #![feature(fn_align)] use std::simd::prelude::*; pub fn run(input...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d14p1.rs
2024/d14p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::mem::MaybeUninit; use std::simd::prelude::*; pub fn run(input: &str) -> i64 { p...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d10p2.rs
2024/d10p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] use std::mem::MaybeUninit; use std::simd::prelude::*; pub fn run(input: &str) -> i64 { part2(input) as i64 } #[inline(always)] pub fn part1(inp...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d23p1.rs
2024/d23p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::arch::x86_64::*; use std::simd::prelude::*; pub fn run(i...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d14p2.rs
2024/d14p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::mem::MaybeUninit; use std::simd::prelude::*; pub fn run(input: &str) -> i64 { p...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d18p2.rs
2024/d18p2.rs
// Original by: caavik use std::fmt; pub fn run(input: &str) -> impl fmt::Display { unsafe { const GRID_WIDTH: usize = 71; const PADDED_WIDTH: usize = GRID_WIDTH + 2; // Don't need bounds checks const START_ID: usize = PADDED_WIDTH + 1; const END_ID: usize = GRID_WIDTH * PADDED_WIDT...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d13p2.rs
2024/d13p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] pub fn run(input: &str) -> i64 { part2(input) as i64 } #[inline(always)] pub fn part1(input: &str) -> u64 { uns...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d11p2.rs
2024/d11p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] pub fn run(input: &str) -> i64 { part2(input) as i64 } #[inline(always)] pub fn part1(input: &str) -> u32 { unsafe { inner_part1(input) } } ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d17p2.rs
2024/d17p2.rs
// Original by: alion02 // ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d05p2.rs
2024/d05p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] use std::simd::cmp::{SimdPartialEq, SimdPartialOrd}; use std::simd::num::SimdInt; use std::simd::ptr::SimdMutPtr; use std::simd::{simd_swizzle, u64x4, u8x32, u8x64, usizex4, Simd}; pub fn run(input: &st...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d25p1.rs
2024/d25p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] #![feature(fn_align)] use std::simd::prelude::*; pub fn run(input...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d01p2.rs
2024/d01p2.rs
// Original by: doge const N: usize = 1000; #[inline(always)] fn parse_5b(s: &[u8]) -> u32 { // Optimize by unrolling the loop and using direct subtraction to convert ASCII digits to numbers unsafe { let s0 = *s.get_unchecked(0) as u32; let s1 = *s.get_unchecked(1) as u32; let s2 = *s.g...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d09p2.rs
2024/d09p2.rs
// Original by: ameo #![feature(array_chunks, array_windows, portable_simd, pointer_is_aligned_to)] // TRICKS: // // - Span structure to represent regions of the memory // - Takes advantage of the fact that free space is always to the right of data in each slot. // - Uses that trick of adding free space to previou...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d24p1.rs
2024/d24p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] pub fn run(input: &str) -> i64 { part1(input) as i64 } // pub...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d21p2.rs
2024/d21p2.rs
// Original by: bendn #![allow(warnings)] #![allow( confusable_idents, uncommon_codepoints, non_upper_case_globals, internal_features, mixed_script_confusables, static_mut_refs, incomplete_features )] #![feature( iter_repeat_n, slice_swap_unchecked, generic_const_exprs, iter_...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
true
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d19p2.rs
2024/d19p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::arch::x86_64::*; use std::simd::prelude::*; pub fn run(i...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d01p1.rs
2024/d01p1.rs
// Original by: doge #![feature(portable_simd)] use std::simd::Simd; const N: usize = 1000; const LANES: usize = 8; // SIMD width for `Simd<u32, 8>` #[inline(always)] unsafe fn radix_sort_u17<const N: usize>(arr: &mut [u32; N]) { let mut cnt_lo: [u16; 256] = [0; 256]; let mut cnt_hi: [u16; 512] = [0; 512]; ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d22p2.rs
2024/d22p2.rs
// Original by: caavik + giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] #![feature(array_chunks)] use std::arch::x86_64::*; use s...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d05p1.rs
2024/d05p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] use std::simd::cmp::{SimdPartialEq, SimdPartialOrd}; use std::simd::num::SimdInt; use std::simd::ptr::SimdMutPtr; use std::simd::{mask8x32, simd_swizzle, u64x4, u8x32, u8x64, usizex4, Simd}; pub fn run(...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d17p1.rs
2024/d17p1.rs
// Original by: alion02 // ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d24p2.rs
2024/d24p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] // pub fn run(input: &str) -> i64 { // part1(input) as i64 // ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d15p2.rs
2024/d15p2.rs
// Original by: alion02 #![feature(thread_local, portable_simd, core_intrinsics)] #![allow( clippy::precedence, clippy::missing_transmute_annotations, clippy::pointers_in_nomem_asm_block, clippy::erasing_op, static_mut_refs, internal_features, clippy::missing_safety_doc, clippy::identity...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d03p1.rs
2024/d03p1.rs
// Original by: alion02 #![feature(portable_simd)] use std::{ arch::x86_64::{ __m256i, _mm256_madd_epi16, _mm256_maddubs_epi16, _mm256_movemask_epi8, _mm256_shuffle_epi8, _mm_madd_epi16, _mm_maddubs_epi16, _mm_movemask_epi8, _mm_shuffle_epi8, _mm_testc_si128, _pext_u32, }, fmt::Disp...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d19p1.rs
2024/d19p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::arch::x86_64::*; use std::simd::prelude::*; pub fn run(i...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d02p2.rs
2024/d02p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] #![feature(fn_align)] use std::simd::prelude::*; pub fn run(input...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d13p1.rs
2024/d13p1.rs
// Original by: alion02 // ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d15p1.rs
2024/d15p1.rs
// Original by: alion02 #![feature(thread_local, portable_simd, core_intrinsics)] #![allow( clippy::precedence, clippy::missing_transmute_annotations, clippy::pointers_in_nomem_asm_block, clippy::erasing_op, static_mut_refs, internal_features, clippy::missing_safety_doc, clippy::identity...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d18p1.rs
2024/d18p1.rs
// Original by: alion02 // ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d23p2.rs
2024/d23p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::arch::x86_64::*; use std::simd::prelude::*; // pub fn ru...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d08p1.rs
2024/d08p1.rs
// Original by: alion02 #![allow(clippy::pointers_in_nomem_asm_block)] #![feature(thread_local, portable_simd, core_intrinsics)] #![allow( clippy::erasing_op, static_mut_refs, internal_features, clippy::missing_safety_doc, clippy::identity_op, clippy::zero_prefixed_literal )] use std::{ arc...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d16p1.rs
2024/d16p1.rs
// Original by: alion02 #![feature(thread_local, portable_simd, core_intrinsics)] #![allow( clippy::precedence, clippy::missing_transmute_annotations, clippy::pointers_in_nomem_asm_block, clippy::erasing_op, static_mut_refs, internal_features, clippy::missing_safety_doc, clippy::identity...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d12p2.rs
2024/d12p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] use std::mem::MaybeUninit; use std::simd::prelude::*; pub fn run(input: &str) -> i64 { part2(input) as i64 } #[inline(always)] pub fn part1(inp...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d20p2.rs
2024/d20p2.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::mem::transmute; use std::simd::prelude::*; pub fn run(in...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d04p2.rs
2024/d04p2.rs
// Original by: bendn #![feature(portable_simd)] // type bitset = bitvec::BitArr!(for 140, in u64); // pub mod set { // uint::construct_uint! {pub struct bitset(3); } // } // use set::bitset; use cmp::SimdPartialEq; use std::simd::*; const SIZE: usize = 140; fn bits(input: &[u8], i: usize) -> u64 { let w = u8x...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d12p1.rs
2024/d12p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] use std::mem::MaybeUninit; use std::simd::prelude::*; pub fn run(input: &str) -> i64 { part1(input) as i64 } #[inline(always)] pub fn part1(inp...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d06p1.rs
2024/d06p1.rs
// Original by: doge const WIDTH: usize = 131; const HEIGHT: usize = 130; const SIZE: usize = WIDTH * HEIGHT; #[inline(always)] unsafe fn inner(s: &[u8]) -> u32 { let loc = memchr::memchr(b'^', s).unwrap_unchecked(); let mut new = [1_u8; SIZE]; let s_ptr = s.as_ptr(); let new_ptr = new.as_mut_ptr(); ...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
indiv0/aoc-fastest
https://github.com/indiv0/aoc-fastest/blob/ca5efdd944ad509a05ad8e559632e7ee605a884c/2024/d22p1.rs
2024/d22p1.rs
// Original by: giooschi #![allow(unused_attributes)] #![allow(static_mut_refs)] #![feature(portable_simd)] #![feature(avx512_target_feature)] #![feature(slice_ptr_get)] #![feature(array_ptr_get)] #![feature(core_intrinsics)] #![feature(int_roundings)] use std::arch::x86_64::*; use std::simd::prelude::*; pub fn run(i...
rust
MIT
ca5efdd944ad509a05ad8e559632e7ee605a884c
2026-01-04T20:19:58.878961Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/build.rs
build.rs
use std::fs::{read, read_to_string}; use embedinator::{Icon, ResourceBuilder}; include!("assets/ids.rs"); const ICONS: &[(u16, &str)] = &[ (APP_ICON, "assets/app.png"), (BRIGHTNESS_LIGHT_ICON, "assets/brightness_light.png"), (BRIGHTNESS_DARK_ICON, "assets/brightness_dark.png") ]; fn main() { let mut...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/config.rs
src/config.rs
use std::collections::BTreeMap; use std::ffi::OsString; use std::fs::File; use std::io::{BufRead, BufReader, BufWriter, Write}; use std::os::windows::ffi::OsStringExt; use std::path::{Path, PathBuf}; use std::sync::OnceLock; use log::debug; use windows::core::imp::CoTaskMemFree; use windows::Win32::UI::Shell::{FOLDERI...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/theme.rs
src/theme.rs
use std::mem::size_of; use windows::core::{w, PCWSTR}; use windows::Win32::System::Registry::{RegCloseKey, RegOpenKeyExW, RegQueryValueExW, HKEY, HKEY_CURRENT_USER, KEY_READ, KEY_WOW64_64KEY}; use windows::UI::Color; use windows::UI::ViewManagement::{UIColorType, UISettings}; use windows_ext::UI::Xaml::ElementTheme; ...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/backend.rs
src/backend.rs
use std::collections::{BTreeMap, BTreeSet}; use std::fmt::Display; use std::mem::take; use std::sync::{Arc, Mutex}; use std::thread::{spawn, JoinHandle}; use std::time::{Duration, Instant}; use futures_lite::future::yield_now; use futures_lite::FutureExt; use log::{debug, trace, warn}; use loole::{unbounded, Receiver,...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/mousehook.rs
src/mousehook.rs
use std::cell::Cell; use std::fmt::{Debug, Formatter}; use std::marker::PhantomData; use log::{warn}; use windows::core::{GUID}; use windows::Win32::Foundation::{BOOL, FALSE, HINSTANCE, HWND, LPARAM, LRESULT, RECT, TRUE, WPARAM}; use windows::Win32::System::SystemInformation::GetTickCount64; use windows::Win32::UI::She...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/monitors.rs
src/monitors.rs
use std::fmt::{Debug, Formatter}; use std::ops::RangeInclusive; use std::path::{Path, PathBuf}; use std::sync::Arc; use windows::Win32::Devices::Display::*; use windows::Win32::Foundation::{BOOL, HANDLE}; use windows::Win32::Graphics::Gdi::HMONITOR; use crate::monitors::gdi::find_all_gdi_monitors; use crate::monitors...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/main.rs
src/main.rs
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] mod backend; mod config; mod monitors; pub mod runtime; mod theme; mod ui; mod utils; mod views; mod watchers; mod windowing; mod mousehook; use std::pin::Pin; use std::process::ExitCode; use std::sync::{Arc, Mutex}; use std::time::{Duration, Instant}...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/watchers/power.rs
src/watchers/power.rs
use log::trace; use windows::Win32::Foundation::{HANDLE, HWND, LPARAM, LRESULT, WPARAM}; use windows::Win32::System::Power::{RegisterPowerSettingNotification, UnregisterPowerSettingNotification, HPOWERNOTIFY, POWERBROADCAST_SETTING}; use windows::Win32::System::SystemServices::GUID_SESSION_DISPLAY_STATUS; use windows::...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/watchers/display_change.rs
src/watchers/display_change.rs
use windows::Win32::Foundation::{HWND, LPARAM, LRESULT, WPARAM}; use windows::Win32::UI::Shell::{DefSubclassProc, SetWindowSubclass}; use windows::Win32::UI::WindowsAndMessaging::{WM_DESTROY, WM_DISPLAYCHANGE}; use crate::Result; pub struct DisplayChangeEventRegistration; impl DisplayChangeEventRegistration { pu...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/watchers/mod.rs
src/watchers/mod.rs
mod display_change; mod power; use std::sync::Once; use display_change::DisplayChangeEventRegistration; pub use power::PowerEvent; use power::PowerEventRegistration; use windows::core::{w, PCWSTR}; use windows::Win32::Foundation::{HMODULE, HWND, LPARAM, LRESULT, WPARAM}; use windows::Win32::System::LibraryLoader::Get...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/windowing/hotkey.rs
src/windowing/hotkey.rs
use std::cell::RefCell; use std::char::REPLACEMENT_CHARACTER; use std::collections::HashMap; use std::fmt::{Debug, Display, Formatter, Write}; use std::marker::PhantomData; use std::num::{NonZeroU32, NonZeroUsize}; use std::pin::Pin; use std::str::FromStr; use std::sync::atomic::{AtomicI32, Ordering}; use std::task::{C...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/windowing/mod.rs
src/windowing/mod.rs
mod event_loop; mod window; pub mod hotkey; use std::mem::size_of; use std::time::Duration; pub use event_loop::event_loop; use log::{trace, warn}; #[allow(unused_imports)] pub use window::{Window, WindowBuilder, WindowLevel}; use windows::Win32::Foundation::{POINT, RECT}; use windows::Win32::Graphics::Gdi::{GetMonit...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/windowing/window.rs
src/windowing/window.rs
use std::cell::Cell; use std::mem::size_of; use std::sync::Once; use log::trace; use windows::core::{h, w, ComInterface, TryIntoParam, HSTRING, PCWSTR}; use windows::Win32::Foundation::{BOOL, COLORREF, HANDLE, HMODULE, HWND, LPARAM, LRESULT, RECT, WPARAM}; use windows::Win32::Graphics::Dwm::{ DwmSetWindowAttribute...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/windowing/event_loop.rs
src/windowing/event_loop.rs
use std::future::Future; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use std::task::{Context, Poll, Wake, Waker}; use std::time::Duration; use futures_lite::pin; use windows::core::Error; use windows::Win32::Foundation::{CloseHandle, HANDLE, WAIT_ABANDONED_0, WAIT_FAILED, WAIT_OBJECT_0, WAIT_TIM...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/runtime/timer.rs
src/runtime/timer.rs
use std::cell::RefCell; use std::collections::BTreeMap; use std::future::Future; use std::marker::PhantomData; use std::mem::replace; use std::pin::Pin; use std::task::{Context, Poll, Waker}; use std::time::{Duration, Instant}; #[derive(Default)] struct TimerState { timers: BTreeMap<(Instant, usize), Waker>, n...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/runtime/executor.rs
src/runtime/executor.rs
use std::cell::Cell; use std::collections::VecDeque; use std::future::{poll_fn, Future}; use std::mem::take; use std::pin::Pin; use std::task::Poll; use futures_lite::pin; type Task = Pin<Box<dyn Future<Output = ()> + 'static>>; /// A simple executor that runs tasks on the current thread. /// /// It doesn't scale ve...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/runtime/reducing_spsc.rs
src/runtime/reducing_spsc.rs
use std::cell::Cell; use std::error::Error; use std::fmt::Display; use std::future::{poll_fn, Future}; use std::rc::Rc; use std::task::{Poll, Waker}; pub trait Reducible { fn reduce(self, other: Self) -> Self; } pub fn channel<T: Reducible>() -> (ReducingSender<T>, ReducingReceiver<T>) { let shared = Rc::new(...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/runtime/mod.rs
src/runtime/mod.rs
use std::future::Future; use std::pin::Pin; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use std::task::{Context, Poll, Wake, Waker}; use std::thread::{current, park, park_timeout, Thread}; pub use executor::LocalExecutor; use futures_lite::{pin, Stream}; pub use timer::{process_timers_for_curren...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/utils/elevation.rs
src/utils/elevation.rs
use std::os::windows::ffi::OsStrExt; use std::ptr::null_mut; use windows::core::{w, PCWSTR}; use windows::Win32::Foundation::{CloseHandle, HANDLE, HWND, WAIT_FAILED}; use windows::Win32::System::Threading::{WaitForSingleObject, INFINITE}; use windows::Win32::UI::Shell::{ShellExecuteExW, SEE_MASK_NOCLOSEPROCESS, SEE_MA...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/utils/string.rs
src/utils/string.rs
use std::cell::Cell; use std::ffi::OsString; use std::fmt::{Arguments, Debug, Display, Formatter, Write}; use std::os::windows::ffi::OsStringExt; use std::path::PathBuf; use windows::core::{HSTRING, PCWSTR}; #[derive(Copy, Clone, PartialEq, Eq)] pub struct WStr<const N: usize>([u16; N]); impl<const N: usize> From<[u...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/utils/logger.rs
src/utils/logger.rs
use std::sync::OnceLock; use log::{LevelFilter, Log, Metadata, Record}; struct ConsoleLogger(LevelFilter); impl Log for ConsoleLogger { fn enabled(&self, metadata: &Metadata) -> bool { metadata.level() <= self.0 } fn log(&self, record: &Record) { if self.enabled(record.metadata()) { ...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/utils/panic.rs
src/utils/panic.rs
use std::backtrace::{Backtrace, BacktraceStatus}; use std::fmt::{Arguments, Write}; //use std::panic::take_hook as take_panic_hook; use std::panic::set_hook as set_panic_hook; use windows::core::w; use windows::Win32::UI::WindowsAndMessaging::{MessageBoxW, MB_ICONERROR, MB_OK, MB_TASKMODAL}; use crate::utils::string:...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/utils/error.rs
src/utils/error.rs
use std::backtrace::Backtrace; use std::borrow::Cow; use std::fmt::{Debug, Display, Formatter}; use std::num::{ParseFloatError, ParseIntError}; use std::panic::Location; use std::str::ParseBoolError; use betrayer::{ErrorSource, TrayError}; use windows::core::{Error, HRESULT}; use windows::Win32::Foundation::{NO_ERROR,...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/utils/extensions.rs
src/utils/extensions.rs
use std::sync::{Mutex, MutexGuard}; use crate::runtime::reducing_spsc::{Reducible, ReducingSender}; pub trait ChannelExt<T> { #[track_caller] fn filter_send_ignore(&self, msg: Option<T>) { if let Some(msg) = msg { self.send_ignore(msg); } } fn send_ignore(&self, msg: T); } ...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/utils/ordered_map.rs
src/utils/ordered_map.rs
use std::fmt::{Debug, Formatter}; #[derive(Default, Clone, Eq, PartialEq)] pub struct OrderedMap<K, V> { items: Vec<(K, V)> } impl<K: PartialEq, V: SortKeyExtract> OrderedMap<K, V> { pub const fn new() -> Self { Self { items: Vec::new() } } pub fn clear(&mut self) { self.items.clear()...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/utils/mod.rs
src/utils/mod.rs
pub mod elevation; pub mod error; pub mod extensions; pub mod logger; pub mod ordered_map; pub mod panic; pub mod string; pub mod winrt; #[macro_export] macro_rules! cloned { ([$($vars:ident),+] $e:expr) => { { $( let $vars = $vars.clone(); )+ $e } }; } #[macro_export] ...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/utils/winrt.rs
src/utils/winrt.rs
use windows::core::{RuntimeName, HSTRING}; use windows_ext::UI::Xaml::Interop::{TypeKind, TypeName}; pub trait GetTypeName { fn type_name() -> TypeName; } impl<T: RuntimeName> GetTypeName for T { fn type_name() -> TypeName { TypeName { Name: HSTRING::from(Self::NAME), Kind: Typ...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/views/settings.rs
src/views/settings.rs
use std::sync::{Arc, Mutex}; use log::warn; use loole::Sender; use windows::core::{ComInterface, HSTRING}; use windows::UI::Color; use windows::Win32::UI::Input::KeyboardAndMouse::{GetKeyState, VIRTUAL_KEY, VK_CONTROL, VK_LWIN, VK_MENU, VK_RWIN, VK_SHIFT}; use windows_ext::IXamlSourceTransparency; use windows_ext::UI:...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/views/flyout.rs
src/views/flyout.rs
use log::{debug, warn}; use loole::Sender; use windows::core::{h, IInspectable}; use windows::Foundation::Size; use windows::UI::Color; use windows_ext::UI::Xaml::Controls::Control; use windows_ext::UI::Xaml::Controls::Primitives::FlyoutPlacementMode; use windows_ext::UI::Xaml::Media::{AcrylicBackgroundSource, AcrylicB...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/views/mod.rs
src/views/mod.rs
mod flyout; mod settings; pub use flyout::{BrightnessFlyout, ProxyWindow}; pub use settings::SettingsWindow;
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/ui/controls.rs
src/ui/controls.rs
use windows::core::{ComInterface, TryIntoParam, HSTRING}; use windows::Foundation::{EventHandler, IReference, Point, PropertyValue}; use windows::Win32::UI::WindowsAndMessaging::WHEEL_DELTA; use windows_ext::UI::Xaml::Controls::Primitives::{FlyoutShowOptions, RangeBaseValueChangedEventArgs, RangeBaseValueChangedEventHa...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/ui/container.rs
src/ui/container.rs
use windows::core::TryIntoParam; use windows::Foundation::Size; use windows_ext::UI::Xaml::Controls::{ColumnDefinition, Orientation, RowDefinition}; use windows_ext::UI::Xaml::Media::Brush; use windows_ext::UI::Xaml::{CornerRadius, FrameworkElement, GridUnitType, UIElement}; use crate::ui::{ElementTheme, NewType, Padd...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/src/ui/mod.rs
src/ui/mod.rs
#![allow(dead_code)] pub use windows_ext::UI::Xaml::{ElementTheme, TextAlignment, VerticalAlignment}; #[macro_export] macro_rules! new_type { ($name:ident, $orig:ty, no_ui) => { #[derive(Clone, Eq, PartialEq)] #[repr(transparent)] pub struct $name($orig); unsafe impl windows::core...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/assets/ids.rs
assets/ids.rs
#[allow(dead_code)] const APP_ICON: u16 = 1; const BRIGHTNESS_LIGHT_ICON: u16 = 2; const BRIGHTNESS_DARK_ICON: u16 = 3;
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/lib.rs
lib/windows-ext/src/lib.rs
#![allow(non_snake_case, clashing_extern_declarations, non_upper_case_globals, non_camel_case_types, clippy::all)] include!("Windows/mod.rs"); pub trait FontFamilyExt: Sized { fn new(name: &windows_core::HSTRING) -> windows_core::Result<Self>; } impl FontFamilyExt for crate::UI::Xaml::Media::FontFamily { fn ...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/mod.rs
lib/windows-ext/src/Windows/mod.rs
pub mod UI; pub mod Win32; pub mod Foundation;pub mod System;
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/mod.rs
lib/windows-ext/src/Windows/UI/mod.rs
pub mod Xaml; pub use windows::UI::*; pub mod Input;pub mod Core;pub mod Text;
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Xaml/mod.rs
lib/windows-ext/src/Windows/UI/Xaml/mod.rs
pub mod Controls; pub mod Hosting; pub mod Input; pub mod Interop; pub mod Media; #[doc(hidden)] #[repr(transparent)] #[derive( ::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone )] pub struct IAdaptiveTrigger(::windows_core::IUnknown); unsafe impl ::windows_core::Interfac...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
true
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Xaml/Hosting/mod.rs
lib/windows-ext/src/Windows/UI/Xaml/Hosting/mod.rs
#[doc(hidden)] #[repr(transparent)] #[derive( ::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone )] pub struct IDesignerAppExitedEventArgs(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IDesignerAppExitedEventArgs { type Vtable = IDesignerAppExite...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
true
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Xaml/Interop/mod.rs
lib/windows-ext/src/Windows/UI/Xaml/Interop/mod.rs
#[repr(transparent)] #[derive( ::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone )] pub struct IBindableIterable(::windows_core::IUnknown); impl IBindableIterable {} ::windows_core::imp::interface_hierarchy!( IBindableIterable, ::windows_core::IUnknown, ::windows_core...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Xaml/Controls/mod.rs
lib/windows-ext/src/Windows/UI/Xaml/Controls/mod.rs
pub mod Primitives; #[doc(hidden)] #[repr(transparent)] #[derive( ::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone )] pub struct IAnchorRequestedEventArgs(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IAnchorRequestedEventArgs { type Vtable = I...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
true
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Xaml/Controls/Primitives/mod.rs
lib/windows-ext/src/Windows/UI/Xaml/Controls/Primitives/mod.rs
#[doc(hidden)] #[repr(transparent)] #[derive( ::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone )] pub struct IAppBarButtonTemplateSettings(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IAppBarButtonTemplateSettings { type Vtable = IAppBarButton...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
true
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Xaml/Input/mod.rs
lib/windows-ext/src/Windows/UI/Xaml/Input/mod.rs
#[doc(hidden)] #[repr(transparent)] #[derive( ::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone )] pub struct IAccessKeyDisplayDismissedEventArgs(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IAccessKeyDisplayDismissedEventArgs { type Vtable = I...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
true
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Xaml/Media/mod.rs
lib/windows-ext/src/Windows/UI/Xaml/Media/mod.rs
#[doc(hidden)] #[repr(transparent)] #[derive( ::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone )] pub struct IAcrylicBrush(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IAcrylicBrush { type Vtable = IAcrylicBrush_Vtbl; } unsafe impl ::windows_c...
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
true
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Text/mod.rs
lib/windows-ext/src/Windows/UI/Text/mod.rs
pub use windows::UI::Text::*;
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Input/mod.rs
lib/windows-ext/src/Windows/UI/Input/mod.rs
pub use windows::UI::Input::*;
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/UI/Core/mod.rs
lib/windows-ext/src/Windows/UI/Core/mod.rs
pub use windows::UI::Core::*;
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/Foundation/mod.rs
lib/windows-ext/src/Windows/Foundation/mod.rs
pub use windows::Foundation::*; pub mod Collections;
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false
sidit77/rusty-twinkle-tray
https://github.com/sidit77/rusty-twinkle-tray/blob/4c28fca78561979829fd2c88b2f02cc162a2ae41/lib/windows-ext/src/Windows/Foundation/Collections/mod.rs
lib/windows-ext/src/Windows/Foundation/Collections/mod.rs
pub use windows::Foundation::Collections::*;
rust
MIT
4c28fca78561979829fd2c88b2f02cc162a2ae41
2026-01-04T20:20:01.545651Z
false