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 |
|---|---|---|---|---|---|---|---|---|
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/vmm_config/mod.rs | src/vmm/src/vmm_config/mod.rs | // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::convert::{From, TryInto};
use std::io;
use serde::{Deserialize, Serialize};
use crate::rate_limiter::{BucketUpdate, RateLimiter, TokenBucket};
/// Wrapper for configuring the balloon device.
pu... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/vmm_config/memory_hotplug.rs | src/vmm/src/vmm_config/memory_hotplug.rs | // Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use serde::{Deserialize, Serialize};
use crate::devices::virtio::mem::{
VIRTIO_MEM_DEFAULT_BLOCK_SIZE_MIB, VIRTIO_MEM_DEFAULT_SLOT_SIZE_MIB,
};
/// Errors associated with memory hotplug configuration... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/vmm_config/mmds.rs | src/vmm/src/vmm_config/mmds.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::net::Ipv4Addr;
use serde::{Deserialize, Serialize};
use crate::mmds::data_store;
use crate::mmds::data_store::MmdsVersion;
/// Keeps the MMDS configuration.
#[derive(Clone, Debug, PartialEq, Eq,... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/vmm_config/boot_source.rs | src/vmm/src/vmm_config/boot_source.rs | // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::fs::File;
use std::io;
use serde::{Deserialize, Serialize};
/// Default guest kernel command line:
/// - `reboot=k` shut down the guest on reboot, instead of well... rebooting;
/// - `panic=1` o... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/vmm_config/drive.rs | src/vmm/src/vmm_config/drive.rs | // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::VecDeque;
use std::io;
use std::sync::{Arc, Mutex};
use serde::{Deserialize, Serialize};
use super::RateLimiterConfig;
use crate::VmmError;
use crate::devices::virtio::block::device... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/vmm_config/metrics.rs | src/vmm/src/vmm_config/metrics.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//! Auxiliary module for configuring the metrics system.
use std::path::PathBuf;
use serde::{Deserialize, Serialize};
use crate::logger::{FcLineWriter, METRICS};
use crate::utils::open_file_write_nonbloc... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/vmm_config/snapshot.rs | src/vmm/src/vmm_config/snapshot.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//! Configurations used in the snapshotting context.
use std::path::PathBuf;
/// For crates that depend on `vmm` we export.
pub use semver::Version;
use serde::{Deserialize, Serialize};
/// The snapshot... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/vmm_config/net.rs | src/vmm/src/vmm_config/net.rs | // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::convert::TryInto;
use std::ops::Deref;
use std::sync::{Arc, Mutex};
use serde::{Deserialize, Serialize};
use super::RateLimiterConfig;
use crate::VmmError;
use crate::devices::virtio::net::{Net,... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/vmm_config/balloon.rs | src/vmm/src/vmm_config/balloon.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::sync::{Arc, Mutex};
use serde::{Deserialize, Serialize};
pub use crate::devices::virtio::balloon::BALLOON_DEV_ID;
pub use crate::devices::virtio::balloon::device::BalloonStats;
use crate::device... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/gdb/target.rs | src/vmm/src/gdb/target.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashMap;
use std::sync::mpsc::{Receiver, RecvError};
use std::sync::{Arc, Mutex, PoisonError};
use arrayvec::ArrayVec;
use gdbstub::arch::Arch;
use gdbstub::common::{Signal, Tid};
us... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/gdb/mod.rs | src/vmm/src/gdb/mod.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
/// Arch specific implementations
mod arch;
/// Event loop for connection to GDB server
mod event_loop;
/// Target for gdb
pub mod target;
use std::os::unix::net::UnixListener;
use std::path::Path;
use st... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/gdb/event_loop.rs | src/vmm/src/gdb/event_loop.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::os::unix::net::UnixStream;
use std::sync::mpsc::Receiver;
use std::sync::mpsc::TryRecvError::Empty;
use std::sync::{Arc, Mutex};
use gdbstub::common::{Signal, Tid};
use gdbstub::conn::{Connection... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/gdb/arch/x86.rs | src/vmm/src/gdb/arch/x86.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use gdbstub_arch::x86::reg::X86_64CoreRegs as CoreRegs;
use kvm_bindings::*;
use kvm_ioctls::VcpuFd;
use vm_memory::GuestAddress;
use crate::Vmm;
use crate::gdb::target::GdbTargetError;
use crate::logger:... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/gdb/arch/mod.rs | src/vmm/src/gdb/arch/mod.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
#[cfg(target_arch = "aarch64")]
mod aarch64;
#[cfg(target_arch = "aarch64")]
pub use aarch64::*;
#[cfg(target_arch = "x86_64")]
mod x86;
#[cfg(target_arch = "x86_64")]
pub use x86::*;
| rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/gdb/arch/aarch64.rs | src/vmm/src/gdb/arch/aarch64.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::mem::offset_of;
use gdbstub_arch::aarch64::reg::AArch64CoreRegs as CoreRegs;
use kvm_bindings::{
KVM_GUESTDBG_ENABLE, KVM_GUESTDBG_SINGLESTEP, KVM_GUESTDBG_USE_HW, KVM_GUESTDBG_USE_SW_BP,
... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/rate_limiter/persist.rs | src/vmm/src/rate_limiter/persist.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//! Defines the structures needed for saving/restoring a RateLimiter.
use serde::{Deserialize, Serialize};
use utils::time::TimerFd;
use super::*;
use crate::snapshot::Persist;
/// State for saving a To... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/rate_limiter/mod.rs | src/vmm/src/rate_limiter/mod.rs | // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::os::unix::io::{AsRawFd, RawFd};
use std::time::{Duration, Instant};
use std::{fmt, io};
use utils::time::TimerFd;
pub mod persist;
#[derive(Debug, thiserror::Error, displaydoc::Display)]
/// De... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | true |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/test_utils/mod.rs | src/vmm/src/test_utils/mod.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#![allow(missing_docs)]
use std::sync::{Arc, Mutex};
use vm_memory::{GuestAddress, GuestRegionCollection};
use vmm_sys_util::tempdir::TempDir;
use crate::builder::build_microvm_for_boot;
use crate::reso... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/test_utils/mock_resources/mod.rs | src/vmm/src/test_utils/mock_resources/mod.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#![allow(missing_docs)]
use std::path::PathBuf;
use crate::cpu_config::templates::CustomCpuTemplate;
use crate::resources::VmResources;
use crate::vmm_config::boot_source::BootSourceConfig;
use crate::vmm... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/device_manager/persist.rs | src/vmm/src/device_manager/persist.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//! Provides functionality for saving/restoring the MMIO device manager and its devices.
use std::fmt::{self, Debug};
use std::sync::{Arc, Mutex};
use event_manager::{MutEventSubscriber, SubscriberOps};
... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/device_manager/acpi.rs | src/vmm/src/device_manager/acpi.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use acpi_tables::{Aml, aml};
use vm_memory::GuestMemoryError;
use crate::Vm;
#[cfg(target_arch = "x86_64")]
use crate::devices::acpi::vmclock::VmClock;
use crate::devices::acpi::vmgenid::VmGenId;
use crat... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/device_manager/pci_mngr.rs | src/vmm/src/device_manager/pci_mngr.rs | // Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashMap;
use std::fmt::Debug;
use std::ops::DerefMut;
use std::sync::{Arc, Mutex};
use event_manager::{MutEventSubscriber, SubscriberOps};
use log::{debug, error, warn};
use serde::{... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/device_manager/mod.rs | src/vmm/src/device_manager/mod.rs | // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the THIRD-PARTY file.
use std::convert::Inf... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/device_manager/legacy.rs | src/vmm/src/device_manager/legacy.rs | // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the THIRD-PARTY file.
#![cfg(target_arch = "... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/src/device_manager/mmio.rs | src/vmm/src/device_manager/mmio.rs | // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the THIRD-PARTY file.
use std::collections:... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/tests/integration_tests.rs | src/vmm/tests/integration_tests.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#![allow(clippy::cast_possible_truncation, clippy::tests_outside_test_module)]
use std::io::{Seek, SeekFrom};
use std::sync::{Arc, Mutex};
use std::thread;
use std::time::Duration;
use vmm::builder::buil... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/tests/io_uring.rs | src/vmm/tests/io_uring.rs | // Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#![allow(clippy::cast_possible_truncation, clippy::tests_outside_test_module)]
use std::os::unix::fs::FileExt;
use std::os::unix::io::AsRawFd;
use std::thread;
use std::time::Duration;
use vm_memory::Vol... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/tests/devices.rs | src/vmm/tests/devices.rs | // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#![allow(
clippy::cast_possible_truncation,
clippy::tests_outside_test_module,
clippy::undocumented_unsafe_blocks
)]
use std::os::raw::{c_int, c_void};
use std::os::unix::io::{AsRawFd, RawFd};
... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/benches/cpu_templates.rs | src/vmm/benches/cpu_templates.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Benchmarking cases:
// * `CustomCpuTemplate` JSON deserialization
// * `CustomCpuTemplate` JSON serialization
use std::mem::size_of_val;
use criterion::{Criterion, criterion_group, criterion_mai... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/benches/memory_access.rs | src/vmm/benches/memory_access.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#![allow(clippy::undocumented_unsafe_blocks)]
use criterion::{BatchSize, Criterion, criterion_group, criterion_main};
use vmm::resources::VmResources;
use vmm::vmm_config::machine_config::{HugePageConfig,... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/benches/queue.rs | src/vmm/benches/queue.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Benchmarking cases:
// * `Queue.pop`
// * `Queue.add_used`
// * `DescriptorChain.next_descriptor`
#![allow(clippy::cast_possible_truncation)]
use std::num::Wrapping;
use criterion::{Criterion... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/vmm/benches/block_request.rs | src/vmm/benches/block_request.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Benchmarking cases:
// * `Queue.pop`
// * `Queue.add_used`
// * `DescriptorChain.next_descriptor`
use criterion::{Criterion, criterion_group, criterion_main};
use vm_memory::GuestAddress;
use v... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/build.rs | src/cpu-template-helper/build.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::io::Write;
const MOCK_KERNEL_PATH: &str = "src/utils/mock_kernel/kernel.bin";
// Kernel header for aarch64 that comes from the kernel doc Documentation/arm64/booting.txt.
#[derive(Default)]
#[re... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/main.rs | src/cpu-template-helper/src/main.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::fs::{read_to_string, write};
use std::path::PathBuf;
use clap::{Parser, Subcommand, ValueEnum};
use vmm::cpu_config::templates::{GetCpuTemplate, GetCpuTemplateError};
mod fingerprint;
mod templa... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/utils/x86_64.rs | src/cpu-template-helper/src/utils/x86_64.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashMap;
use std::fmt::Display;
use vmm::cpu_config::templates::RegisterValueFilter;
use vmm::cpu_config::x86_64::cpuid::KvmCpuidFlags;
use vmm::cpu_config::x86_64::custom_cpu_templa... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/utils/mod.rs | src/cpu-template-helper/src/utils/mod.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::ffi::OsString;
use std::fmt::Display;
use std::fs::read_to_string;
use std::hash::Hash;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use vmm::builder::{StartMi... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/utils/aarch64.rs | src/cpu-template-helper/src/utils/aarch64.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashMap;
use std::fmt::Display;
use vmm::cpu_config::aarch64::custom_cpu_template::RegisterModifier;
use vmm::cpu_config::templates::RegisterValueFilter;
use super::ModifierMapKey;
... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/mod.rs | src/cpu-template-helper/src/template/mod.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
pub mod dump;
pub mod strip;
pub mod verify;
| rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/verify/x86_64.rs | src/cpu-template-helper/src/template/verify/x86_64.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use vmm::cpu_config::templates::CustomCpuTemplate;
use super::{VerifyError, verify_common};
use crate::utils::x86_64::{CpuidModifierMap, MsrModifierMap};
pub fn verify(
cpu_template: CustomCpuTemplat... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/verify/mod.rs | src/cpu-template-helper/src/template/verify/mod.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashMap;
use std::fmt::Debug;
use vmm::cpu_config::templates::{Numeric, RegisterValueFilter};
use crate::utils::{DiffString, ModifierMapKey};
#[cfg(target_arch = "aarch64")]
mod aa... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/verify/aarch64.rs | src/cpu-template-helper/src/template/verify/aarch64.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use vmm::cpu_config::templates::CustomCpuTemplate;
use super::{VerifyError, verify_common};
use crate::utils::aarch64::RegModifierMap;
pub fn verify(
cpu_template: CustomCpuTemplate,
cpu_config: ... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/dump/x86_64.rs | src/cpu-template-helper/src/template/dump/x86_64.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::BTreeMap;
use vmm::MSR_RANGE;
use vmm::arch::x86_64::generated::msr_index::*;
use vmm::arch::x86_64::msr::MsrRange;
use vmm::cpu_config::templates::{CpuConfiguration, CustomCpuTempla... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/dump/mod.rs | src/cpu-template-helper/src/template/dump/mod.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#[cfg(target_arch = "aarch64")]
mod aarch64;
#[cfg(target_arch = "x86_64")]
mod x86_64;
use std::sync::{Arc, Mutex};
use vmm::cpu_config::templates::CustomCpuTemplate;
use vmm::{DumpCpuConfigError, Vmm};... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/dump/aarch64.rs | src/cpu-template-helper/src/template/dump/aarch64.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use vmm::arch::aarch64::regs::{PC, RegSize, SYS_CNTPCT_EL0, SYS_CNTV_CVAL_EL0};
use vmm::cpu_config::aarch64::custom_cpu_template::RegisterModifier;
use vmm::cpu_config::templates::{CpuConfiguration, Custo... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/strip/x86_64.rs | src/cpu-template-helper/src/template/strip/x86_64.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use vmm::cpu_config::templates::CustomCpuTemplate;
use vmm::cpu_config::x86_64::custom_cpu_template::{CpuidLeafModifier, RegisterModifier};
use crate::template::strip::{StripError, strip_common};
use crat... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/strip/mod.rs | src/cpu-template-helper/src/template/strip/mod.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashMap;
use std::fmt::Debug;
use vmm::cpu_config::templates::{Numeric, RegisterValueFilter};
use crate::utils::ModifierMapKey;
#[cfg(target_arch = "aarch64")]
mod aarch64;
#[cfg(t... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/template/strip/aarch64.rs | src/cpu-template-helper/src/template/strip/aarch64.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use vmm::cpu_config::aarch64::custom_cpu_template::RegisterModifier;
use vmm::cpu_config::templates::CustomCpuTemplate;
use crate::template::strip::{StripError, strip_common};
use crate::utils::aarch64::R... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/fingerprint/dump.rs | src/cpu-template-helper/src/fingerprint/dump.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::fs::read_to_string;
use std::sync::{Arc, Mutex};
use vmm::Vmm;
use crate::fingerprint::Fingerprint;
#[derive(Debug, thiserror::Error, displaydoc::Display)]
pub enum FingerprintDumpError {
/... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/fingerprint/mod.rs | src/cpu-template-helper/src/fingerprint/mod.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use serde::{Deserialize, Serialize};
use vmm::cpu_config::templates::CustomCpuTemplate;
pub mod compare;
pub mod dump;
macro_rules! declare_fingerprint_struct_and_enum {
($($field_name:ident : $field... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/cpu-template-helper/src/fingerprint/compare.rs | src/cpu-template-helper/src/fingerprint/compare.rs | // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use serde::Serialize;
use crate::fingerprint::{Fingerprint, FingerprintField};
#[derive(Debug, thiserror::Error, displaydoc::Display)]
pub enum FingerprintCompareError {
/// Difference detected betwe... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/pci/src/lib.rs | src/pci/src/lib.rs | // Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
//! ... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/seccompiler/build.rs | src/seccompiler/build.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
fn main() {
println!("cargo::rustc-link-search=/usr/local/lib");
println!("cargo::rustc-link-lib=seccomp");
}
| rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/seccompiler/src/bindings.rs | src/seccompiler/src/bindings.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2021 Sony Group Corporation
//
// SPDX-License-Identifier: Apache-2.0
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
//! Raw FFI bindings for libseccomp library
use std::os::raw::*;
pub const MINUS_EEXIST: i32 = -libc... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/seccompiler/src/lib.rs | src/seccompiler/src/lib.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::BTreeMap;
use std::fs::File;
use std::io::{Read, Seek};
use std::os::fd::{AsRawFd, FromRawFd};
use std::os::unix::fs::MetadataExt;
use std::str::FromStr;
use bincode::config;
use bin... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/seccompiler/src/types.rs | src/seccompiler/src/types.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::BTreeMap;
use std::ffi::CString;
use std::str::FromStr;
use serde::*;
// use libseccomp::{ScmpAction, ScmpArch, ScmpCompareOp};
use crate::bindings::*;
/// Comparison to perform wh... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
firecracker-microvm/firecracker | https://github.com/firecracker-microvm/firecracker/blob/f0691f8253d4bde225b9f70ecabf39b7ad796935/src/seccompiler/src/bin.rs | src/seccompiler/src/bin.rs | // Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use clap::Parser;
use seccompiler::{CompilationError, compile_bpf};
const DEFAULT_OUTPUT_FILENAME: &str = "seccomp_binary_filter.out";
#[derive(Debug, Parser)]
#[command(version = format!("v{}", env!("CA... | rust | Apache-2.0 | f0691f8253d4bde225b9f70ecabf39b7ad796935 | 2026-01-04T15:33:15.697747Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/lib.rs | tests/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
| rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/node_compat/test_runner.rs | tests/node_compat/test_runner.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use test_util as util;
use util::deno_config_path;
#[test]
fn node_compat_tests() {
let _server = util::http_server();
let mut deno = util::deno_cmd()
.current_dir(util::root_path())
.envs(util::env_vars_for_npm_tests())
.arg("test")
.arg("--c... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/test_macro/lib.rs | tests/util/test_macro/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use proc_macro::TokenStream;
use quote::ToTokens;
use quote::quote;
use syn::ItemFn;
use syn::Meta;
use syn::ReturnType;
use syn::Token;
use syn::parse::Parser;
use syn::parse_macro_input;
use syn::punctuated::Punctuated;
#[derive(Default)]
struct TestAttributes {... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/integration_tests_runner.rs | tests/util/server/integration_tests_runner.rs | // Copyright 2018-2025 the Deno authors. MIT license.
pub fn main() {
// this file exists to cause the executable to be built when running cargo test
}
| rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/wildcard.rs | tests/util/server/src/wildcard.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use crate::colors;
pub enum WildcardMatchResult {
Success,
Fail(String),
}
impl WildcardMatchResult {
pub fn is_success(&self) -> bool {
matches!(self, WildcardMatchResult::Success)
}
}
pub fn wildcard_match_detailed(
pattern: &str,
text: &str,
)... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/test_server.rs | tests/util/server/src/test_server.rs | // Copyright 2018-2025 the Deno authors. MIT license.
#![allow(clippy::print_stdout)]
#![allow(clippy::print_stderr)]
fn main() {
rustls::crypto::aws_lc_rs::default_provider()
.install_default()
.unwrap();
setup_panic_hook();
test_server::servers::run_all_servers();
}
fn setup_panic_hook() {
// Tokio... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/lib.rs | tests/util/server/src/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::env;
use std::io::Write;
use std::path::PathBuf;
use std::process::Child;
use std::process::Command;
use std::process::Output;
use std::process::Stdio;
use std::result::Result;
use futures::FutureExt;
use futures::Stream;
use futures::StreamExt;
use once_... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/fs.rs | tests/util/server/src/fs.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::collections::HashSet;
use std::ffi::OsStr;
use std::fs;
use std::fs::OpenOptions;
use std::io::Write;
use std::path::Path;
use std::path::PathBuf;
use std::process::Command;
use std::str::FromStr;
use std::sync::Arc;
use anyhow::Cont... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/spawn.rs | tests/util/server/src/spawn.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::convert::Infallible;
use anyhow::Error;
/// For unix targets, we just replace our current process with the desired cargo process.
#[cfg(unix)]
pub fn exec_replace_inner(
cmd: &str,
args: &[&str],
) -> Result<Infallible, Error> {
use std::ffi::CStr;
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/lsp.rs | tests/util/server/src/lsp.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::collections::HashMap;
use std::ffi::OsStr;
use std::ffi::OsString;
use std::io;
use std::io::BufRead;
use std::io::BufReader;
use std::io::Write;
use std::path::Path;
use std::process::Child;
use std::process::ChildStdin;
use std::process::ChildStdout;
use... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/builders.rs | tests/util/server/src/builders.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::collections::HashMap;
use std::collections::HashSet;
use std::ffi::OsStr;
use std::ffi::OsString;
use std::io::BufRead;
use std::io::BufReader;
use std::io::Read;
use std::io::Write;
use std::ops::Deref;
use std::ops::DerefMut;
use ... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/macros.rs | tests/util/server/src/macros.rs | // Copyright 2018-2025 the Deno authors. MIT license.
#[macro_export]
// https://stackoverflow.com/questions/38088067/equivalent-of-func-or-function-in-rust
macro_rules! function {
() => {{
fn f() {}
fn type_name_of<T>(_: T) -> &'static str {
::std::any::type_name::<T>()
}
let name = type_name_... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/pty.rs | tests/util/server/src/pty.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::collections::HashMap;
use std::collections::HashSet;
use std::io::Read;
use std::io::Write;
use std::path::Path;
use std::time::Duration;
use std::time::Instant;
use crate::IS_CI;
use crate::eprintln;
use crate::strip_ansi_codes;
co... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/semaphore.rs | tests/util/server/src/semaphore.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use parking_lot::Condvar;
use parking_lot::Mutex;
struct Permits {
max: usize,
used: usize,
}
pub struct Permit<'a>(&'a Semaphore);
impl<'a> Drop for Permit<'a> {
fn drop(&mut self) {
let mut permits = self.0.permits.lock();
if permits.used == 0 {
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/npm.rs | tests/util/server/src/npm.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::collections::HashMap;
use std::fs;
use std::path::Path;
use anyhow::Context;
use anyhow::Result;
use base64::Engine;
use base64::prelude::BASE64_STANDARD;
use flate2::Compression;
use flate2::write::GzEncoder;
use once_cell::sync::Lazy;
use parking_lot::M... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/https.rs | tests/util/server/src/https.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::io;
use std::num::NonZeroUsize;
use std::result::Result;
use std::sync::Arc;
use anyhow::anyhow;
use futures::Stream;
use futures::StreamExt;
use rustls_tokio_stream::TlsStream;
use rustls_tokio_stream::rustls;
use rustls_tokio_stream::rustls::pki_types::C... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/test_runner.rs | tests/util/server/src/test_runner.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::collections::HashMap;
use std::io::IsTerminal;
use std::io::Write;
use std::num::NonZeroUsize;
use std::sync::Arc;
use std::sync::mpsc::RecvTimeoutError;
use std::sync::mpsc::channel;
use std::time::Duration;
use std::time::Instant;
use console_static_tex... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/assertions.rs | tests/util/server/src/assertions.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::io::Write;
use crate::colors;
#[macro_export]
macro_rules! assert_starts_with {
($string:expr, $($test:expr),+) => {
let string = $string; // This might be a function call or something
if !($(string.starts_with($test))||+) {
panic!("{:?} ... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/parsers.rs | tests/util/server/src/parsers.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::collections::HashMap;
use lazy_regex::Lazy;
use regex::Regex;
use serde::Serialize;
pub struct WrkOutput {
pub latency: f64,
pub requests: u64,
}
pub fn parse_wrk_output(output: &str) -> WrkOutput {
static REQUESTS_RX: Lazy<Regex> =
lazy_regex... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/print.rs | tests/util/server/src/print.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::io::Write;
use std::sync::Arc;
use std::thread::JoinHandle;
use parking_lot::Mutex;
thread_local! {
static OUTPUT_BUFFER: RefCell<Arc<Mutex<Option<Vec<u8>>>>> = RefCell::new(Arc::new(Mutex::new(None)));
}
/// Spawns a thread ma... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/servers/grpc.rs | tests/util/server/src/servers/grpc.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use futures::StreamExt;
use h2;
use hyper::header::HeaderName;
use hyper::header::HeaderValue;
use rustls_tokio_stream::TlsStream;
use tokio::net::TcpStream;
use tokio::task::LocalSet;
use super::SupportedHttpVersions;
use super::get_tcp_listener_stream;
use super... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/servers/socket_dev.rs | tests/util/server/src/servers/socket_dev.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::convert::Infallible;
use std::future::Future;
use std::net::SocketAddr;
use bytes::Bytes;
use futures::FutureExt;
use futures::future::LocalBoxFuture;
use http_body_util::combinators::UnsyncBoxBody;
use hyper::Request;
use hyper::Response;
use hyper::Stat... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/servers/nodejs_org_mirror.rs | tests/util/server/src/servers/nodejs_org_mirror.rs | // Copyright 2018-2025 the Deno authors. MIT license.
//! Server for NodeJS header tarballs, used by `node-gyp` in tests to download headers
//!
//! Loads from `testdata/assets`, if we update our node version in `process.versions` we'll need to
//! update the header tarball there.
#![allow(clippy::print_stderr)]
use... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/servers/npm_registry.rs | tests/util/server/src/servers/npm_registry.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::collections::HashMap;
use std::convert::Infallible;
use std::future::Future;
use std::net::Ipv6Addr;
use std::net::SocketAddr;
use std::net::SocketAddrV6;
use std::path::PathBuf;
use base64::Engine;
use base64::prelude::BASE64_STANDARD;
use bytes::Bytes;
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/servers/jsr_registry.rs | tests/util/server/src/servers/jsr_registry.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::collections::BTreeMap;
use std::collections::HashMap;
use std::convert::Infallible;
use std::net::SocketAddr;
use std::path::Path;
use std::sync::Mutex;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD_NO_PAD;
use bytes::Bytes;
use h... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/servers/mod.rs | tests/util/server/src/servers/mod.rs | // Copyright 2018-2025 the Deno authors. MIT license.
// Usage: provide a port as argument to run hyper_hello benchmark server
// otherwise this starts multiple servers on many ports for test endpoints.
use std::collections::HashMap;
use std::convert::Infallible;
use std::env;
use std::net::SocketAddr;
use std::result... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/servers/ws.rs | tests/util/server/src/servers/ws.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::future::Future;
use std::future::poll_fn;
use std::pin::Pin;
use std::result::Result;
use anyhow::anyhow;
use bytes::Bytes;
use fastwebsockets::FragmentCollector;
use fastwebsockets::Frame;
use fastwebsockets::OpCode;
use fastwebsockets::Role;
use fastweb... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/util/server/src/servers/hyper_utils.rs | tests/util/server/src/servers/hyper_utils.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::convert::Infallible;
use std::future::Future;
use std::io;
use std::net::SocketAddr;
use std::pin::Pin;
use std::result::Result;
use bytes::Bytes;
use futures::FutureExt;
use futures::Stream;
use futures::StreamExt;
use http;
use http::Request;
use http::... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/pm_tests.rs | tests/integration/pm_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use serde_json::json;
use test_util::TestContextBuilder;
use test_util::assert_contains;
use test_util::env_vars_for_jsr_npm_tests;
use test_util::pty::Pty;
use test_util::test;
#[test]
fn add_basic() {
let starting_deno_json = json!({
"name": "@foo/bar",
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/check_tests.rs | tests/integration/check_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use deno_lockfile::NewLockfileOptions;
use deno_lockfile::NpmPackageInfoProvider;
use deno_semver::jsr::JsrDepPackageReq;
use test_util as util;
use util::TestContext;
use util::TestContextBuilder;
use util::println;
use util::test;
#[test]
fn cache_switching_conf... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/compile_tests.rs | tests/integration/compile_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use test_util as util;
use test_util::eprintln;
use test_util::test;
use util::TestContext;
use util::TestContextBuilder;
use util::assert_not_contains;
use util::testdata_path;
#[test]
fn compile_basic() {
let context = TestContextBuilder::new().build();
let ... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/flags_tests.rs | tests/integration/flags_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use test_util as util;
use test_util::test;
use util::assert_contains;
#[test]
fn help_output() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("--help")
.run();
let stdout = output.combined_output();
let subcommand_desc... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/npm_tests.rs | tests/integration/npm_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use pretty_assertions::assert_eq;
use serde_json::Value;
use serde_json::json;
use test_util as util;
use test_util::eprintln;
use test_util::itest;
use test_util::test;
use url::Url;
use util::TestContextBuilder;
use util::assert_contains;
use util::env_vars_for_n... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/upgrade_tests.rs | tests/integration/upgrade_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::process::Command;
use std::process::Stdio;
use std::time::Instant;
use test_util as util;
use util::TestContext;
use util::TestContextBuilder;
use util::assert_starts_with;
use util::test;
#[test(flaky)]
fn upgrade_invalid_lockfile() {
let context = up... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/repl_tests.rs | tests/integration/repl_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use test_util as util;
use test_util::test;
use util::TempDir;
use util::TestContext;
use util::TestContextBuilder;
use util::assert_contains;
use util::assert_ends_with;
use util::assert_not_contains;
#[test(flaky)]
fn pty_multiline() {
util::with_pty(&["repl"]... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/jupyter_tests.rs | tests/integration/jupyter_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::process::Output;
use std::sync::Arc;
use std::time::Duration;
use anyhow::Result;
use bytes::Bytes;
use chrono::DateTime;
use chrono::Utc;
use serde::Deserialize;
use serde::Serialize;
use serde_json::Value;
use serde_json::json;
use test_util::DenoChild;... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/watcher_tests.rs | tests/integration/watcher_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use test_util as util;
use test_util::TempDir;
use test_util::assert_contains;
use test_util::env_vars_for_npm_tests;
use test_util::eprintln;
use test_util::http_server;
use test_util::test;
use tokio::io::AsyncBufReadExt;
use util::DenoChild;
use util::assert_not... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/inspector_tests.rs | tests/integration/inspector_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::io::BufRead;
use std::process::ChildStderr;
use std::time::Duration;
use anyhow::Error as AnyError;
use anyhow::anyhow;
use bytes::Bytes;
use fastwebsockets::FragmentCollector;
use fastwebsockets::Frame;
use fastwebsockets::WebSocket;
use hyper::Request;
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/lsp_tests.rs | tests/integration/lsp_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::fs;
use pretty_assertions::assert_eq;
use serde::Deserialize;
use serde::Serialize;
use serde_json::Value;
use serde_json::json;
use test_util::TestContextBuilder;
use test_util::assert_starts_with;
use test_util::assertions::assert_json_subset;
use test_... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/eval_tests.rs | tests/integration/eval_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use test_util as util;
use test_util::test;
// Make sure that snapshot flags don't affect runtime.
#[test]
fn eval_randomness() {
let mut numbers = Vec::with_capacity(10);
for _ in 0..10 {
let output = util::deno_cmd()
.arg("eval")
.arg("-p")
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/coverage_tests.rs | tests/integration/coverage_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use test_util as util;
use util::PathRef;
use util::TempDir;
use util::TestContext;
use util::TestContextBuilder;
use util::assert_contains;
use util::assert_starts_with;
use util::env_vars_for_npm_tests;
use util::eprintln;
use util::test;
#[test]
fn branch() {
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/serve_tests.rs | tests/integration/serve_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::collections::HashMap;
use std::io::BufRead;
use std::io::BufReader;
use std::io::Read;
use std::time::Duration;
use pretty_assertions::assert_eq;
use regex::Regex;
use reqwest::RequestBuilder;
use test_util as util;
use test_util::... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/test_tests.rs | tests/integration/test_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use test_util::TestContext;
use test_util::TestContextBuilder;
use test_util::assert_contains;
use test_util::assert_not_contains;
use test_util::assertions::assert_wildcard_match;
use test_util::test;
use test_util::with_pty;
#[test]
fn junit_path() {
let conte... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/tests/integration/publish_tests.rs | tests/integration/publish_tests.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::process::Command;
use serde_json::json;
use test_util::TestContextBuilder;
use test_util::assert_contains;
use test_util::assert_not_contains;
use test_util::env_vars_for_jsr_provenance_tests;
use test_util::env_vars_for_jsr_tests;
use test_util::env_vars... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.