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 |
|---|---|---|---|---|---|---|---|---|
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/display/color.rs | alacritty/src/display/color.rs | use std::fmt::{self, Display, Formatter};
use std::ops::{Add, Deref, Index, IndexMut, Mul};
use std::str::FromStr;
use log::trace;
use serde::de::{Error as SerdeError, Visitor};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use alacritty_config_derive::SerdeReplace;
use alacritty_terminal::term::colo... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/input/mod.rs | alacritty/src/input/mod.rs | //! Handle input from winit.
//!
//! Certain key combinations should send some escape sequence back to the PTY.
//! In order to figure that out, state about which modifier keys are pressed
//! needs to be tracked. Additionally, we need a bit of a state machine to
//! determine what to do when a non-modifier key is pres... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | true |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/input/keyboard.rs | alacritty/src/input/keyboard.rs | use std::borrow::Cow;
use winit::event::{ElementState, KeyEvent};
#[cfg(target_os = "macos")]
use winit::keyboard::ModifiersKeyState;
use winit::keyboard::{Key, KeyLocation, ModifiersState, NamedKey};
#[cfg(target_os = "macos")]
use winit::platform::macos::OptionAsAlt;
use alacritty_terminal::event::EventListener;
us... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/general.rs | alacritty/src/config/general.rs | //! Miscellaneous configuration options.
use std::path::PathBuf;
use serde::Serialize;
use alacritty_config_derive::ConfigDeserialize;
/// General config section.
///
/// This section is for fields which can not be easily categorized,
/// to avoid common TOML issues with root-level fields.
#[derive(ConfigDeserializ... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/bindings.rs | alacritty/src/config/bindings.rs | #![allow(clippy::enum_glob_use)]
use std::fmt::{self, Debug, Display};
use bitflags::bitflags;
use serde::de::{self, Error as SerdeError, MapAccess, Unexpected, Visitor};
use serde::{Deserialize, Deserializer};
use std::rc::Rc;
use toml::Value as SerdeValue;
use winit::event::MouseButton;
use winit::keyboard::{
K... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | true |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/cursor.rs | alacritty/src/config/cursor.rs | use std::cmp;
use std::time::Duration;
use serde::{Deserialize, Serialize};
use alacritty_config_derive::{ConfigDeserialize, SerdeReplace};
use alacritty_terminal::vte::ansi::{CursorShape as VteCursorShape, CursorStyle as VteCursorStyle};
use crate::config::ui_config::Percentage;
/// The minimum blink interval valu... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/bell.rs | alacritty/src/config/bell.rs | use std::time::Duration;
use serde::Serialize;
use alacritty_config_derive::ConfigDeserialize;
use crate::config::ui_config::Program;
use crate::display::color::Rgb;
#[derive(ConfigDeserialize, Serialize, Clone, Debug, PartialEq, Eq)]
pub struct BellConfig {
/// Visual bell animation function.
pub animation... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/mouse.rs | alacritty/src/config/mouse.rs | use serde::{Deserialize, Deserializer, Serialize};
use alacritty_config_derive::{ConfigDeserialize, SerdeReplace};
use crate::config::bindings::{self, MouseBinding};
use crate::config::ui_config;
#[derive(ConfigDeserialize, Serialize, Default, Clone, Debug, PartialEq, Eq)]
pub struct Mouse {
pub hide_when_typing... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/ui_config.rs | alacritty/src/config/ui_config.rs | use std::cell::{OnceCell, RefCell};
use std::collections::HashMap;
use std::error::Error;
use std::fmt::{self, Formatter};
use std::mem;
use std::path::PathBuf;
use std::rc::Rc;
use log::{error, warn};
use serde::de::{Error as SerdeError, MapAccess, Visitor};
use serde::{Deserialize, Deserializer, Serialize, Serialize... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/scrolling.rs | alacritty/src/config/scrolling.rs | use serde::de::Error as SerdeError;
use serde::{Deserialize, Deserializer, Serialize};
use alacritty_config_derive::{ConfigDeserialize, SerdeReplace};
/// Maximum scrollback amount configurable.
pub const MAX_SCROLLBACK_LINES: u32 = 100_000;
/// Struct for scrolling related settings.
#[derive(ConfigDeserialize, Seri... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/font.rs | alacritty/src/config/font.rs | use std::fmt;
use crossfont::Size as FontSize;
use serde::de::{self, Visitor};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use alacritty_config_derive::{ConfigDeserialize, SerdeReplace};
use crate::config::ui_config::Delta;
/// Font config.
///
/// Defaults are provided at the level of this struc... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/debug.rs | alacritty/src/config/debug.rs | use log::LevelFilter;
use serde::Serialize;
use alacritty_config_derive::ConfigDeserialize;
/// Debugging options.
#[derive(ConfigDeserialize, Serialize, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct Debug {
pub log_level: LevelFilter,
pub print_events: bool,
/// Keep the log file afte... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/terminal.rs | alacritty/src/config/terminal.rs | use serde::{Deserialize, Deserializer, Serialize, de};
use toml::Value;
use alacritty_config_derive::{ConfigDeserialize, SerdeReplace};
use alacritty_terminal::term::Osc52;
use crate::config::ui_config::{Program, StringVisitor};
#[derive(ConfigDeserialize, Serialize, Default, Clone, Debug, PartialEq)]
pub struct Ter... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/mod.rs | alacritty/src/config/mod.rs | use std::fmt::{self, Display, Formatter};
use std::path::{Path, PathBuf};
use std::result::Result as StdResult;
use std::{env, fs, io};
use log::{debug, error, info, warn};
use serde::Deserialize;
use serde_yaml::Error as YamlError;
use toml::de::Error as TomlError;
use toml::ser::Error as TomlSeError;
use toml::{Tabl... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/window.rs | alacritty/src/config/window.rs | use std::fmt::{self, Formatter};
use log::{error, warn};
use serde::de::{self, MapAccess, Visitor};
use serde::{Deserialize, Deserializer, Serialize};
#[cfg(target_os = "macos")]
use winit::platform::macos::OptionAsAlt as WinitOptionAsAlt;
use winit::window::{Fullscreen, Theme as WinitTheme, WindowLevel as WinitWindo... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/selection.rs | alacritty/src/config/selection.rs | use serde::Serialize;
use alacritty_config_derive::ConfigDeserialize;
use alacritty_terminal::term::SEMANTIC_ESCAPE_CHARS;
#[derive(ConfigDeserialize, Serialize, Clone, Debug, PartialEq, Eq)]
pub struct Selection {
pub semantic_escape_chars: String,
pub save_to_clipboard: bool,
}
impl Default for Selection {... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/monitor.rs | alacritty/src/config/monitor.rs | use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher};
use std::path::PathBuf;
use std::sync::mpsc::{self, RecvTimeoutError, Sender};
use std::thread::JoinHandle;
use std::time::{Duration, Instant};
use log::{debug, error, warn};
use notify::event::{ModifyKind, RenameMode};
use notify::{
Con... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/color.rs | alacritty/src/config/color.rs | use serde::de::Error as SerdeError;
use serde::{Deserialize, Deserializer, Serialize};
use alacritty_config_derive::ConfigDeserialize;
use crate::display::color::{CellRgb, Rgb};
#[derive(ConfigDeserialize, Serialize, Clone, Debug, Default, PartialEq, Eq)]
pub struct Colors {
pub primary: PrimaryColors,
pub c... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/config/serde_utils.rs | alacritty/src/config/serde_utils.rs | //! Serde helpers.
use toml::{Table, Value};
/// Merge two serde structures.
///
/// This will take all values from `replacement` and use `base` whenever a value isn't present in
/// `replacement`.
pub fn merge(base: Value, replacement: Value) -> Value {
match (base, replacement) {
(Value::Array(mut base)... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/macos/mod.rs | alacritty/src/macos/mod.rs | use objc2::runtime::AnyObject;
use objc2_foundation::{NSDictionary, NSString, NSUserDefaults, ns_string};
pub mod locale;
pub mod proc;
pub fn disable_autofill() {
unsafe {
NSUserDefaults::standardUserDefaults().registerDefaults(
&NSDictionary::<NSString, AnyObject>::from_slices(
... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/macos/proc.rs | alacritty/src/macos/proc.rs | use std::ffi::{CStr, CString, IntoStringError};
use std::fmt::{self, Display, Formatter};
use std::io;
use std::mem::{self, MaybeUninit};
use std::os::raw::{c_int, c_void};
use std::path::PathBuf;
/// Error during working directory retrieval.
#[derive(Debug)]
pub enum Error {
Io(io::Error),
/// Error converti... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/macos/locale.rs | alacritty/src/macos/locale.rs | #![allow(clippy::let_unit_value)]
use std::ffi::{CStr, CString};
use std::{env, str};
use libc::{LC_ALL, LC_CTYPE, setlocale};
use log::debug;
use objc2::sel;
use objc2_foundation::{NSLocale, NSObjectProtocol};
const FALLBACK_LOCALE: &str = "UTF-8";
pub fn set_locale_environment() {
let env_locale_c = CString::... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/migrate/mod.rs | alacritty/src/migrate/mod.rs | //! Configuration file migration.
use std::fmt::Debug;
use std::path::Path;
use std::{fs, mem};
use tempfile::NamedTempFile;
use toml_edit::{DocumentMut, Item};
use crate::cli::MigrateOptions;
use crate::config;
mod yaml;
/// Handle migration.
pub fn migrate(options: MigrateOptions) {
// Find configuration fil... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty/src/migrate/yaml.rs | alacritty/src/migrate/yaml.rs | //! Migration of legacy YAML files to TOML.
use std::path::Path;
use toml::Value;
use crate::cli::MigrateOptions;
use crate::config;
use crate::migrate::{migrate_config, migrate_toml, write_results};
/// Migrate a legacy YAML config to TOML.
pub fn migrate(
options: &MigrateOptions,
path: &Path,
recursi... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_config/src/lib.rs | alacritty_config/src/lib.rs | use std::collections::HashMap;
use std::error::Error;
use std::path::PathBuf;
use log::LevelFilter;
use serde::Deserialize;
use toml::Value;
pub trait SerdeReplace {
fn replace(&mut self, value: Value) -> Result<(), Box<dyn Error>>;
}
#[macro_export]
macro_rules! impl_replace {
($($ty:ty),*$(,)*) => {
... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/event.rs | alacritty_terminal/src/event.rs | use std::borrow::Cow;
use std::fmt::{self, Debug, Formatter};
use std::sync::Arc;
use crate::term::ClipboardType;
use crate::vte::ansi::Rgb;
/// Terminal event.
///
/// These events instruct the UI over changes that can't be handled by the terminal emulation layer
/// itself.
#[derive(Clone)]
pub enum Event {
///... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/lib.rs | alacritty_terminal/src/lib.rs | //! Alacritty - The GPU Enhanced Terminal.
#![warn(rust_2018_idioms, future_incompatible)]
#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use)]
#![cfg_attr(clippy, deny(warnings))]
pub mod event;
pub mod event_loop;
pub mod grid;
pub mod index;
pub mod selection;
pub mod sync;
pub mod term;
pub mod threa... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/index.rs | alacritty_terminal/src/index.rs | //! Line and Column newtypes for strongly typed tty/grid/terminal APIs.
/// Indexing types and implementations for Grid and Line.
use std::cmp::{Ord, Ordering, max, min};
use std::fmt;
use std::ops::{Add, AddAssign, Deref, Sub, SubAssign};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use crate::gri... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/sync.rs | alacritty_terminal/src/sync.rs | //! Synchronization types.
//!
//! Most importantly, a fair mutex is included.
use parking_lot::{Mutex, MutexGuard};
/// A fair mutex.
///
/// Uses an extra lock to ensure that if one thread is waiting that it will get
/// the lock before a single thread can re-lock it.
pub struct FairMutex<T> {
/// Data.
dat... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/vi_mode.rs | alacritty_terminal/src/vi_mode.rs | use std::cmp::min;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use crate::event::EventListener;
use crate::grid::{Dimensions, GridCell};
use crate::index::{Boundary, Column, Direction, Line, Point, Side};
use crate::term::Term;
use crate::term::cell::Flags;
/// Possible vi mode motion movements.
#... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | true |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/selection.rs | alacritty_terminal/src/selection.rs | //! State management for a selection in the grid.
//!
//! A selection should start when the mouse is clicked, and it should be
//! finalized when the button is released. The selection should be cleared
//! when text is added/removed/scrolled on the screen. The selection should
//! also be cleared if the user clicks off... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/event_loop.rs | alacritty_terminal/src/event_loop.rs | //! The main event loop which performs I/O on the pseudoterminal.
use std::borrow::Cow;
use std::collections::VecDeque;
use std::fmt::{self, Display, Formatter};
use std::fs::File;
use std::io::{self, ErrorKind, Read, Write};
use std::num::NonZeroUsize;
use std::sync::Arc;
use std::sync::mpsc::{self, Receiver, Sender,... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/thread.rs | alacritty_terminal/src/thread.rs | use std::thread::{Builder, JoinHandle};
/// Like `thread::spawn`, but with a `name` argument.
pub fn spawn_named<F, T, S>(name: S, f: F) -> JoinHandle<T>
where
F: FnOnce() -> T + Send + 'static,
T: Send + 'static,
S: Into<String>,
{
Builder::new().name(name.into()).spawn(f).expect("thread spawn works")... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/term/search.rs | alacritty_terminal/src/term/search.rs | use std::cmp::max;
use std::error::Error;
use std::mem;
use std::ops::RangeInclusive;
use log::{debug, warn};
pub use regex_automata::hybrid::BuildError;
use regex_automata::hybrid::dfa::{Builder, Cache, Config, DFA};
use regex_automata::nfa::thompson::Config as ThompsonConfig;
use regex_automata::util::syntax::Config... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | true |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/term/mod.rs | alacritty_terminal/src/term/mod.rs | //! Exports the `Term` type which is a high-level API for the Grid.
use std::ops::{Index, IndexMut, Range};
use std::sync::Arc;
use std::{cmp, mem, ptr, slice, str};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use base64::Engine;
use base64::engine::general_purpose::STANDARD as Base64;
use bitflag... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | true |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/term/color.rs | alacritty_terminal/src/term/color.rs | use std::ops::{Index, IndexMut};
use crate::vte::ansi::{NamedColor, Rgb};
/// Number of terminal colors.
pub const COUNT: usize = 269;
/// Array of indexed colors.
///
/// | Indices | Description |
/// | -------- | ----------------- |
/// | 0..16 | Named ANSI colors |
/// | 16..232 | Color cube |
/... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/term/cell.rs | alacritty_terminal/src/term/cell.rs | use std::sync::Arc;
use std::sync::atomic::{AtomicU32, Ordering};
use bitflags::bitflags;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use crate::grid::{self, GridCell};
use crate::index::Column;
use crate::vte::ansi::{Color, Hyperlink as VteHyperlink, NamedColor};
bitflags! {
#[derive(Debug, C... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/tty/unix.rs | alacritty_terminal/src/tty/unix.rs | //! TTY related functionality.
use std::ffi::{CStr, CString};
use std::fs::File;
use std::io::{Error, ErrorKind, Read, Result};
use std::mem::MaybeUninit;
use std::os::fd::OwnedFd;
use std::os::unix::ffi::OsStrExt;
use std::os::unix::io::AsRawFd;
use std::os::unix::net::UnixStream;
use std::os::unix::process::CommandE... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/tty/mod.rs | alacritty_terminal/src/tty/mod.rs | //! TTY related functionality.
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::Arc;
use std::{env, io};
use polling::{Event, PollMode, Poller};
#[cfg(not(windows))]
mod unix;
#[cfg(not(windows))]
pub use self::unix::*;
#[cfg(windows)]
pub mod windows;
#[cfg(windows)]
pub use self::windows::*;
... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/tty/windows/blocking.rs | alacritty_terminal/src/tty/windows/blocking.rs | //! Code for running a reader/writer on another thread while driving it through `polling`.
use std::io::prelude::*;
use std::marker::PhantomData;
use std::sync::{Arc, Mutex};
use std::task::{Context, Poll, Wake, Waker};
use std::{io, thread};
use piper::{Reader, Writer, pipe};
use polling::os::iocp::{CompletionPacket... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/tty/windows/mod.rs | alacritty_terminal/src/tty/windows/mod.rs | use std::ffi::OsStr;
use std::io::{self, Result};
use std::iter::once;
use std::os::windows::ffi::OsStrExt;
use std::sync::Arc;
use std::sync::mpsc::TryRecvError;
use crate::event::{OnResize, WindowSize};
use crate::tty::windows::child::ChildExitWatcher;
use crate::tty::{ChildEvent, EventedPty, EventedReadWrite, Optio... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/tty/windows/child.rs | alacritty_terminal/src/tty/windows/child.rs | use std::ffi::c_void;
use std::io::Error;
use std::num::NonZeroU32;
use std::ptr;
use std::sync::atomic::{AtomicPtr, Ordering};
use std::sync::{Arc, Mutex, mpsc};
use polling::os::iocp::{CompletionPacket, PollerIocpExt};
use polling::{Event, Poller};
use windows_sys::Win32::Foundation::{BOOLEAN, FALSE, HANDLE};
use w... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/tty/windows/conpty.rs | alacritty_terminal/src/tty/windows/conpty.rs | use log::{info, warn};
use std::collections::{HashMap, HashSet};
use std::ffi::OsStr;
use std::io::{Error, Result};
use std::os::windows::ffi::OsStrExt;
use std::os::windows::io::IntoRawHandle;
use std::{mem, ptr};
use windows_sys::Win32::Foundation::{HANDLE, S_OK};
use windows_sys::Win32::System::Console::{
COORD... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/grid/tests.rs | alacritty_terminal/src/grid/tests.rs | //! Tests for the Grid.
use super::*;
use crate::term::cell::Cell;
impl GridCell for usize {
fn is_empty(&self) -> bool {
*self == 0
}
fn reset(&mut self, template: &Self) {
*self = *template;
}
fn flags(&self) -> &Flags {
unimplemented!();
}
fn flags_mut(&mut s... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/grid/row.rs | alacritty_terminal/src/grid/row.rs | //! Defines the Row type which makes up lines in the grid.
use std::cmp::{max, min};
use std::ops::{Index, IndexMut, Range, RangeFrom, RangeFull, RangeTo, RangeToInclusive};
use std::{ptr, slice};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use crate::grid::GridCell;
use crate::index::Column;
use ... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/grid/storage.rs | alacritty_terminal/src/grid/storage.rs | use std::cmp::max;
use std::mem;
use std::mem::MaybeUninit;
use std::ops::{Index, IndexMut};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use super::Row;
use crate::index::Line;
/// Maximum number of buffered lines outside of the grid for performance optimization.
const MAX_CACHE_SIZE: usize = 1_00... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/grid/mod.rs | alacritty_terminal/src/grid/mod.rs | //! A specialized 2D grid implementation optimized for use in a terminal.
use std::cmp::{max, min};
use std::ops::{Bound, Deref, Index, IndexMut, Range, RangeBounds};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use crate::index::{Column, Line, Point};
use crate::term::cell::{Flags, ResetDiscrimina... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/src/grid/resize.rs | alacritty_terminal/src/grid/resize.rs | //! Grid resize and reflow.
use std::cmp::{Ordering, max, min};
use std::mem;
use crate::index::{Boundary, Column, Line};
use crate::term::cell::{Flags, ResetDiscriminant};
use crate::grid::row::Row;
use crate::grid::{Dimensions, Grid, GridCell};
impl<T: GridCell + Default + PartialEq> Grid<T> {
/// Resize the ... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_terminal/tests/ref.rs | alacritty_terminal/tests/ref.rs | #![cfg(feature = "serde")]
use serde::Deserialize;
use serde_json as json;
use std::fs::{self, File};
use std::io::Read;
use std::path::Path;
use alacritty_terminal::event::{Event, EventListener};
use alacritty_terminal::grid::{Dimensions, Grid};
use alacritty_terminal::index::{Column, Line};
use alacritty_terminal::... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_config_derive/src/lib.rs | alacritty_config_derive/src/lib.rs | #![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use)]
#![cfg_attr(clippy, deny(warnings))]
use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
use syn::parse::{self, Parse, ParseStream};
use syn::punctuated::Punctuated;
use syn::{GenericParam, Ident, LitStr, Token, ... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_config_derive/src/serde_replace.rs | alacritty_config_derive/src/serde_replace.rs | use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
use syn::punctuated::Punctuated;
use syn::{
Data, DataStruct, DeriveInput, Error, Field, Fields, Generics, Ident, parse_macro_input,
};
use crate::{Attr, GenericsStreams, MULTIPLE_FLATTEN_ERROR};
/// Error if the derive w... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_config_derive/src/config_deserialize/de_enum.rs | alacritty_config_derive/src/config_deserialize/de_enum.rs | use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
use quote::{format_ident, quote};
use syn::meta::ParseNestedMeta;
use syn::{DataEnum, Generics, Ident};
use crate::serde_replace;
pub fn derive_deserialize(ident: Ident, generics: Generics, data_enum: DataEnum) -> TokenStream {
let visitor... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_config_derive/src/config_deserialize/mod.rs | alacritty_config_derive/src/config_deserialize/mod.rs | use proc_macro::TokenStream;
use syn::{Data, DataStruct, DeriveInput, Error, Fields, parse_macro_input};
/// Error if the derive was used on an unsupported type.
const UNSUPPORTED_ERROR: &str = "ConfigDeserialize must be used on an enum or struct with fields";
mod de_enum;
mod de_struct;
pub fn derive(input: TokenSt... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_config_derive/src/config_deserialize/de_struct.rs | alacritty_config_derive/src/config_deserialize/de_struct.rs | use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
use quote::{format_ident, quote};
use syn::punctuated::Punctuated;
use syn::spanned::Spanned;
use syn::{Error, Field, Generics, Ident, Type};
use crate::{Attr, GenericsStreams, MULTIPLE_FLATTEN_ERROR, serde_replace};
/// Use this crate's name ... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
alacritty/alacritty | https://github.com/alacritty/alacritty/blob/6ee6e53ee3457c24137f117237b0ff1d84f6f836/alacritty_config_derive/tests/config.rs | alacritty_config_derive/tests/config.rs | use std::sync::{Arc, Mutex, OnceLock};
use log::{Level, Log, Metadata, Record};
use serde::Deserialize;
use alacritty_config::SerdeReplace as _;
use alacritty_config_derive::{ConfigDeserialize, SerdeReplace};
#[derive(ConfigDeserialize, Debug, PartialEq, Eq)]
enum TestEnum {
One,
Two,
Three,
#[config... | rust | Apache-2.0 | 6ee6e53ee3457c24137f117237b0ff1d84f6f836 | 2026-01-04T15:31:58.707223Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/build.rs | src-tauri/build.rs | fn main() {
tauri_build::build()
}
| rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/src/lib.rs | src-tauri/src/lib.rs | #[cfg_attr(mobile, tauri::mobile_entry_point)]
mod app;
mod util;
use tauri::Manager;
use tauri_plugin_window_state::Builder as WindowStatePlugin;
use tauri_plugin_window_state::StateFlags;
#[cfg(target_os = "macos")]
use std::time::Duration;
const WINDOW_SHOW_DELAY: u64 = 50;
use app::{
invoke::{
clear... | rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/src/util.rs | src-tauri/src/util.rs | use crate::app::config::PakeConfig;
use std::env;
use std::path::PathBuf;
use tauri::{AppHandle, Config, Manager, WebviewWindow};
pub fn get_pake_config() -> (PakeConfig, Config) {
#[cfg(feature = "cli-build")]
let pake_config: PakeConfig = serde_json::from_str(include_str!("../.pake/pake.json"))
.expe... | rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/src/main.rs | src-tauri/src/main.rs | #![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
fn main() {
app_lib::run()
}
| rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/src/app/setup.rs | src-tauri/src/app/setup.rs | use std::str::FromStr;
use std::sync::{Arc, Mutex};
use std::time::{Duration, Instant};
use tauri::{
menu::{MenuBuilder, MenuItemBuilder},
tray::{TrayIconBuilder, TrayIconEvent},
AppHandle, Manager,
};
use tauri_plugin_global_shortcut::{GlobalShortcutExt, Shortcut};
use tauri_plugin_window_state::{AppHandle... | rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/src/app/config.rs | src-tauri/src/app/config.rs | use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
pub struct WindowConfig {
pub url: String,
pub hide_title_bar: bool,
pub fullscreen: bool,
pub maximize: bool,
pub width: f64,
pub height: f64,
pub resizable: bool,
pub url_type: String,
pub always_on_top:... | rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/src/app/menu.rs | src-tauri/src/app/menu.rs | // Menu functionality is only used on macOS
#![cfg(target_os = "macos")]
use tauri::menu::{AboutMetadata, Menu, MenuItem, PredefinedMenuItem, Submenu};
use tauri::{AppHandle, Manager, Wry};
use tauri_plugin_opener::OpenerExt;
pub fn get_menu(app: &AppHandle<Wry>) -> tauri::Result<Menu<Wry>> {
let pake_version = e... | rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/src/app/invoke.rs | src-tauri/src/app/invoke.rs | use crate::util::{check_file_or_append, get_download_message_with_lang, show_toast, MessageType};
use std::fs::{self, File};
use std::io::Write;
use std::str::FromStr;
use tauri::http::Method;
use tauri::{command, AppHandle, Manager, Url, WebviewWindow};
use tauri_plugin_http::reqwest::{ClientBuilder, Request};
#[cfg(... | rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/src/app/mod.rs | src-tauri/src/app/mod.rs | pub mod config;
pub mod invoke;
#[cfg(target_os = "macos")]
pub mod menu;
pub mod setup;
pub mod window;
| rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
tw93/Pake | https://github.com/tw93/Pake/blob/d592b81521f388eb42c14fe50afb5198418b4c22/src-tauri/src/app/window.rs | src-tauri/src/app/window.rs | use crate::app::config::PakeConfig;
use crate::util::get_data_dir;
use std::{path::PathBuf, str::FromStr};
use tauri::{App, Config, Url, WebviewUrl, WebviewWindow, WebviewWindowBuilder};
#[cfg(target_os = "macos")]
use tauri::{Theme, TitleBarStyle};
#[cfg(target_os = "windows")]
fn build_proxy_browser_arg(url: &Url) ... | rust | MIT | d592b81521f388eb42c14fe50afb5198418b4c22 | 2026-01-04T15:31:59.426357Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/cloud-tasks-client/src/lib.rs | codex-rs/cloud-tasks-client/src/lib.rs | mod api;
pub use api::ApplyOutcome;
pub use api::ApplyStatus;
pub use api::AttemptStatus;
pub use api::CloudBackend;
pub use api::CloudTaskError;
pub use api::CreatedTask;
pub use api::DiffSummary;
pub use api::Result;
pub use api::TaskId;
pub use api::TaskStatus;
pub use api::TaskSummary;
pub use api::TaskText;
pub u... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/cloud-tasks-client/src/http.rs | codex-rs/cloud-tasks-client/src/http.rs | use crate::ApplyOutcome;
use crate::ApplyStatus;
use crate::AttemptStatus;
use crate::CloudBackend;
use crate::CloudTaskError;
use crate::DiffSummary;
use crate::Result;
use crate::TaskId;
use crate::TaskStatus;
use crate::TaskSummary;
use crate::TurnAttempt;
use crate::api::TaskText;
use chrono::DateTime;
use chrono::... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/cloud-tasks-client/src/api.rs | codex-rs/cloud-tasks-client/src/api.rs | use chrono::DateTime;
use chrono::Utc;
use serde::Deserialize;
use serde::Serialize;
pub type Result<T> = std::result::Result<T, CloudTaskError>;
#[derive(Debug, thiserror::Error)]
pub enum CloudTaskError {
#[error("unimplemented: {0}")]
Unimplemented(&'static str),
#[error("http error: {0}")]
Http(St... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/cloud-tasks-client/src/mock.rs | codex-rs/cloud-tasks-client/src/mock.rs | use crate::ApplyOutcome;
use crate::AttemptStatus;
use crate::CloudBackend;
use crate::CloudTaskError;
use crate::DiffSummary;
use crate::Result;
use crate::TaskId;
use crate::TaskStatus;
use crate::TaskSummary;
use crate::TurnAttempt;
use crate::api::TaskText;
use chrono::Utc;
#[derive(Clone, Default)]
pub struct Moc... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/lib.rs | codex-rs/app-server-protocol/src/lib.rs | mod export;
mod jsonrpc_lite;
mod protocol;
pub use export::generate_json;
pub use export::generate_ts;
pub use export::generate_types;
pub use jsonrpc_lite::*;
pub use protocol::common::*;
pub use protocol::thread_history::*;
pub use protocol::v1::*;
pub use protocol::v2::*;
| rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/export.rs | codex-rs/app-server-protocol/src/export.rs | use crate::ClientNotification;
use crate::ClientRequest;
use crate::ServerNotification;
use crate::ServerRequest;
use crate::export_client_notification_schemas;
use crate::export_client_param_schemas;
use crate::export_client_response_schemas;
use crate::export_client_responses;
use crate::export_server_notification_sc... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | true |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/jsonrpc_lite.rs | codex-rs/app-server-protocol/src/jsonrpc_lite.rs | //! We do not do true JSON-RPC 2.0, as we neither send nor expect the
//! "jsonrpc": "2.0" field.
use schemars::JsonSchema;
use serde::Deserialize;
use serde::Serialize;
use ts_rs::TS;
pub const JSONRPC_VERSION: &str = "2.0";
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Hash, Eq, JsonSchema, TS)]
#[serd... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/bin/export.rs | codex-rs/app-server-protocol/src/bin/export.rs | use anyhow::Result;
use clap::Parser;
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(
about = "Generate TypeScript bindings and JSON Schemas for the Codex app-server protocol"
)]
struct Args {
/// Output directory where generated files will be written
#[arg(short = 'o', long = "out", value_name... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/protocol/thread_history.rs | codex-rs/app-server-protocol/src/protocol/thread_history.rs | use crate::protocol::v2::ThreadItem;
use crate::protocol::v2::Turn;
use crate::protocol::v2::TurnError;
use crate::protocol::v2::TurnStatus;
use crate::protocol::v2::UserInput;
use codex_protocol::protocol::AgentReasoningEvent;
use codex_protocol::protocol::AgentReasoningRawContentEvent;
use codex_protocol::protocol::E... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/protocol/mappers.rs | codex-rs/app-server-protocol/src/protocol/mappers.rs | use crate::protocol::v1;
use crate::protocol::v2;
impl From<v1::ExecOneOffCommandParams> for v2::CommandExecParams {
fn from(value: v1::ExecOneOffCommandParams) -> Self {
Self {
command: value.command,
timeout_ms: value
.timeout_ms
.map(|timeout| i64:... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/protocol/v2.rs | codex-rs/app-server-protocol/src/protocol/v2.rs | use std::collections::HashMap;
use std::path::PathBuf;
use crate::protocol::common::AuthMode;
use codex_protocol::account::PlanType;
use codex_protocol::approvals::ExecPolicyAmendment as CoreExecPolicyAmendment;
use codex_protocol::config_types::ForcedLoginMethod;
use codex_protocol::config_types::ReasoningSummary;
us... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | true |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/protocol/mod.rs | codex-rs/app-server-protocol/src/protocol/mod.rs | // Module declarations for the app-server protocol namespace.
// Exposes protocol pieces used by `lib.rs` via `pub use protocol::common::*;`.
pub mod common;
mod mappers;
pub mod thread_history;
pub mod v1;
pub mod v2;
| rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/protocol/common.rs | codex-rs/app-server-protocol/src/protocol/common.rs | use std::path::Path;
use crate::JSONRPCNotification;
use crate::JSONRPCRequest;
use crate::RequestId;
use crate::export::GeneratedSchema;
use crate::export::write_json_schema;
use crate::protocol::v1;
use crate::protocol::v2;
use schemars::JsonSchema;
use serde::Deserialize;
use serde::Serialize;
use strum_macros::Dis... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/app-server-protocol/src/protocol/v1.rs | codex-rs/app-server-protocol/src/protocol/v1.rs | use std::collections::HashMap;
use std::path::PathBuf;
use codex_protocol::ConversationId;
use codex_protocol::config_types::ForcedLoginMethod;
use codex_protocol::config_types::ReasoningSummary;
use codex_protocol::config_types::SandboxMode;
use codex_protocol::config_types::Verbosity;
use codex_protocol::models::Res... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/login/src/pkce.rs | codex-rs/login/src/pkce.rs | use base64::Engine;
use rand::RngCore;
use sha2::Digest;
use sha2::Sha256;
#[derive(Debug, Clone)]
pub struct PkceCodes {
pub code_verifier: String,
pub code_challenge: String,
}
pub fn generate_pkce() -> PkceCodes {
let mut bytes = [0u8; 64];
rand::rng().fill_bytes(&mut bytes);
// Verifier: URL-... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/login/src/lib.rs | codex-rs/login/src/lib.rs | mod device_code_auth;
mod pkce;
mod server;
pub use device_code_auth::run_device_code_login;
pub use server::LoginServer;
pub use server::ServerOptions;
pub use server::ShutdownHandle;
pub use server::run_login_server;
// Re-export commonly used auth types and helpers from codex-core for compatibility
pub use codex_a... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/login/src/server.rs | codex-rs/login/src/server.rs | use std::io::Cursor;
use std::io::Read;
use std::io::Write;
use std::io::{self};
use std::net::SocketAddr;
use std::net::TcpStream;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
use std::thread;
use std::time::Duration;
use crate::pkce::PkceCodes;
use crate::pkce::generate_pkce;
use base64::Engine;
... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/login/src/device_code_auth.rs | codex-rs/login/src/device_code_auth.rs | use reqwest::StatusCode;
use serde::Deserialize;
use serde::Serialize;
use serde::de::Deserializer;
use serde::de::{self};
use std::time::Duration;
use std::time::Instant;
use crate::pkce::PkceCodes;
use crate::server::ServerOptions;
use std::io;
const ANSI_BLUE: &str = "\x1b[94m";
const ANSI_GRAY: &str = "\x1b[90m";... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/login/tests/all.rs | codex-rs/login/tests/all.rs | // Single integration test binary that aggregates all test modules.
// The submodules live in `tests/suite/`.
mod suite;
| rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/login/tests/suite/login_server_e2e.rs | codex-rs/login/tests/suite/login_server_e2e.rs | #![allow(clippy::unwrap_used)]
use std::io;
use std::net::SocketAddr;
use std::net::TcpListener;
use std::thread;
use std::time::Duration;
use anyhow::Result;
use base64::Engine;
use codex_core::auth::AuthCredentialsStoreMode;
use codex_login::ServerOptions;
use codex_login::run_login_server;
use core_test_support::sk... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/login/tests/suite/mod.rs | codex-rs/login/tests/suite/mod.rs | // Aggregates all former standalone integration tests as modules.
mod device_code_login;
mod login_server_e2e;
| rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/login/tests/suite/device_code_login.rs | codex-rs/login/tests/suite/device_code_login.rs | #![allow(clippy::unwrap_used)]
use anyhow::Context;
use base64::Engine;
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
use codex_core::auth::AuthCredentialsStoreMode;
use codex_core::auth::load_auth_dot_json;
use codex_login::ServerOptions;
use codex_login::run_device_code_login;
use serde_json::json;
use std::... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/linux-sandbox/src/lib.rs | codex-rs/linux-sandbox/src/lib.rs | #[cfg(target_os = "linux")]
mod landlock;
#[cfg(target_os = "linux")]
mod linux_run_main;
#[cfg(target_os = "linux")]
pub fn run_main() -> ! {
linux_run_main::run_main();
}
#[cfg(not(target_os = "linux"))]
pub fn run_main() -> ! {
panic!("codex-linux-sandbox is only supported on Linux");
}
| rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/linux-sandbox/src/landlock.rs | codex-rs/linux-sandbox/src/landlock.rs | use std::collections::BTreeMap;
use std::path::Path;
use codex_core::error::CodexErr;
use codex_core::error::Result;
use codex_core::error::SandboxErr;
use codex_core::protocol::SandboxPolicy;
use codex_utils_absolute_path::AbsolutePathBuf;
use landlock::ABI;
use landlock::Access;
use landlock::AccessFs;
use landlock... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/linux-sandbox/src/main.rs | codex-rs/linux-sandbox/src/main.rs | /// Note that the cwd, env, and command args are preserved in the ultimate call
/// to `execv`, so the caller is responsible for ensuring those values are
/// correct.
fn main() -> ! {
codex_linux_sandbox::run_main()
}
| rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/linux-sandbox/src/linux_run_main.rs | codex-rs/linux-sandbox/src/linux_run_main.rs | use clap::Parser;
use std::ffi::CString;
use std::path::PathBuf;
use crate::landlock::apply_sandbox_policy_to_current_thread;
#[derive(Debug, Parser)]
pub struct LandlockCommand {
/// It is possible that the cwd used in the context of the sandbox policy
/// is different from the cwd of the process to spawn.
... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/linux-sandbox/tests/all.rs | codex-rs/linux-sandbox/tests/all.rs | // Single integration test binary that aggregates all test modules.
// The submodules live in `tests/suite/`.
mod suite;
| rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/linux-sandbox/tests/suite/landlock.rs | codex-rs/linux-sandbox/tests/suite/landlock.rs | #![cfg(target_os = "linux")]
use codex_core::config::types::ShellEnvironmentPolicy;
use codex_core::error::CodexErr;
use codex_core::error::SandboxErr;
use codex_core::exec::ExecParams;
use codex_core::exec::process_exec_tool_call;
use codex_core::exec_env::create_env;
use codex_core::protocol::SandboxPolicy;
use codex... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/linux-sandbox/tests/suite/mod.rs | codex-rs/linux-sandbox/tests/suite/mod.rs | // Aggregates all former standalone integration tests as modules.
mod landlock;
| rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/lmstudio/src/lib.rs | codex-rs/lmstudio/src/lib.rs | mod client;
pub use client::LMStudioClient;
use codex_core::config::Config;
/// Default OSS model to use when `--oss` is passed without an explicit `-m`.
pub const DEFAULT_OSS_MODEL: &str = "openai/gpt-oss-20b";
/// Prepare the local OSS environment when `--oss` is selected.
///
/// - Ensures a local LM Studio serve... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/lmstudio/src/client.rs | codex-rs/lmstudio/src/client.rs | use codex_core::LMSTUDIO_OSS_PROVIDER_ID;
use codex_core::config::Config;
use std::io;
use std::path::Path;
#[derive(Clone)]
pub struct LMStudioClient {
client: reqwest::Client,
base_url: String,
}
const LMSTUDIO_CONNECTION_ERROR: &str = "LM Studio is not responding. Install from https://lmstudio.ai/download ... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/execpolicy/src/lib.rs | codex-rs/execpolicy/src/lib.rs | pub mod amend;
pub mod decision;
pub mod error;
pub mod execpolicycheck;
pub mod parser;
pub mod policy;
pub mod rule;
pub use amend::AmendError;
pub use amend::blocking_append_allow_prefix_rule;
pub use decision::Decision;
pub use error::Error;
pub use error::Result;
pub use execpolicycheck::ExecPolicyCheckCommand;
p... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/execpolicy/src/parser.rs | codex-rs/execpolicy/src/parser.rs | use multimap::MultiMap;
use shlex;
use starlark::any::ProvidesStaticType;
use starlark::environment::GlobalsBuilder;
use starlark::environment::Module;
use starlark::eval::Evaluator;
use starlark::starlark_module;
use starlark::syntax::AstModule;
use starlark::syntax::Dialect;
use starlark::values::Value;
use starlark:... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/execpolicy/src/policy.rs | codex-rs/execpolicy/src/policy.rs | use crate::decision::Decision;
use crate::error::Error;
use crate::error::Result;
use crate::rule::PatternToken;
use crate::rule::PrefixPattern;
use crate::rule::PrefixRule;
use crate::rule::RuleMatch;
use crate::rule::RuleRef;
use multimap::MultiMap;
use serde::Deserialize;
use serde::Serialize;
use std::sync::Arc;
t... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
openai/codex | https://github.com/openai/codex/blob/279283fe02bf0ce7f93a160db34dd8cf9c8f42c8/codex-rs/execpolicy/src/decision.rs | codex-rs/execpolicy/src/decision.rs | use serde::Deserialize;
use serde::Serialize;
use crate::error::Error;
use crate::error::Result;
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum Decision {
/// Command may run without further approval.
Allow,
/// Request exp... | rust | Apache-2.0 | 279283fe02bf0ce7f93a160db34dd8cf9c8f42c8 | 2026-01-04T15:31:59.292600Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.