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 |
|---|---|---|---|---|---|---|---|---|
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-time-driver/src/lib.rs | embassy-time-driver/src/lib.rs | #![no_std]
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
//! ## Implementing a driver
//!
//! - Define a struct `MyDriver`
//! - Implement [`Driver`] for it
//! - Register it as the global driver with [`time_driver_impl`].
//!
//! If your driver has a single set tick rate, enable the corresponding [`ti... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-time-driver/src/tick.rs | embassy-time-driver/src/tick.rs | // Generated by gen_tick.py. DO NOT EDIT.
#[cfg(feature = "tick-hz-1")]
pub const TICK_HZ: u64 = 1;
#[cfg(feature = "tick-hz-2")]
pub const TICK_HZ: u64 = 2;
#[cfg(feature = "tick-hz-4")]
pub const TICK_HZ: u64 = 4;
#[cfg(feature = "tick-hz-8")]
pub const TICK_HZ: u64 = 8;
#[cfg(feature = "tick-hz-10")]
pub const TICK... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-tuntap/src/lib.rs | embassy-net-tuntap/src/lib.rs | #![warn(missing_docs)]
#![doc = include_str!("../README.md")]
use std::io;
use std::io::{Read, Write};
use std::os::fd::AsFd;
use std::os::unix::io::{AsRawFd, RawFd};
use std::os::unix::prelude::BorrowedFd;
use std::task::Context;
use async_io::Async;
use embassy_net_driver::{Capabilities, Driver, HardwareAddress, Lin... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/lib.rs | embassy-net-enc28j60/src/lib.rs | #![no_std]
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
// must go first.
mod fmt;
#[macro_use]
mod macros;
mod bank0;
mod bank1;
mod bank2;
mod bank3;
mod common;
mod header;
mod phy;
mod traits;
use core::cmp;
use embassy_net_driver::{Capabilities, HardwareAddress, LinkState};
use embassy_time::D... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/phy.rs | embassy-net-enc28j60/src/phy.rs | #[allow(dead_code)]
#[derive(Clone, Copy)]
pub enum Register {
PHCON1 = 0x00,
PHSTAT1 = 0x01,
PHID1 = 0x02,
PHID2 = 0x03,
PHCON2 = 0x10,
PHSTAT2 = 0x11,
PHIE = 0x12,
PHIR = 0x13,
PHLCON = 0x14,
}
impl Register {
pub(crate) fn addr(&self) -> u8 {
*self as u8
}
}
regi... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/bank1.rs | embassy-net-enc28j60/src/bank1.rs | #[allow(dead_code)]
#[derive(Clone, Copy)]
pub enum Register {
EHT0 = 0x00,
EHT1 = 0x01,
EHT2 = 0x02,
EHT3 = 0x03,
EHT4 = 0x04,
EHT5 = 0x05,
EHT6 = 0x06,
EHT7 = 0x07,
EPMM0 = 0x08,
EPMM1 = 0x09,
EPMM2 = 0x0a,
EPMM3 = 0x0b,
EPMM4 = 0x0c,
EPMM5 = 0x0d,
EPMM6 = 0... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/bank2.rs | embassy-net-enc28j60/src/bank2.rs | #[allow(dead_code)]
#[derive(Clone, Copy)]
pub enum Register {
MACON1 = 0x00,
MACON3 = 0x02,
MACON4 = 0x03,
MABBIPG = 0x04,
MAIPGL = 0x06,
MAIPGH = 0x07,
MACLCON1 = 0x08,
MACLCON2 = 0x09,
MAMXFLL = 0x0a,
MAMXFLH = 0x0b,
MICMD = 0x12,
MIREGADR = 0x14,
MIWRL = 0x16,
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/header.rs | embassy-net-enc28j60/src/header.rs | register!(RxStatus, 0, u32, {
#[doc = "Indicates length of the received frame"]
byte_count @ 0..15,
#[doc = "Indicates a packet over 50,000 bit times occurred or that a packet was dropped since the last receive"]
long_event @ 16,
#[doc = "Indicates that at some time since the last receive, a carrier... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/bank3.rs | embassy-net-enc28j60/src/bank3.rs | #[allow(dead_code)]
#[derive(Clone, Copy)]
pub enum Register {
MAADR5 = 0x00,
MAADR6 = 0x01,
MAADR3 = 0x02,
MAADR4 = 0x03,
MAADR1 = 0x04,
MAADR2 = 0x05,
EBSTSD = 0x06,
EBSTCON = 0x07,
EBSTCSL = 0x08,
EBSTCSH = 0x09,
MISTAT = 0x0a,
EREVID = 0x12,
ECOCON = 0x15,
EFL... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/macros.rs | embassy-net-enc28j60/src/macros.rs | macro_rules! register {
($REGISTER:ident, $reset_value:expr, $uxx:ty, {
$(#[$($attr:tt)*] $bitfield:ident @ $range:expr,)+
}) => {
#[derive(Clone, Copy)]
pub(crate) struct $REGISTER<MODE> {
bits: $uxx,
_mode: ::core::marker::PhantomData<MODE>,
}
i... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/common.rs | embassy-net-enc28j60/src/common.rs | #[allow(dead_code)]
#[derive(Clone, Copy)]
pub enum Register {
ECON1 = 0x1f,
ECON2 = 0x1e,
EIE = 0x1b,
EIR = 0x1c,
ESTAT = 0x1d,
}
impl Register {
pub(crate) fn addr(&self) -> u8 {
*self as u8
}
pub(crate) fn is_eth_register(&self) -> bool {
match *self {
Re... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/bank0.rs | embassy-net-enc28j60/src/bank0.rs | #[allow(dead_code)]
#[derive(Clone, Copy)]
pub enum Register {
ERDPTL = 0x00,
ERDPTH = 0x01,
EWRPTL = 0x02,
EWRPTH = 0x03,
ETXSTL = 0x04,
ETXSTH = 0x05,
ETXNDL = 0x06,
ETXNDH = 0x07,
ERXSTL = 0x08,
ERXSTH = 0x09,
ERXNDL = 0x0a,
ERXNDH = 0x0b,
ERXRDPTL = 0x0c,
ERXR... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/traits.rs | embassy-net-enc28j60/src/traits.rs | use core::ops::Range;
pub(crate) trait OffsetSize {
fn offset(self) -> u8;
fn size(self) -> u8;
}
impl OffsetSize for u8 {
fn offset(self) -> u8 {
self
}
fn size(self) -> u8 {
1
}
}
impl OffsetSize for Range<u8> {
fn offset(self) -> u8 {
self.start
}
fn s... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-enc28j60/src/fmt.rs | embassy-net-enc28j60/src/fmt.rs | #![macro_use]
#![allow(unused)]
use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert {
($($x:tt)*) => {
{
#[cfg(not(feature = "defmt"))]
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/control.rs | cyw43/src/control.rs | use core::cmp::{max, min};
use core::iter::zip;
use core::sync::atomic::AtomicBool;
use core::sync::atomic::Ordering::Relaxed;
use embassy_net_driver_channel as ch;
use embassy_net_driver_channel::driver::HardwareAddress;
use embassy_time::{Duration, Timer};
use crate::consts::*;
use crate::events::{Event, EventSubsc... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/consts.rs | cyw43/src/consts.rs | #![allow(unused)]
pub(crate) const FUNC_BUS: u32 = 0;
pub(crate) const FUNC_BACKPLANE: u32 = 1;
pub(crate) const FUNC_WLAN: u32 = 2;
pub(crate) const FUNC_BT: u32 = 3;
// Register addresses
pub(crate) const REG_BUS_CTRL: u32 = 0x0;
pub(crate) const REG_BUS_RESPONSE_DELAY: u32 = 0x1;
pub(crate) const REG_BUS_STATUS_EN... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/nvram.rs | cyw43/src/nvram.rs | pub static NVRAM: &'static [u8] = b"
NVRAMRev=$Rev$\x00\
manfid=0x2d0\x00\
prodid=0x0727\x00\
vendid=0x14e4\x00\
devid=0x43e2\x00\
boardtype=0x0887\x00\
boardrev=0x1100\x00\
boardnum=22\x00\
macaddr=00:A0:50:b5:59:5e\x00\
sromrev=11\x00\
boardflags=0x00404001\x00\
boardfl... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/lib.rs | cyw43/src/lib.rs | #![no_std]
#![no_main]
#![allow(async_fn_in_trait)]
#![allow(unsafe_op_in_unsafe_fn)]
#![deny(unused_must_use)]
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
// This mod MUST go first, so that the others see its macros.
pub(crate) mod fmt;
#[cfg(feature = "bluetooth")]
/// Bluetooth module.
pub mod bl... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/runner.rs | cyw43/src/runner.rs | use core::sync::atomic::AtomicBool;
use core::sync::atomic::Ordering::Relaxed;
use aligned::{A4, Aligned};
use embassy_futures::select::{Either4, select4};
use embassy_net_driver_channel as ch;
use embassy_net_driver_channel::driver::LinkState;
use embassy_time::{Duration, Timer, block_for};
use crate::consts::*;
use... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | true |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/structs.rs | cyw43/src/structs.rs | use crate::events::Event;
use crate::fmt::Bytes;
macro_rules! impl_bytes {
($t:ident) => {
impl $t {
/// Bytes consumed by this type.
pub const SIZE: usize = core::mem::size_of::<Self>();
/// Convert to byte array.
#[allow(unused)]
pub fn to_byte... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/countries.rs | cyw43/src/countries.rs | #![allow(unused)]
pub struct Country {
pub code: [u8; 2],
pub rev: u16,
}
/// AF Afghanistan
pub const AFGHANISTAN: Country = Country { code: *b"AF", rev: 0 };
/// AL Albania
pub const ALBANIA: Country = Country { code: *b"AL", rev: 0 };
/// DZ Algeria
pub const ALGERIA: Country = Country { code: *b"DZ", rev:... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/bluetooth.rs | cyw43/src/bluetooth.rs | use core::cell::RefCell;
use core::future::Future;
use core::mem::MaybeUninit;
use bt_hci::transport::WithIndicator;
use bt_hci::{ControllerToHostPacket, FromHciBytes, FromHciBytesError, HostToControllerPacket, PacketKind, WriteHci};
use embassy_futures::yield_now;
use embassy_sync::blocking_mutex::raw::NoopRawMutex;
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/ioctl.rs | cyw43/src/ioctl.rs | use core::cell::{Cell, RefCell};
use core::future::{Future, poll_fn};
use core::task::{Poll, Waker};
use embassy_sync::waitqueue::WakerRegistration;
use crate::consts::Ioctl;
use crate::fmt::Bytes;
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum IoctlType {
Get = 0,
Set = 2,
}
#[derive(Clone, Copy)]
pub stru... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/util.rs | cyw43/src/util.rs | #![allow(unused)]
use core::slice;
use aligned::{A4, Aligned};
pub(crate) const fn slice8_mut(x: &mut [u32]) -> &mut [u8] {
let len = size_of_val(x);
unsafe { slice::from_raw_parts_mut(x.as_mut_ptr() as _, len) }
}
pub(crate) const fn slice16_mut(x: &mut [u32]) -> &mut [u16] {
let len = size_of_val(x) /... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/spi.rs | cyw43/src/spi.rs | use aligned::{A4, Aligned};
use embassy_futures::yield_now;
use embassy_time::Timer;
use embedded_hal_1::digital::OutputPin;
use futures::FutureExt;
use crate::consts::*;
use crate::runner::{BusType, SealedBus};
use crate::util::{slice8_mut, slice32_mut, slice32_ref};
/// Custom Spi Trait that _only_ supports the bus... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/sdio.rs | cyw43/src/sdio.rs | use core::slice;
use aligned::{A4, Aligned};
use embassy_time::{Duration, Timer};
use crate::consts::*;
use crate::runner::{BusType, SealedBus};
use crate::try_until;
use crate::util::{aligned_mut, aligned_ref, slice8_mut};
// macro_rules! ALIGN_UINT {
// ($val:expr, $align:expr) => {
// ((($val) + ($ali... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/events.rs | cyw43/src/events.rs | #![allow(dead_code)]
#![allow(non_camel_case_types)]
use core::cell::RefCell;
use embassy_sync::blocking_mutex::raw::NoopRawMutex;
use embassy_sync::pubsub::{PubSubChannel, Subscriber};
use crate::structs::BssInfo;
#[derive(Debug, Clone, Copy, PartialEq, Eq, num_enum::FromPrimitive)]
#[cfg_attr(feature = "defmt", d... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/cyw43/src/fmt.rs | cyw43/src/fmt.rs | #![macro_use]
#![allow(unused)]
use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert {
($($x:tt)*) => {
{
#[cfg(not(feature = "defmt"))]
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/build.rs | embassy-hal-internal/build.rs | #[path = "./build_common.rs"]
mod common;
fn main() {
let mut cfgs = common::CfgSet::new();
common::set_target_cfgs(&mut cfgs);
}
| rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/build_common.rs | embassy-hal-internal/build_common.rs | // NOTE: this file is copy-pasted between several Embassy crates, because there is no
// straightforward way to share this code:
// - it cannot be placed into the root of the repo and linked from each build.rs using `#[path =
// "../build_common.rs"]`, because `cargo publish` requires that all files published with a cr... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/src/lib.rs | embassy-hal-internal/src/lib.rs | #![no_std]
#![allow(clippy::new_without_default)]
#![allow(unsafe_op_in_unsafe_fn)]
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
// This mod MUST go first, so that the others see its macros.
pub(crate) mod fmt;
pub mod atomic_ring_buffer;
pub mod drop;
mod macros;
mod peripheral;
pub mod ratio;
pub u... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/src/peripheral.rs | embassy-hal-internal/src/peripheral.rs | use core::marker::PhantomData;
use core::ops::Deref;
/// An exclusive reference to a peripheral.
///
/// This is functionally the same as a `&'a mut T`. There's a few advantages in having
/// a dedicated struct instead:
///
/// - Memory efficiency: Peripheral singletons are typically either zero-sized (for concrete
//... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/src/atomic_ring_buffer.rs | embassy-hal-internal/src/atomic_ring_buffer.rs | //! Atomic reusable ringbuffer.
use core::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
use core::{ptr, slice};
/// Atomic reusable ringbuffer
///
/// This ringbuffer implementation is designed to be stored in a `static`,
/// therefore all methods take `&self` and not `&mut self`.
///
/// It is "reusable": when cr... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/src/macros.rs | embassy-hal-internal/src/macros.rs | /// Types for the peripheral singletons.
#[macro_export]
macro_rules! peripherals_definition {
($($(#[$cfg:meta])? $name:ident),*$(,)?) => {
/// Types for the peripheral singletons.
pub mod peripherals {
$(
$(#[$cfg])?
#[allow(non_camel_case_types)]
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/src/drop.rs | embassy-hal-internal/src/drop.rs | //! Types for controlling when drop is invoked.
use core::mem;
use core::mem::MaybeUninit;
/// A type to delay the drop handler invocation.
#[must_use = "to delay the drop handler invocation to the end of the scope"]
pub struct OnDrop<F: FnOnce()> {
f: MaybeUninit<F>,
}
impl<F: FnOnce()> OnDrop<F> {
/// Creat... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/src/interrupt.rs | embassy-hal-internal/src/interrupt.rs | //! Interrupt handling for cortex-m devices.
use core::mem;
use core::sync::atomic::{Ordering, compiler_fence};
use cortex_m::interrupt::InterruptNumber;
use cortex_m::peripheral::NVIC;
use critical_section::CriticalSection;
/// Generate a standard `mod interrupt` for a HAL.
#[macro_export]
macro_rules! interrupt_mod... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/src/ratio.rs | embassy-hal-internal/src/ratio.rs | //! Types for dealing with rational numbers.
use core::ops::{Add, Div, Mul};
use num_traits::{CheckedAdd, CheckedDiv, CheckedMul};
/// Represents the ratio between two numbers.
#[derive(Copy, Clone, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Ratio<T> {
/// Numerator.
numer: T,
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-hal-internal/src/fmt.rs | embassy-hal-internal/src/fmt.rs | #![macro_use]
#![allow(unused)]
use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert {
($($x:tt)*) => {
{
#[cfg(not(feature = "defmt"))]
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-ppp/src/lib.rs | embassy-net-ppp/src/lib.rs | #![no_std]
#![warn(missing_docs)]
#![doc = include_str!("../README.md")]
// must be first
mod fmt;
use core::convert::Infallible;
use core::mem::MaybeUninit;
use embassy_futures::select::{Either, select};
use embassy_net_driver_channel as ch;
use embassy_net_driver_channel::driver::LinkState;
use embedded_io_async::... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-net-ppp/src/fmt.rs | embassy-net-ppp/src/fmt.rs | #![macro_use]
#![allow(unused)]
use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert {
($($x:tt)*) => {
{
#[cfg(not(feature = "defmt"))]
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/ostimer.rs | embassy-mcxa/src/ostimer.rs | //! # OSTIMER Driver with Robustness Features
//!
//! This module provides an async timer driver for the NXP MCXA276 OSTIMER peripheral
//! with protection against race conditions and timer rollover issues.
//!
//! ## Features
//!
//! - Async timing with embassy-time integration
//! - Gray code counter handling (42-bit... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/config.rs | embassy-mcxa/src/config.rs | // HAL configuration (minimal), mirroring embassy-imxrt style
use crate::clocks::config::ClocksConfig;
use crate::interrupt::Priority;
#[non_exhaustive]
pub struct Config {
#[cfg(feature = "time")]
pub time_interrupt_priority: Priority,
pub rtc_interrupt_priority: Priority,
pub adc_interrupt_priority:... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/rtc.rs | embassy-mcxa/src/rtc.rs | //! RTC DateTime driver.
use core::marker::PhantomData;
use embassy_hal_internal::{Peri, PeripheralType};
use maitake_sync::WaitCell;
use crate::clocks::with_clocks;
use crate::interrupt::typelevel::{Handler, Interrupt};
use crate::pac;
use crate::pac::rtc0::cr::Um;
/// Global wait cell for alarm notifications
stati... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/lib.rs | embassy-mcxa/src/lib.rs | #![no_std]
#![allow(async_fn_in_trait)]
#![doc = include_str!("../README.md")]
// //! ## Feature flags
// #![doc = document_features::document_features!(feature_label = r#"<span class="stab portability"><code>{feature}</code></span>"#)]
pub mod clocks; // still provide clock helpers
pub mod dma;
pub mod gpio;
pub mo... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/dma.rs | embassy-mcxa/src/dma.rs | //! DMA driver for MCXA276.
//!
//! This module provides a typed channel abstraction over the EDMA_0_TCD0 array
//! and helpers for configuring the channel MUX. The driver supports both
//! low-level TCD configuration and higher-level async transfer APIs.
//!
//! # Architecture
//!
//! The MCXA276 has 8 DMA channels (0... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | true |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/interrupt.rs | embassy-mcxa/src/interrupt.rs | //! Minimal interrupt helpers mirroring embassy-imxrt style for OS_EVENT and LPUART2.
//! Type-level interrupt traits and bindings are provided by the
//! `embassy_hal_internal::interrupt_mod!` macro via the generated module below.
// TODO(AJM): As of 2025-11-13, we need to do a pass to ensure safety docs
// are compl... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/crc.rs | embassy-mcxa/src/crc.rs | //! Cyclic Redundancy Check (CRC)
use core::marker::PhantomData;
use embassy_hal_internal::Peri;
use mcxa_pac::crc0::ctrl::{Fxor, Tcrc, Tot, Totr};
use crate::clocks::enable_and_reset;
use crate::clocks::periph_helpers::NoConfig;
use crate::peripherals::CRC0;
/// CRC driver.
pub struct Crc<'d, M> {
_peri: Peri<... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/clkout.rs | embassy-mcxa/src/clkout.rs | //! CLKOUT pseudo-peripheral
//!
//! CLKOUT is a part of the clock generation subsystem, and can be used
//! either to generate arbitrary waveforms, or to debug the state of
//! internal oscillators.
use core::marker::PhantomData;
use embassy_hal_internal::Peri;
pub use crate::clocks::periph_helpers::Div4;
use crate... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/trng.rs | embassy-mcxa/src/trng.rs | //! True Random Number Generator
use core::marker::PhantomData;
use embassy_hal_internal::Peri;
use embassy_hal_internal::interrupt::InterruptExt;
use maitake_sync::WaitCell;
use mcxa_pac::trng0::osc2_ctl::TrngEntCtl;
use crate::clocks::enable_and_reset;
use crate::clocks::periph_helpers::NoConfig;
use crate::interr... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/adc.rs | embassy-mcxa/src/adc.rs | //! ADC driver
use core::future::Future;
use core::marker::PhantomData;
use embassy_hal_internal::{Peri, PeripheralType};
use maitake_sync::WaitCell;
use paste::paste;
use crate::clocks::periph_helpers::{AdcClockSel, AdcConfig, Div4};
use crate::clocks::{ClockError, Gate, PoweredClock, enable_and_reset};
use crate::g... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/gpio.rs | embassy-mcxa/src/gpio.rs | //! GPIO driver built around a type-erased `Flex` pin, similar to other Embassy HALs.
//! The exported `Output`/`Input` drivers own a `Flex` so they no longer depend on the
//! concrete pin type.
use core::convert::Infallible;
use core::future::Future;
use core::marker::PhantomData;
use core::pin::pin;
use embassy_ha... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/reset_reason.rs | embassy-mcxa/src/reset_reason.rs | //! Reset reason
//!
//! MCXA families keep the most recent reset reason in the SRS
//! register of the CMC block. This lets users understand why the MCU
//! has reset and take appropriate corrective actions if required.
/// Reads the most recent reset reason from the Core Mode Controller
/// (CMC).
pub fn reset_reaso... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/i2c/controller.rs | embassy-mcxa/src/i2c/controller.rs | //! LPI2C controller driver
use core::future::Future;
use core::marker::PhantomData;
use embassy_hal_internal::Peri;
use embassy_hal_internal::drop::OnDrop;
use mcxa_pac::lpi2c0::mtdr::Cmd;
use super::{Async, Blocking, Error, Instance, InterruptHandler, Mode, Result, SclPin, SdaPin};
use crate::clocks::periph_helper... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/i2c/mod.rs | embassy-mcxa/src/i2c/mod.rs | //! I2C Support
use core::marker::PhantomData;
use embassy_hal_internal::PeripheralType;
use maitake_sync::WaitCell;
use paste::paste;
use crate::clocks::periph_helpers::Lpi2cConfig;
use crate::clocks::{ClockError, Gate};
use crate::gpio::{GpioPin, SealedPin};
use crate::{interrupt, pac};
/// Shorthand for `Result<... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/clocks/config.rs | embassy-mcxa/src/clocks/config.rs | //! Clock Configuration
//!
//! This module holds configuration types used for the system clocks. For
//! configuration of individual peripherals, see [`super::periph_helpers`].
use super::PoweredClock;
/// This type represents a divider in the range 1..=256.
///
/// At a hardware level, this is an 8-bit register fro... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/clocks/periph_helpers.rs | embassy-mcxa/src/clocks/periph_helpers.rs | //! Peripheral Helpers
//!
//! The purpose of this module is to define the per-peripheral special handling
//! required from a clocking perspective. Different peripherals have different
//! selectable source clocks, and some peripherals have additional pre-dividers
//! that can be used.
//!
//! See the docs of [`SPConf... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/clocks/mod.rs | embassy-mcxa/src/clocks/mod.rs | //! # Clock Module
//!
//! For the MCX-A, we separate clock and peripheral control into two main stages:
//!
//! 1. At startup, e.g. when `embassy_mcxa::init()` is called, we configure the
//! core system clocks, including external and internal oscillators. This
//! configuration is then largely static for the du... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | true |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/lpuart/buffered.rs | embassy-mcxa/src/lpuart/buffered.rs | use core::future::poll_fn;
use core::marker::PhantomData;
use core::sync::atomic::{AtomicBool, Ordering};
use core::task::Poll;
use embassy_hal_internal::Peri;
use embassy_hal_internal::atomic_ring_buffer::RingBuffer;
use embassy_sync::waitqueue::AtomicWaker;
use super::*;
use crate::interrupt;
// ==================... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-mcxa/src/lpuart/mod.rs | embassy-mcxa/src/lpuart/mod.rs | use core::future::Future;
use core::marker::PhantomData;
use embassy_hal_internal::{Peri, PeripheralType};
use paste::paste;
use crate::clocks::periph_helpers::{Div4, LpuartClockSel, LpuartConfig};
use crate::clocks::{ClockError, Gate, PoweredClock, enable_and_reset};
use crate::gpio::{AnyPin, SealedPin};
use crate::... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | true |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-usb-driver/src/lib.rs | embassy-usb-driver/src/lib.rs | #![no_std]
#![allow(async_fn_in_trait)]
#![allow(unsafe_op_in_unsafe_fn)]
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
/// Direction of USB traffic. Note that in the USB standard the direction is always indicated from
/// the perspective of the host, which is backward for devices, but the standard dir... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-boot-rp/build.rs | embassy-boot-rp/build.rs | use std::env;
fn main() {
let target = env::var("TARGET").unwrap();
if target.starts_with("thumbv6m-") {
println!("cargo:rustc-cfg=armv6m");
}
println!("cargo:rustc-check-cfg=cfg(armv6m)");
}
| rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-boot-rp/src/lib.rs | embassy-boot-rp/src/lib.rs | #![no_std]
#![allow(unsafe_op_in_unsafe_fn)]
#![warn(missing_docs)]
#![doc = include_str!("../README.md")]
mod fmt;
pub use embassy_boot::{
AlignedBuffer, BlockingFirmwareState, BlockingFirmwareUpdater, BootError, BootLoaderConfig, FirmwareState,
FirmwareUpdater, FirmwareUpdaterConfig, State,
};
use embassy_rp... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-boot-rp/src/fmt.rs | embassy-boot-rp/src/fmt.rs | #![macro_use]
#![allow(unused)]
use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert {
($($x:tt)*) => {
{
#[cfg(not(feature = "defmt"))]
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/config.rs | src/config.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/builder.rs | src/builder.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/lib.rs | src/lib.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/char_range.rs | src/char_range.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/cluster.rs | src/cluster.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/substring.rs | src/substring.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/python.rs | src/python.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/quantifier.rs | src/quantifier.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/expression.rs | src/expression.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/macros.rs | src/macros.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/format.rs | src/format.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/regexp.rs | src/regexp.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/dfa.rs | src/dfa.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/main.rs | src/main.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/wasm.rs | src/wasm.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/grapheme.rs | src/grapheme.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/component.rs | src/component.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/unicode_tables/decimal.rs | src/unicode_tables/decimal.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/unicode_tables/mod.rs | src/unicode_tables/mod.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/unicode_tables/word.rs | src/unicode_tables/word.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/src/unicode_tables/space.rs | src/unicode_tables/space.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/tests/wasm_browser_tests.rs | tests/wasm_browser_tests.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/tests/cli_integration_tests.rs | tests/cli_integration_tests.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | true |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/tests/wasm_node_tests.rs | tests/wasm_node_tests.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/tests/lib_integration_tests.rs | tests/lib_integration_tests.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | true |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/tests/property_tests.rs | tests/property_tests.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
pemistahl/grex | https://github.com/pemistahl/grex/blob/fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd/benches/benchmark.rs | benches/benchmark.rs | /*
* Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | rust | Apache-2.0 | fa3e8ed71c43ea92f9f0e43ab31e1c82d006d5dd | 2026-01-04T15:48:59.764508Z | false |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/rustc.rs | src/rustc.rs | use std::path::{Path, PathBuf};
use std::process::Command;
use rustc_version::{Version, VersionMeta};
use serde::Deserialize;
use crate::docker::ImagePlatform;
use crate::errors::*;
use crate::extensions::{env_program, CommandExt};
use crate::shell::MessageInfo;
use crate::TargetTriple;
#[derive(Debug)]
pub struct T... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | false |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/config.rs | src/config.rs | use crate::cross_toml::BuildStd;
use crate::docker::custom::PreBuild;
use crate::docker::{ImagePlatform, PossibleImage};
use crate::shell::MessageInfo;
use crate::{CrossToml, Result, Target, TargetList};
use std::borrow::Cow;
use std::collections::HashMap;
use std::env;
use std::str::FromStr;
#[derive(Debug)]
pub str... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | false |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/errors.rs | src/errors.rs | use crate::docker;
use crate::temp;
use std::sync::atomic::{AtomicBool, Ordering};
pub use color_eyre::Section;
pub use eyre::Context;
pub use eyre::Result;
pub static TERMINATED: AtomicBool = AtomicBool::new(false);
pub fn install_panic_hook() -> Result<()> {
let is_dev = !crate::commit_info().is_empty() || st... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | false |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/temp.rs | src/temp.rs | #![allow(static_mut_refs)] // FIXME: use appropriate std types for `FILES` and `DIRS`.
use std::fs;
use std::path::{Path, PathBuf};
use crate::errors::Result;
// open temporary directories and files so we ensure we cleanup on exit.
static mut FILES: Vec<tempfile::NamedTempFile> = vec![];
static mut DIRS: Vec<tempfil... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | false |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/cross_toml.rs | src/cross_toml.rs | //! The `Cross.toml` configuration file.
//!
//! For a detailed user documentation of the file and the contents please refer to the [docs in the
//! repo][1].
//!
//! [1]: https://github.com/cross-rs/cross/blob/main/docs/config_file.md
use crate::config::ConfVal;
use crate::docker::custom::PreBuild;
use crate::docker:... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | false |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/lib.rs | src/lib.rs | //! [](https://crates.io/crates/cross)
//! [](https://crates.io/crates/cross)
//! [](https://matrix.to/#/#cross-rs:matrix.org)
//!
//! # `cross`
//!
/... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | true |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/tests.rs | src/tests.rs | mod rustup;
mod toml;
use std::{
ffi::OsStr,
path::{Path, PathBuf},
};
use once_cell::sync::OnceCell;
use rustc_version::VersionMeta;
use crate::{docker::ImagePlatform, rustc::QualifiedToolchain, TargetTriple, ToUtf8};
static WORKSPACE: OnceCell<PathBuf> = OnceCell::new();
/// Returns the cargo workspace f... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | false |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/id.rs | src/id.rs | #[cfg(not(target_os = "windows"))]
use nix::{
errno::Errno,
unistd::{Gid, Uid},
};
#[cfg(not(target_os = "windows"))]
use std::ffi::CStr;
use crate::errors::*;
#[cfg(target_os = "windows")]
pub fn group() -> u32 {
1000
}
#[cfg(not(target_os = "windows"))]
pub fn group() -> u32 {
Gid::current().as_raw... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | false |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/cli.rs | src/cli.rs | use std::env;
use std::path::{Path, PathBuf};
use crate::cargo::Subcommand;
use crate::errors::Result;
use crate::file::{absolute_path, PathExt};
use crate::rustc::TargetList;
use crate::shell::{self, MessageInfo};
use crate::Target;
#[derive(Debug)]
pub struct Args {
pub cargo_args: Vec<String>,
pub rest_arg... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | false |
cross-rs/cross | https://github.com/cross-rs/cross/blob/426e8110a083c1aaa8e04ed460e86f4606226619/src/shell.rs | src/shell.rs | // This file was adapted from:
// https://github.com/rust-lang/cargo/blob/ca4edabb28fc96fdf2a1d56fe3851831ac166f8a/src/cargo/core/shell.rs
use std::env;
use std::fmt;
use std::io::{self, Write};
use std::str::FromStr;
use crate::config::bool_from_envvar;
use crate::errors::Result;
use owo_colors::{self, OwoColorize... | rust | Apache-2.0 | 426e8110a083c1aaa8e04ed460e86f4606226619 | 2026-01-04T15:49:10.802925Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.