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 |
|---|---|---|---|---|---|---|---|---|
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/build.rs | ext/node/build.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::env;
fn main() {
println!("cargo:rustc-env=TARGET={}", env::var("TARGET").unwrap());
}
| rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/vm.rs | ext/node/ops/vm.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::rc::Rc;
use std::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering;
use std::time::Duration;
use deno_core::JsBuffer;
use deno_core::op2;
use deno_core::serde_v8;
use deno_core::v8;
use deno_core::v8::MapFnTo;
use crate::create_host_defined_optio... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/blocklist.rs | ext/node/ops/blocklist.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::collections::HashSet;
use std::net::IpAddr;
use std::net::Ipv4Addr;
use std::net::Ipv6Addr;
use std::net::SocketAddr;
use deno_core::OpState;
use deno_core::op2;
use ipnetwork::IpNetwork;
use ipnetwork::Ipv4Network;
use ipnetwork::... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/tls.rs | ext/node/ops/tls.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::collections::VecDeque;
use std::future::Future;
use std::io::Error;
use std::io::ErrorKind;
use std::num::NonZeroUsize;
use std::pin::Pin;
use std::rc::Rc;
use std::sync::Arc;
use std::sync::Mutex;
use std::sync... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/handle_wrap.rs | ext/node/ops/handle_wrap.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::Cell;
use std::cell::RefCell;
use std::rc::Rc;
use deno_core::GarbageCollected;
use deno_core::OpState;
use deno_core::ResourceId;
use deno_core::error::ResourceError;
use deno_core::op2;
use deno_core::v8;
pub struct AsyncId(i64);
impl Default fo... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/process.rs | ext/node/ops/process.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use deno_core::OpState;
use deno_core::op2;
use deno_core::v8;
use deno_permissions::PermissionCheckError;
use deno_permissions::PermissionsContainer;
#[cfg(unix)]
use nix::unistd::Gid;
#[cfg(unix)]
use nix::unistd::Group;
#[cfg(unix)]
use nix::unistd::Uid;
#[cfg(u... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/http.rs | ext/node/ops/http.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::cmp::min;
use std::fmt::Debug;
use std::future::Future;
use std::pin::Pin;
use std::rc::Rc;
use std::task::Context;
use std::task::Poll;
use bytes::Bytes;
use deno_core::AsyncRefCell;
use deno_core::AsyncResul... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/idna.rs | ext/node/ops/idna.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use deno_core::op2;
// map_domain, to_ascii and to_unicode are based on the punycode implementation in node.js
// https://github.com/nodejs/node/blob/73025c4dec042e344eeea7912ed39f7b7c4a3991/lib/punycode.js
const PUNY_PREFIX: &str = "xn--";... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/fs.rs | ext/node/ops/fs.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::path::Path;
use std::path::PathBuf;
use std::rc::Rc;
use deno_core::OpState;
use deno_core::ResourceId;
use deno_core::op2;
use deno_core::unsync::spawn_blocking;
use deno_fs::FileSystemRc;
use deno_fs::OpenOp... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/perf_hooks.rs | ext/node/ops/perf_hooks.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::Cell;
use std::cell::RefCell;
use deno_core::GarbageCollected;
use deno_core::op2;
#[derive(Debug, thiserror::Error, deno_error::JsError)]
pub enum PerfHooksError {
#[class(generic)]
#[error(transparent)]
TokioEld(#[from] tokio_eld::Error),
}... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/v8.rs | ext/node/ops/v8.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::ptr::NonNull;
use deno_core::FastString;
use deno_core::GarbageCollected;
use deno_core::ToJsBuffer;
use deno_core::op2;
use deno_core::v8;
use deno_error::JsErrorBox;
use v8::ValueDeserializerHelper;
use v8::ValueSerializerHelper;
#[op2(fast)]
pub fn op... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/dns.rs | ext/node/ops/dns.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::net::IpAddr;
use std::net::SocketAddr;
use std::rc::Rc;
use std::str::FromStr;
#[cfg(target_family = "windows")]
use std::sync::OnceLock;
use deno_core::OpState;
use deno_core::op2;
use deno_core::unsync::spawn_blocking;
use deno_e... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/worker_threads.rs | ext/node/ops/worker_threads.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::path::Path;
use std::path::PathBuf;
use deno_core::OpState;
use deno_core::op2;
use deno_core::url::Url;
use deno_error::JsErrorBox;
use deno_permissions::PermissionsContainer;
use crate::ExtNodeSys;
use crate::NodeRequireLoaderRc;
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/util.rs | ext/node/ops/util.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::path::Path;
use deno_core::OpState;
use deno_core::ResourceHandle;
use deno_core::ResourceHandleFd;
use deno_core::op2;
use deno_core::v8;
use deno_error::JsErrorBox;
use node_resolver::InNpmPackageChecker;
use node_resolver::NpmPackageFolderResolver;
us... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/mod.rs | ext/node/ops/mod.rs | // Copyright 2018-2025 the Deno authors. MIT license.
pub mod blocklist;
pub mod buffer;
pub mod constant;
pub mod crypto;
pub mod dns;
pub mod fs;
pub mod handle_wrap;
pub mod http;
pub mod http2;
pub mod idna;
pub mod inspector;
pub mod ipc;
pub mod os;
pub mod perf_hooks;
pub mod process;
pub mod require;
pub mod s... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/constant.rs | ext/node/ops/constant.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use deno_core::op2;
use serde::Serialize;
#[derive(Debug, Serialize)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
/// https://github.com/nodejs/node/blob/ce4a16f50ae289bf6c7834b592ca47ad4634dd79/src/node_constants.cc#L1044-L1225
pub struct FsConstants {
uv_fs_... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/require.rs | ext/node/ops/require.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::path::Path;
use std::path::PathBuf;
use std::rc::Rc;
use boxed_error::Boxed;
use deno_core::FastString;
use deno_core::JsRuntimeInspector;
use deno_core::OpState;
use deno_core::op2;
use deno_core::url::Url;
u... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/winerror.rs | ext/node/ops/winerror.rs | // Copyright 2018-2025 the Deno authors. MIT license.
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/http2.rs | ext/node/ops/http2.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::collections::HashMap;
use std::future::poll_fn;
use std::rc::Rc;
use std::task::Poll;
use bytes::Bytes;
use deno_core::AsyncRefCell;
use deno_core::BufView;
use deno_core::ByteString;
use deno_core::CancelFutu... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/buffer.rs | ext/node/ops/buffer.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use deno_core::op2;
use deno_core::v8;
use deno_error::JsErrorBox;
#[op2(fast)]
pub fn op_is_ascii(#[buffer] buf: &[u8]) -> bool {
buf.is_ascii()
}
#[op2(fast)]
pub fn op_is_utf8(#[buffer] buf: &[u8]) -> bool {
std::str::from_utf8(buf).is_ok()
}
#[op2]
#[buf... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/inspector.rs | ext/node/ops/inspector.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::rc::Rc;
use deno_core::GarbageCollected;
use deno_core::InspectorMsg;
use deno_core::InspectorSessionKind;
use deno_core::JsRuntimeInspector;
use deno_core::OpState;
use deno_core::op2;
use deno_core::v8;
use deno_error::JsErrorBox... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/ipc.rs | ext/node/ops/ipc.rs | // Copyright 2018-2025 the Deno authors. MIT license.
pub use impl_::*;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ChildIpcSerialization {
Json,
Advanced,
}
impl std::str::FromStr for ChildIpcSerialization {
type Err = deno_core::anyhow::Error;
fn from_str(s: &str) -> Result<Self, Self::Err>... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/zlib/stream.rs | ext/node/ops/zlib/stream.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::ffi::c_int;
use std::ops::Deref;
use std::ops::DerefMut;
use super::mode::Flush;
use super::mode::Mode;
pub struct StreamWrapper {
pub strm: zlib::z_stream,
}
impl Default for StreamWrapper {
fn default() -> Self {
Self {
strm: zlib::z_str... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/zlib/alloc.rs | ext/node/ops/zlib/alloc.rs | // Copyright 2018-2025 the Deno authors. MIT license.
// Workaround for https://github.com/rust-lang/libz-sys/issues/55
// See https://github.com/rust-lang/flate2-rs/blob/31fb07820345691352aaa64f367c1e482ad9cfdc/src/ffi/c.rs#L60
use std::alloc::Layout;
use std::alloc::{self};
use std::os::raw::c_void;
use std::ptr;
c... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/zlib/mod.rs | ext/node/ops/zlib/mod.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::rc::Rc;
use brotli::enc::StandardAlloc;
use brotli::enc::encode::BrotliEncoderDestroyInstance;
use brotli::enc::encode::BrotliEncoderOperation;
use brotli::enc::encode::BrotliEncoderStateStruct;
use brotli::ff... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/zlib/mode.rs | ext/node/ops/zlib/mode.rs | // Copyright 2018-2025 the Deno authors. MIT license.
#[derive(Debug, thiserror::Error, deno_error::JsError)]
#[class(generic)]
#[error("bad argument")]
pub struct ModeError;
macro_rules! repr_i32 {
($(#[$meta:meta])* $vis:vis enum $name:ident {
$($(#[$vmeta:meta])* $vname:ident $(= $val:expr)?,)*
}) =>... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/sqlite/session.rs | ext/node/ops/sqlite/session.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::Cell;
use std::cell::RefCell;
use std::ffi::c_void;
use std::rc::Weak;
use deno_core::FromV8;
use deno_core::GarbageCollected;
use deno_core::op2;
use deno_core::v8;
use deno_core::v8_static_strings;
use rusqlite::ffi;
use super::SqliteError;
use s... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/sqlite/database.rs | ext/node/ops/sqlite/database.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::Cell;
use std::cell::RefCell;
use std::ffi::CStr;
use std::ffi::CString;
use std::ffi::c_char;
use std::ffi::c_void;
use std::path::Path;
use std::ptr::NonNull;
use std::ptr::null;
use std::rc::Rc;
use deno_core::FromV8;
use de... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/sqlite/validators.rs | ext/node/ops/sqlite/validators.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use deno_core::v8;
#[derive(Debug, thiserror::Error, deno_error::JsError)]
#[property("code" = self.code())]
pub enum Error {
#[class(type)]
#[error("{0}")]
InvalidArgType(&'static str),
}
impl Error {
pub fn code(&self) -> ErrorCode {
match self {
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/sqlite/mod.rs | ext/node/ops/sqlite/mod.rs | // Copyright 2018-2025 the Deno authors. MIT license.
mod backup;
mod database;
mod session;
mod statement;
mod validators;
pub use backup::op_node_database_backup;
pub use database::DatabaseSync;
pub use session::Session;
pub use statement::StatementSync;
#[derive(Debug, thiserror::Error, deno_error::JsError)]
pub ... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/sqlite/backup.rs | ext/node/ops/sqlite/backup.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::ffi::c_int;
use std::rc::Rc;
use deno_core::OpState;
use deno_core::op2;
use deno_core::v8;
use deno_core::v8_static_strings;
use deno_permissions::OpenAccessKind;
use deno_permissions::PermissionsContainer;
u... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/sqlite/statement.rs | ext/node/ops/sqlite/statement.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::Cell;
use std::cell::RefCell;
use std::rc::Rc;
use std::rc::Weak;
use deno_core::GarbageCollected;
use deno_core::ToV8;
use deno_core::op2;
use deno_core::v8;
use deno_core::v8::GetPropertyNamesArgs;
use deno_core::v8_static_strings;
use rusqlite::f... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/os/mod.rs | ext/node/ops/os/mod.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::mem::MaybeUninit;
use deno_core::OpState;
use deno_core::op2;
use deno_permissions::PermissionCheckError;
use deno_permissions::PermissionsContainer;
use sys_traits::EnvHomeDir;
mod cpus;
pub mod priority;
#[derive(Debug, thiserror::Error, deno_error::J... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/os/priority.rs | ext/node/ops/os/priority.rs | // Copyright 2018-2025 the Deno authors. MIT license.
pub use impl_::*;
#[derive(Debug, thiserror::Error, deno_error::JsError)]
pub enum PriorityError {
#[class(inherit)]
#[error("{0}")]
Io(#[from] std::io::Error),
#[cfg(windows)]
#[class(type)]
#[error("Invalid priority")]
InvalidPriority,
}
#[cfg(uni... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/os/cpus.rs | ext/node/ops/os/cpus.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use deno_core::serde::Serialize;
#[derive(Debug, Default, Serialize, Clone)]
pub struct CpuTimes {
pub user: u64,
pub nice: u64,
pub sys: u64,
pub idle: u64,
pub irq: u64,
}
#[derive(Debug, Default, Serialize, Clone)]
pub struct CpuInfo {
pub model: S... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/primes.rs | ext/node/ops/crypto/primes.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::ops::Deref;
use num_bigint::BigInt;
use num_bigint_dig::RandPrime;
use num_integer::Integer;
use num_traits::One;
use num_traits::Zero;
use rand::Rng;
#[derive(Clone)]
pub struct Prime(pub num_bigint_dig::BigUint);
impl Prime {
pub fn generate(n: usiz... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/cipher.rs | ext/node/ops/crypto/cipher.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::rc::Rc;
use aes::cipher::BlockDecryptMut;
use aes::cipher::BlockEncryptMut;
use aes::cipher::KeyIvInit;
use aes::cipher::KeySizeUser;
use aes::cipher::StreamCipher;
use aes::cipher::block_padding::Pkcs7;
use d... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/digest.rs | ext/node/ops/crypto/digest.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::rc::Rc;
use deno_core::GarbageCollected;
use deno_core::op2;
use digest::Digest;
use digest::DynDigest;
use digest::ExtendableOutput;
use digest::Update;
mod ring_sha2;
pub struct Hasher {
pub hash: Rc<RefCell<Option<Hash>>>,
}
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/sign.rs | ext/node/ops/crypto/sign.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use core::ops::Add;
use ecdsa::der::MaxOverhead;
use ecdsa::der::MaxSize;
use elliptic_curve::FieldBytesSize;
use elliptic_curve::generic_array::ArrayLength;
use rand::rngs::OsRng;
use rsa::signature::hazmat::PrehashSigner as _;
use rsa::signature::hazmat::PrehashV... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/md5_sha1.rs | ext/node/ops/crypto/md5_sha1.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use core::fmt;
use digest::HashMarker;
use digest::Output;
use digest::Reset;
use digest::core_api::AlgorithmName;
use digest::core_api::BlockSizeUser;
use digest::core_api::Buffer;
use digest::core_api::BufferKindUser;
use digest::core_api::CoreWrapper;
use digest... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/dh.rs | ext/node/ops/crypto/dh.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use num_bigint_dig::BigUint;
use num_bigint_dig::RandBigInt;
use num_traits::FromPrimitive;
use super::primes::Prime;
#[derive(Clone)]
pub struct PublicKey(BigUint);
impl PublicKey {
pub fn from_bytes(bytes: &[u8]) -> Self {
let public_key = BigUint::from_... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/mod.rs | ext/node/ops/crypto/mod.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::future::Future;
use std::rc::Rc;
use aws_lc_rs::signature::Ed25519KeyPair;
use deno_core::JsBuffer;
use deno_core::OpState;
use deno_core::StringOrBuffer;
use deno_core::ToJsBuffer;
use deno_core::op2;
use deno_core::unsync::spawn_blocking;
use deno_error:... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/pkcs3.rs | ext/node/ops/crypto/pkcs3.rs | // Copyright 2018-2025 the Deno authors. MIT license.
//
// PKCS #3: Diffie-Hellman Key Agreement Standard
use der::Sequence;
use spki::der;
use spki::der::asn1;
// The parameters fields associated with OID dhKeyAgreement
//
// DHParameter ::= SEQUENCE {
// prime INTEGER, -- p
// base INTEGER, -- g
// privateValue... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/x509.rs | ext/node/ops/crypto/x509.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::ops::Deref;
use deno_core::ToJsBuffer;
use deno_core::op2;
use digest::Digest;
use x509_parser::der_parser::asn1_rs::Any;
use x509_parser::der_parser::asn1_rs::Tag;
use x509_parser::der_parser::oid::Oid;
pub use x509_parser::error::X509Error;
use x509_par... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/keys.rs | ext/node/ops/crypto/keys.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use base64::Engine;
use deno_core::GarbageCollected;
use deno_core::ToJsBuffer;
use deno_core::op2;
use deno_core::serde_v8::BigInt as V8BigInt;
use deno_core::unsync::spawn_blocking;
use deno_error::JsErrorBox;
use ed... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/node/ops/crypto/digest/ring_sha2.rs | ext/node/ops/crypto/digest/ring_sha2.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::marker::PhantomData;
use digest::generic_array::ArrayLength;
pub trait RingDigestAlgo {
fn algorithm() -> &'static aws_lc_rs::digest::Algorithm;
type OutputSize: ArrayLength<u8> + 'static;
}
pub struct RingDigest<Algo: RingDigestAlgo> {
context: a... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/napi/lib.rs | ext/napi/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(clippy::undocumented_unsafe_blocks)]
#![deny(clippy::missing_safety_doc)]
//! Symbols to be exported are now defined in this JSON file.
//! The `#[napi_sym]` macro checks for missing entrie... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/napi/value.rs | ext/napi/value.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::mem::transmute;
use std::ops::Deref;
use std::os::raw::c_void;
use std::ptr::NonNull;
use deno_core::v8;
/// An FFI-opaque, nullable wrapper around v8::Local<v8::Value>.
/// rusty_v8 Local handle cannot be empty but napi_value can be.
#[repr(transparent)... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/napi/function.rs | ext/napi/function.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use crate::*;
#[repr(C)]
#[derive(Debug)]
pub struct CallbackInfo {
pub env: *mut Env,
pub cb: napi_callback,
pub data: *mut c_void,
pub args: *const c_void,
}
impl CallbackInfo {
#[inline]
pub fn new_raw(
env: *mut Env,
cb: napi_callback,
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/napi/js_native_api.rs | ext/napi/js_native_api.rs | // Copyright 2018-2025 the Deno authors. MIT license.
#![allow(non_upper_case_globals)]
#![deny(unsafe_op_in_unsafe_fn)]
const NAPI_VERSION: u32 = 9;
use std::ptr::NonNull;
use libc::INT_MAX;
use napi_sym::napi_sym;
use super::util::check_new_from_utf8;
use super::util::check_new_from_utf8_len;
use super::util::ge... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/napi/build.rs | ext/napi/build.rs | // Copyright 2018-2025 the Deno authors. MIT license.
fn main() {
let symbols_file_name = match std::env::consts::OS {
"android" | "freebsd" | "openbsd" => {
"generated_symbol_exports_list_linux.def".to_string()
}
os => format!("generated_symbol_exports_list_{}.def", os),
};
let symbols_path = ... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/napi/util.rs | ext/napi/util.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use libc::INT_MAX;
use crate::*;
#[repr(transparent)]
pub(crate) struct SendPtr<T>(pub *const T);
impl<T> SendPtr<T> {
// silly function to get around `clippy::redundant_locals`
pub fn take(self) -> *const T {
self.0
}
}
unsafe impl<T> Send for SendPtr... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/napi/node_api.rs | ext/napi/node_api.rs | // Copyright 2018-2025 the Deno authors. MIT license.
#![deny(unsafe_op_in_unsafe_fn)]
use std::sync::Arc;
use std::sync::atomic::AtomicBool;
use std::sync::atomic::AtomicU8;
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
use deno_core::V8CrossThreadTaskSpawner;
use deno_core::parking_lot::Cond... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/napi/uv.rs | ext/napi/uv.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::mem::MaybeUninit;
use std::ptr::addr_of_mut;
use deno_core::parking_lot::Mutex;
use crate::*;
fn assert_ok(res: c_int) -> c_int {
if res != 0 {
log::error!("bad result in uv polyfill: {res}");
// don't panic because that might unwind into
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/napi/sym/lib.rs | ext/napi/sym/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use proc_macro::TokenStream;
use quote::quote;
use serde::Deserialize;
static NAPI_EXPORTS: &str = include_str!("./symbol_exports.json");
#[derive(Deserialize)]
struct SymbolExports {
pub symbols: Vec<String>,
}
#[proc_macro_attribute]
pub fn napi_sym(_attr: T... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/cron/local.rs | ext/cron/local.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::OnceCell;
use std::cell::RefCell;
use std::collections::BTreeMap;
use std::collections::HashMap;
use std::env;
use std::rc::Rc;
use std::rc::Weak;
use std::sync::Arc;
use async_trait::async_trait;
use deno_core::futures;
use deno_core::futures::Futu... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/cron/lib.rs | ext/cron/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
mod interface;
pub mod local;
use std::borrow::Cow;
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::Arc;
use deno_core::OpState;
use deno_core::Resource;
use deno_core::ResourceId;
use deno_core::op2;
use deno_error::JsErrorBox;
use deno_error::JsErrorCla... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/cron/interface.rs | ext/cron/interface.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use async_trait::async_trait;
use crate::CronError;
pub trait CronHandler {
type EH: CronHandle + 'static;
fn create(&self, spec: CronSpec) -> Result<Self::EH, CronError>;
}
#[async_trait(?Send)]
pub trait CronHandle {
async fn next(&self, prev_success: b... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/console/lib.rs | ext/console/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/ext/net/resolve_addr.rs | ext/net/resolve_addr.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::net::SocketAddr;
use std::net::ToSocketAddrs;
use tokio::net::lookup_host;
/// Resolve network address *asynchronously*.
pub async fn resolve_addr(
hostname: &str,
port: u16,
) -> Result<impl Iterator<Item = SocketAddr> + '_, std::io::Error> {
let ... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/lib.rs | ext/net/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
pub mod io;
pub mod ops;
pub mod ops_tls;
#[cfg(unix)]
pub mod ops_unix;
#[cfg(windows)]
mod ops_win_pipe;
mod quic;
pub mod raw;
pub mod resolve_addr;
pub mod tcp;
pub mod tunnel;
#[cfg(windows)]
mod win_pipe;
use std::sync::Arc;
use deno_core::OpState;
use deno... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/io.rs | ext/net/io.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::rc::Rc;
use deno_core::AsyncMutFuture;
use deno_core::AsyncRefCell;
use deno_core::AsyncResult;
use deno_core::CancelHandle;
use deno_core::CancelTryFuture;
use deno_core::RcRef;
use deno_core::Resource;
use deno_core::futures::TryFu... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/ops_win_pipe.rs | ext/net/ops_win_pipe.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::path::Path;
use std::rc::Rc;
use deno_core::OpState;
use deno_core::ResourceId;
use deno_core::op2;
use deno_permissions::OpenAccessKind;
use deno_permissions::PermissionsContainer;
use tokio::net::windows::na... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/raw.rs | ext/net/raw.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::rc::Rc;
use deno_core::AsyncRefCell;
use deno_core::CancelHandle;
use deno_core::Resource;
use deno_core::ResourceId;
use deno_core::ResourceTable;
use deno_core::error::ResourceError;
use deno_error::JsErrorBox;
use crate::io::TcpS... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/tcp.rs | ext/net/tcp.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::collections::HashMap;
use std::net::SocketAddr;
use std::sync::Arc;
use socket2::Domain;
use socket2::Protocol;
use socket2::Type;
/// Our per-process `Connections`. We can use this to find an existent listener for
/// a given local address and clone its ... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/ops_unix.rs | ext/net/ops_unix.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::path::Path;
use std::path::PathBuf;
use std::rc::Rc;
use deno_core::AsyncRefCell;
use deno_core::CancelHandle;
use deno_core::CancelTryFuture;
use deno_core::JsBuffer;
use deno_core::OpState;
use deno_core::Rc... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/quic.rs | ext/net/quic.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::future::Future;
use std::net::IpAddr;
use std::net::Ipv6Addr;
use std::net::SocketAddr;
use std::net::SocketAddrV4;
use std::net::SocketAddrV6;
use std::pin::pin;
use std::rc::Rc;
use std::sync::Arc;
use std::s... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/ops_tls.rs | ext/net/ops_tls.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::convert::From;
use std::fs::File;
use std::io::BufReader;
use std::io::ErrorKind;
use std::io::Read;
use std::net::SocketAddr;
use std::num::NonZeroUsize;
use std::path::Path;
use std::rc::Rc;
use std::sync::Ar... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/win_pipe.rs | ext/net/win_pipe.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::ffi::OsStr;
use std::io;
use std::rc::Rc;
use deno_core::AsyncRefCell;
use deno_core::AsyncResult;
use deno_core::CancelHandle;
use deno_core::CancelTryFuture;
use deno_core::RcRef;
use deno_core::Resource;
use tokio::io::AsyncReadEx... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/ops.rs | ext/net/ops.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::net::Ipv4Addr;
use std::net::Ipv6Addr;
use std::net::SocketAddr;
use std::rc::Rc;
use std::str::FromStr;
use deno_core::AsyncRefCell;
use deno_core::ByteString;
use deno_core::CancelFuture;
use deno_core::Canc... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/net/tunnel.rs | ext/net/tunnel.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::collections::HashMap;
use std::net::SocketAddr;
use std::rc::Rc;
use std::sync::OnceLock;
use std::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering;
use deno_core::AsyncMutFuture;
use deno_core::AsyncRefCell;
use deno_core::AsyncResult;
use deno_... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/url/lib.rs | ext/url/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/ext/canvas/image_ops.rs | ext/canvas/image_ops.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use bytemuck::cast_slice;
use bytemuck::cast_slice_mut;
use image::ColorType;
use image::DynamicImage;
use image::GenericImageView;
use image::ImageBuffer;
use image::Luma;
use image::LumaA;
use image::Pixel;
use image::Primitive;
use image::Rgb;
use image::Rgba;
u... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/canvas/lib.rs | ext/canvas/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
mod image_ops;
mod op_create_image_bitmap;
pub use image;
use image::ColorType;
use op_create_image_bitmap::op_create_image_bitmap;
#[derive(Debug, thiserror::Error, deno_error::JsError)]
pub enum CanvasError {
/// Image formats that is 32-bit depth are not supp... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/canvas/op_create_image_bitmap.rs | ext/canvas/op_create_image_bitmap.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::io::BufReader;
use std::io::Cursor;
use deno_core::JsBuffer;
use deno_core::ToJsBuffer;
use deno_core::op2;
// use image::codecs::webp::WebPDecoder;
use image::DynamicImage;
use image::ImageDecoder;
use image::RgbaImage;
use image::codecs::bmp::BmpDecoder... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/broadcast_channel/lib.rs | ext/broadcast_channel/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/ext/kv/config.rs | ext/kv/config.rs | // Copyright 2018-2025 the Deno authors. MIT license.
#[derive(Clone, Copy, Debug)]
pub struct KvConfig {
pub max_write_key_size_bytes: usize,
pub max_read_key_size_bytes: usize,
pub max_value_size_bytes: usize,
pub max_read_ranges: usize,
pub max_read_entries: usize,
pub max_checks: usize,
pub max_mutat... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/kv/dynamic.rs | ext/kv/dynamic.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::rc::Rc;
use async_trait::async_trait;
use deno_core::OpState;
use deno_error::JsErrorBox;
use denokv_proto::CommitResult;
use denokv_proto::ReadRangeOutput;
use denokv_proto::WatchStream;
use crate::AtomicWrite;
use crate::Databas... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/kv/lib.rs | ext/kv/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
pub mod config;
pub mod dynamic;
mod interface;
pub mod remote;
pub mod sqlite;
use std::borrow::Cow;
use std::cell::RefCell;
use std::num::NonZeroU32;
use std::rc::Rc;
use std::sync::Arc;
use std::time::Duration;
use base64::Engine;
use base64::prelude::BASE64_U... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/kv/interface.rs | ext/kv/interface.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::rc::Rc;
use async_trait::async_trait;
use deno_core::OpState;
use deno_error::JsErrorBox;
use denokv_proto::Database;
#[async_trait(?Send)]
pub trait DatabaseHandler {
type DB: Database + 'static;
async fn open(
&self,
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/kv/remote.rs | ext/kv/remote.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::Arc;
use anyhow::Context;
use async_trait::async_trait;
use bytes::Bytes;
use deno_core::OpState;
use deno_core::futures::Stream;
use deno_error::JsErrorBox;
use deno_fetch::CreateHttpClientOptions;
use deno_... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/kv/sqlite.rs | ext/kv/sqlite.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::collections::HashMap;
use std::path::PathBuf;
use std::rc::Rc;
use std::sync::Arc;
use std::sync::Mutex;
use std::sync::OnceLock;
use async_trait::async_trait;
use deno_core::OpState;
use deno_core::unsync::sp... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/bundle/src/lib.rs | ext/bundle/src/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::Arc;
use async_trait::async_trait;
use deno_core::OpState;
use deno_core::error::AnyError;
use deno_core::op2;
use deno_error::JsErrorBox;
deno_core::extension!(
deno_bundle_runtime,
deps = [
deno_we... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/signals/lib.rs | ext/signals/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::collections::HashMap;
use std::sync::Mutex;
use std::sync::OnceLock;
use std::sync::atomic::AtomicU32;
use std::sync::atomic::Ordering;
use signal_hook::consts::*;
use tokio::sync::watch;
mod dict;
pub use dict::*;
#[cfg(windows)]
static SIGHUP: i32 = 1... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/signals/dict.rs | ext/signals/dict.rs | // Copyright 2018-2025 the Deno authors. MIT license.
#[cfg(target_os = "windows")]
#[derive(Debug, thiserror::Error)]
#[error(
"Windows only supports ctrl-c (SIGINT), ctrl-break (SIGBREAK), and ctrl-close (SIGUP), but got {0}"
)]
pub struct InvalidSignalStrError(pub String);
#[cfg(any(
target_os = "android",
t... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/os/sys_info.rs | ext/os/sys_info.rs | // Copyright 2018-2025 the Deno authors. MIT license.
#[cfg(target_family = "windows")]
use std::sync::Once;
type LoadAvg = (f64, f64, f64);
const DEFAULT_LOADAVG: LoadAvg = (0.0, 0.0, 0.0);
pub fn loadavg() -> LoadAvg {
#[cfg(any(target_os = "android", target_os = "linux"))]
{
use libc::SI_LOAD_SHIFT;
l... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/os/lib.rs | ext/os/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::collections::HashMap;
use std::env;
use std::ffi::OsString;
use std::ops::ControlFlow;
use std::sync::Arc;
use std::sync::atomic::AtomicI32;
use std::sync::atomic::Ordering;
use deno_core::OpState;
use deno_core::op2;
use deno_core::... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/os/ops/signal.rs | ext/os/ops/signal.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::rc::Rc;
use deno_core::AsyncRefCell;
use deno_core::OpState;
use deno_core::RcRef;
use deno_core::Resource;
use deno_core::ResourceId;
use deno_core::error::ResourceError;
use deno_core::op2;
#[derive(Debug, t... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/os/ops/mod.rs | ext/os/ops/mod.rs | // Copyright 2018-2025 the Deno authors. MIT license.
pub mod signal;
| rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/ffi/lib.rs | ext/ffi/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::mem::size_of;
use std::os::raw::c_char;
use std::os::raw::c_short;
mod call;
mod callback;
mod dlfcn;
mod ir;
mod repr;
mod r#static;
mod symbol;
mod turbocall;
pub use call::CallError;
use call::op_ffi_call_nonblocking;
use call::op_ffi_call_ptr;
use ca... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/ffi/call.rs | ext/ffi/call.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::cell::RefCell;
use std::ffi::c_void;
use std::future::Future;
use std::rc::Rc;
use deno_core::OpState;
use deno_core::ResourceId;
use deno_core::op2;
use deno_core::serde_json::Value;
use deno_core::serde_v8::BigInt as V8BigInt;
use deno_core::serde_v8::E... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/ffi/dlfcn.rs | ext/ffi/dlfcn.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::collections::HashMap;
use std::ffi::c_void;
use std::path::Path;
use std::rc::Rc;
use deno_core::GarbageCollected;
use deno_core::OpState;
use deno_core::Resource;
use deno_core::op2;
use deno_core::v8;
use de... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/ffi/callback.rs | ext/ffi/callback.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::ffi::c_void;
use std::future::Future;
use std::future::IntoFuture;
use std::pin::Pin;
use std::ptr;
use std::ptr::NonNull;
use std::rc::Rc;
use std::sync::atomic;
use std::sync::atomic::AtomicU32;
use std::task... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/ffi/static.rs | ext/ffi/static.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::ptr;
use deno_core::OpState;
use deno_core::ResourceId;
use deno_core::op2;
use deno_core::v8;
use crate::dlfcn::DynamicLibraryResource;
use crate::symbol::NativeType;
#[derive(Debug, thiserror::Error, deno_error::JsError)]
pub enum StaticError {
#[cl... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/ffi/ir.rs | ext/ffi/ir.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::ffi::c_void;
use std::ptr;
use deno_core::v8;
use libffi::middle::Arg;
use crate::symbol::NativeType;
#[derive(Debug, thiserror::Error, deno_error::JsError)]
#[class(type)]
pub enum IRError {
#[error("Invalid FFI u8 type, expected boolean")]
Invalid... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/ffi/repr.rs | ext/ffi/repr.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::ffi::CStr;
use std::ffi::c_char;
use std::ffi::c_void;
use std::ptr;
use deno_core::OpState;
use deno_core::op2;
use deno_core::v8;
use deno_permissions::PermissionsContainer;
#[derive(Debug, thiserror::Error, deno_error::JsError)]
#[class(type)]
pub enu... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/ffi/symbol.rs | ext/ffi/symbol.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use deno_error::JsErrorBox;
/// Defines the accepted types that can be used as
/// parameters and return values in FFI.
#[derive(Clone, Debug, serde::Deserialize, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum NativeType {
Void,
Bool,
U8,
I8,
... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/ffi/turbocall.rs | ext/ffi/turbocall.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::ffi::c_void;
use std::sync::LazyLock;
use deno_core::OpState;
use deno_core::op2;
use deno_core::v8;
use deno_core::v8::fast_api;
use crate::NativeType;
use crate::Symbol;
use crate::dlfcn::FunctionData;
#[derive(Debug, thiserror::Error, deno_error::JsE... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | false |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/io/lib.rs | ext/io/lib.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::borrow::Cow;
use std::cell::RefCell;
use std::fs::File as StdFile;
use std::future::Future;
use std::io;
use std::io::ErrorKind;
use std::io::Read;
use std::io::Seek;
use std::io::Write;
#[cfg(unix)]
use std::os::fd::AsRawFd;
#[cfg(unix)]
use std::os::unix... | rust | MIT | 7222e85d435b977de1ab810db067b86f29e6444f | 2026-01-04T15:31:58.521149Z | true |
denoland/deno | https://github.com/denoland/deno/blob/7222e85d435b977de1ab810db067b86f29e6444f/ext/io/bi_pipe.rs | ext/io/bi_pipe.rs | // Copyright 2018-2025 the Deno authors. MIT license.
use std::rc::Rc;
use deno_core::AsyncRefCell;
use deno_core::AsyncResult;
use deno_core::CancelHandle;
use deno_core::CancelTryFuture;
use deno_core::RcRef;
use tokio::io::AsyncReadExt;
use tokio::io::AsyncWriteExt;
pub type RawBiPipeHandle = super::RawIoHandle;
... | 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.