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 |
|---|---|---|---|---|---|---|---|---|
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/http_transport/reqwest_transport.rs | ic-agent/src/agent/http_transport/reqwest_transport.rs | //! This module has been deprecated in favor of builder methods on `AgentBuilder`.
#![allow(deprecated)]
pub use reqwest;
use std::sync::Arc;
use reqwest::Client;
use crate::{
agent::{
route_provider::{RoundRobinRouteProvider, RouteProvider},
AgentBuilder,
},
AgentError,
};
/// A legacy c... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/http_transport/mod.rs | ic-agent/src/agent/http_transport/mod.rs | //! This module has been deprecated in favor of builder methods on `AgentBuilder`.
#[deprecated(since = "0.38.0", note = "use the AgentBuilder methods")]
#[doc(hidden)]
pub mod reqwest_transport;
#[doc(hidden)]
#[allow(deprecated)]
pub use reqwest_transport::ReqwestTransport;
| rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/messages.rs | ic-agent/src/agent/route_provider/dynamic_routing/messages.rs | use crate::agent::route_provider::dynamic_routing::{health_check::HealthCheckStatus, node::Node};
/// Represents a message with fetched nodes.
#[derive(Debug, Clone)]
pub struct FetchedNodes {
/// The fetched nodes.
pub nodes: Vec<Node>,
}
/// Represents a message with the health state of a node.
pub struct N... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/node.rs | ic-agent/src/agent/route_provider/dynamic_routing/node.rs | use url::Url;
use crate::agent::ApiBoundaryNode;
/// Represents a node in the dynamic routing.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Node {
domain: String,
}
impl Node {
/// Creates a new `Node` instance from the domain name.
pub fn new(domain: impl Into<String>) -> Result<Self, url::Pa... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/type_aliases.rs | ic-agent/src/agent/route_provider/dynamic_routing/type_aliases.rs | use arc_swap::ArcSwap;
use std::sync::Arc;
/// A type alias for the sender end of a watch channel.
pub(super) type SenderWatch<T> = async_watch::Sender<Option<T>>;
/// A type alias for the receiver end of a watch channel.
pub(super) type ReceiverWatch<T> = async_watch::Receiver<Option<T>>;
/// A type alias for the s... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/test_utils.rs | ic-agent/src/agent/route_provider/dynamic_routing/test_utils.rs | use std::collections::{HashMap, HashSet};
use std::time::Duration;
use std::{fmt::Debug, hash::Hash, sync::Arc};
use arc_swap::ArcSwap;
use async_trait::async_trait;
use url::Url;
use crate::agent::route_provider::{
dynamic_routing::{
dynamic_route_provider::DynamicRouteProviderError,
health_check... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/dynamic_route_provider.rs | ic-agent/src/agent/route_provider/dynamic_routing/dynamic_route_provider.rs | //! An implementation of [`RouteProvider`] for dynamic generation of routing urls.
use std::{
sync::Arc,
time::{Duration, Instant},
};
use arc_swap::ArcSwap;
use candid::Principal;
use futures_util::FutureExt;
use stop_token::StopSource;
use thiserror::Error;
use url::Url;
use crate::{
agent::{
r... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/health_check.rs | ic-agent/src/agent/route_provider/dynamic_routing/health_check.rs | use async_trait::async_trait;
use bytes::Bytes;
use futures_util::FutureExt;
use http::{Method, Request, StatusCode, Uri};
use std::{
fmt::Debug,
str::FromStr,
sync::Arc,
time::{Duration, Instant},
};
use stop_token::{StopSource, StopToken};
use crate::agent::{
route_provider::dynamic_routing::{
... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/mod.rs | ic-agent/src/agent/route_provider/dynamic_routing/mod.rs | //! A dynamic routing provider for the Internet Computer (IC) Agent that enables resilient, adaptive request routing through API boundary nodes.
//!
//! The `DynamicRouteProvider` is an implementation of the [`RouteProvider`](super::RouteProvider) trait. It dynamically discovers and monitors API boundary nodes, filters... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/nodes_fetch.rs | ic-agent/src/agent/route_provider/dynamic_routing/nodes_fetch.rs | use async_trait::async_trait;
use candid::Principal;
use futures_util::FutureExt;
use std::{fmt::Debug, sync::Arc, time::Duration};
use stop_token::StopToken;
use url::Url;
#[allow(unused)]
use crate::agent::route_provider::dynamic_routing::health_check::HEALTH_MANAGER_ACTOR;
use crate::agent::{
route_provider::dy... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/snapshot/round_robin_routing.rs | ic-agent/src/agent/route_provider/dynamic_routing/snapshot/round_robin_routing.rs | use std::{
collections::HashSet,
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
},
};
use crate::agent::route_provider::{
dynamic_routing::{
health_check::HealthCheckStatus, node::Node, snapshot::routing_snapshot::RoutingSnapshot,
},
RoutesStats,
};
/// Routing snapshot,... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/snapshot/mod.rs | ic-agent/src/agent/route_provider/dynamic_routing/snapshot/mod.rs | /// Snapshot of the routing table.
pub mod latency_based_routing;
/// Node implementation.
pub mod round_robin_routing;
/// Routing snapshot implementation.
pub mod routing_snapshot;
| rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/snapshot/routing_snapshot.rs | ic-agent/src/agent/route_provider/dynamic_routing/snapshot/routing_snapshot.rs | use std::fmt::Debug;
use crate::agent::route_provider::{
dynamic_routing::{health_check::HealthCheckStatus, node::Node},
RoutesStats,
};
/// A trait for interacting with the snapshot of nodes (routing table).
pub trait RoutingSnapshot: Send + Sync + Clone + Debug {
/// Returns `true` if the snapshot has n... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-agent/src/agent/route_provider/dynamic_routing/snapshot/latency_based_routing.rs | ic-agent/src/agent/route_provider/dynamic_routing/snapshot/latency_based_routing.rs | use std::{
collections::{HashMap, HashSet, VecDeque},
sync::Arc,
time::Duration,
};
use arc_swap::ArcSwap;
use rand::Rng;
use crate::agent::route_provider::{
dynamic_routing::{
health_check::HealthCheckStatus, node::Node, snapshot::routing_snapshot::RoutingSnapshot,
},
RoutesStats,
};
... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ref-tests/src/universal_canister.rs | ref-tests/src/universal_canister.rs | #![allow(dead_code)]
//! The Universal Canister (UC) is a canister built in Rust, compiled to Wasm,
//! and serves as a canister that can be used for a multitude of tests.
//!
//! Payloads to UC can execute any arbitrary sequence of system methods, making
//! it possible to test different canister behaviors without hav... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ref-tests/src/lib.rs | ref-tests/src/lib.rs | #![cfg(unix)] // pocket-ic
pub mod universal_canister;
pub mod utils;
pub use utils::*;
| rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ref-tests/src/utils.rs | ref-tests/src/utils.rs | use ic_agent::export::reqwest::Url;
use ic_agent::identity::{Prime256v1Identity, Secp256k1Identity};
use ic_agent::{export::Principal, identity::BasicIdentity, Agent, Identity};
use ic_identity_hsm::HardwareIdentity;
use ic_utils::interfaces::{management_canister::builders::MemoryAllocation, ManagementCanister};
use po... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ref-tests/src/bin/prune-ranges.rs | ref-tests/src/bin/prune-ranges.rs | use ic_certification::{Certificate, Delegation, HashTreeNode};
use serde::{Deserialize, Serialize};
use serde_cbor::Serializer;
fn main() {
let repo_dir = std::fs::canonicalize(format!("{}/..", env!("CARGO_MANIFEST_DIR"))).unwrap();
let response =
std::fs::read(repo_dir.join("ic-agent/src/agent/agent_t... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ref-tests/tests/integration.rs | ref-tests/tests/integration.rs | #![cfg(unix)] // pocket-ic
//! In this file, please mark all tests that require a running ic-ref as ignored.
//!
//! Contrary to ic-ref.rs, these tests are not meant to match any other tests. They're
//! integration tests with a running IC-Ref.
use candid::CandidType;
use ic_agent::{
agent::{Envelope, EnvelopeConte... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ref-tests/tests/ic-ref.rs | ref-tests/tests/ic-ref.rs | #![cfg(unix)] // pocket-ic
//! In this file, please mark all tests that require a running ic-ref as ignored.
//!
//! These tests are a Rust-like version using the Agent to cover the same tests
//! as the IC Ref repo itself.
//!
//! The tests can be found in the Spec.hs file in the IC Ref repo.
//! https://github.com/... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | true |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils-bindgen-tests/build.rs | ic-utils-bindgen-tests/build.rs | use std::path::PathBuf;
use candid::Principal;
use ic_utils_bindgen::Config;
fn main() {
let dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
let base_cfg = dir.join("base.toml");
let icrc_did = dir.join("icrc1.did");
Config::new("icrc_runtime", &icrc_did)
.runtime_callee()
... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils-bindgen-tests/src/lib.rs | ic-utils-bindgen-tests/src/lib.rs | pub mod icrc_runtime {
include!(concat!(env!("OUT_DIR"), "/icrc_runtime.rs"));
}
pub mod icrc_static {
include!(concat!(env!("OUT_DIR"), "/icrc_static.rs"));
}
pub mod icrc_types {
include!(concat!(env!("OUT_DIR"), "/icrc_types.rs"));
}
| rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils-bindgen-tests/tests/bindgen_tests.rs | ic-utils-bindgen-tests/tests/bindgen_tests.rs | #![cfg(unix)]
use std::{fs, sync::Arc};
use candid::{Encode, Principal};
use ic_agent::{identity::Secp256k1Identity, Agent, Identity};
use ic_utils_bindgen_tests::{icrc_runtime, icrc_static, icrc_types};
use pocket_ic::nonblocking::PocketIc;
async fn with_ledger(f: impl AsyncFnOnce(&PocketIc, Principal, Agent, Arc<dy... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils-bindgen/src/lib.rs | ic-utils-bindgen/src/lib.rs | #![allow(clippy::needless_doctest_main)]
use candid::Principal;
use candid_parser::bindings::rust::{
emit_bindgen, output_handlebar, Config as BindgenConfig, ExternalConfig,
};
use candid_parser::configs::Configs;
use candid_parser::pretty_check_file;
use std::fs;
use std::io::Write;
use std::path::{Path, PathBuf... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/lib.rs | ic-utils/src/lib.rs | //! ic-utils is a collection of utilities to help build clients and canisters running
//! on the Internet Computer. It is meant as a higher level tool.
#![warn(
missing_docs,
missing_debug_implementations,
elided_lifetimes_in_paths,
rustdoc::broken_intra_doc_links,
rustdoc::private_intra_doc_links
... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/call.rs | ic-utils/src/call.rs | use async_trait::async_trait;
use candid::{decode_args, decode_one, utils::ArgumentDecoder, CandidType};
use ic_agent::{
agent::{CallResponse, UpdateBuilder},
export::Principal,
Agent, AgentError,
};
use serde::de::DeserializeOwned;
use std::fmt;
use std::future::{Future, IntoFuture};
use std::marker::Phant... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/interfaces.rs | ic-utils/src/interfaces.rs | pub mod bitcoin_canister;
pub mod http_request;
pub mod management_canister;
pub mod wallet;
pub use bitcoin_canister::BitcoinCanister;
pub use http_request::HttpRequestCanister;
pub use management_canister::ManagementCanister;
pub use wallet::WalletCanister;
| rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/canister.rs | ic-utils/src/canister.rs | use crate::call::{AsyncCaller, SyncCaller};
use candid::utils::ArgumentEncoder;
use candid::{ser::IDLBuilder, types::value::IDLValue, utils::ArgumentDecoder, CandidType, Encode};
use ic_agent::{export::Principal, Agent, AgentError, RequestId};
use std::convert::TryInto;
use thiserror::Error;
/// An error happened whil... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/call/expiry.rs | ic-utils/src/call/expiry.rs | use std::time::{Duration, SystemTime};
use ic_agent::agent::{QueryBuilder, UpdateBuilder};
use time::OffsetDateTime;
/// An expiry value. Either not specified (the default), a delay relative to the time the
/// call is made, or a specific date time.
#[derive(Clone, Debug, Ord, PartialOrd, Eq, PartialEq, Default)]
pub... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/interfaces/bitcoin_canister.rs | ic-utils/src/interfaces/bitcoin_canister.rs | //! The canister interface for the [Bitcoin canister](https://github.com/dfinity/bitcoin-canister).
use std::ops::Deref;
use candid::{CandidType, Principal};
use ic_agent::{Agent, AgentError};
use serde::Deserialize;
use crate::{
call::{AsyncCall, SyncCall},
Canister,
};
/// The canister interface for the I... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/interfaces/http_request.rs | ic-utils/src/interfaces/http_request.rs | //! The canister interface for canisters that implement HTTP requests.
use crate::{
call::{AsyncCall, SyncCall},
Canister,
};
use candid::{
types::{
reference::FuncVisitor,
value::{IDLValue, IDLValueVisitor},
Compound, Serializer, Type, TypeInner,
},
CandidType, Deserialize,... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/interfaces/management_canister.rs | ic-utils/src/interfaces/management_canister.rs | //! The canister interface for the IC management canister. See the [specification][spec] for full documentation of the interface.
//!
//! [spec]: https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-management-canister
use crate::{
call::{AsyncCall, SyncCall},
Canister,
};
use ic_agent::{e... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/interfaces/wallet.rs | ic-utils/src/interfaces/wallet.rs | //! The canister interface for the [cycles wallet] canister.
//!
//! [cycles wallet]: https://github.com/dfinity/cycles-wallet
use std::{
future::{Future, IntoFuture},
ops::Deref,
};
use crate::{
call::{AsyncCall, CallFuture, SyncCall},
canister::Argument,
interfaces::management_canister::{
... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | true |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/interfaces/management_canister/builders.rs | ic-utils/src/interfaces/management_canister/builders.rs | //! Builder interfaces for some method calls of the management canister.
#[doc(inline)]
pub use super::attributes::{
ComputeAllocation, FreezingThreshold, MemoryAllocation, ReservedCyclesLimit, WasmMemoryLimit,
};
use super::{ChunkHash, LogVisibility, ManagementCanister};
use crate::call::CallFuture;
use crate::{
... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | true |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-utils/src/interfaces/management_canister/attributes.rs | ic-utils/src/interfaces/management_canister/attributes.rs | //! Checked wrappers around certain numeric values used in management calls.
use thiserror::Error;
/// An error encountered when attempting to construct a [`ComputeAllocation`].
#[derive(Error, Debug)]
pub enum ComputeAllocationError {
/// The provided value was not a percentage in the range [0, 100].
#[error... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/icx-cert/src/pprint.rs | icx-cert/src/pprint.rs | use anyhow::{anyhow, Context, Result};
use base64::prelude::*;
use ic_certification::{HashTree, LookupResult};
use reqwest::header;
use serde::{de::DeserializeOwned, Deserialize};
use sha2::Digest;
use time::{format_description::well_known::Rfc3339, OffsetDateTime};
/// Structured contents of the IC-Certificate header... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/icx-cert/src/main.rs | icx-cert/src/main.rs | use anyhow::Result;
use clap::{crate_authors, crate_version, Parser};
mod pprint;
#[derive(Parser)]
#[command(
version = crate_version!(),
author = crate_authors!(),
)]
enum Command {
/// Fetches the specified URL and pretty-prints the certificate.
#[clap(name = "print")]
PPrint {
url: Str... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-identity-hsm/src/lib.rs | ic-identity-hsm/src/lib.rs | //! A crate to manage identities related to HSM (Hardware Security Module),
//! allowing users to sign Internet Computer messages with their hardware key.
//! Also supports `SoftHSM`.
//!
//! # Example
//!
//! ```rust,no_run
//! use ic_agent::agent::Agent;
//! use ic_identity_hsm::HardwareIdentity;
//! # fn main() -> R... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
dfinity/agent-rs | https://github.com/dfinity/agent-rs/blob/6fef5bfa96d2ed63b84afd173cc049e38cb5a210/ic-identity-hsm/src/hsm.rs | ic-identity-hsm/src/hsm.rs | use ic_agent::{
agent::EnvelopeContent, export::Principal, identity::Delegation, Identity, Signature,
};
use pkcs11::{
types::{
CKA_CLASS, CKA_EC_PARAMS, CKA_EC_POINT, CKA_ID, CKA_KEY_TYPE, CKF_LOGIN_REQUIRED,
CKF_SERIAL_SESSION, CKK_ECDSA, CKM_ECDSA, CKO_PRIVATE_KEY, CKO_PUBLIC_KEY, CKU_USER,
... | rust | Apache-2.0 | 6fef5bfa96d2ed63b84afd173cc049e38cb5a210 | 2026-01-04T20:16:51.650214Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/from.rs | ocamlrep/from.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
//! Helpers for implementing `FromOcamlRep::from_ocamlrep` or
//! `FromOcamlRepIn::from_ocamlrep_in`.
use bumpalo::Bump;
use crate::Bl... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/lib.rs | ocamlrep/lib.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
/*!
OcamlRep is a framework for building and interpreting the in-memory
representation of OCaml values. This is useful for converting Ru... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/value.rs | ocamlrep/value.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::borrow::Cow;
use std::collections::HashMap;
use std::fmt;
use std::fmt::Debug;
use std::marker::PhantomData;
use crate::Alloca... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/arena.rs | ocamlrep/arena.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::cell::RefCell;
use std::cmp::max;
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
use crate::Allocator;
u... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/block.rs | ocamlrep/block.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::collections::HashMap;
use std::fmt;
use std::fmt::Debug;
use std::ops::Index;
use crate::Allocator;
use crate::Value;
/// Blo... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/error.rs | ocamlrep/error.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::error::Error;
use std::fmt;
use std::num::TryFromIntError;
use std::str::Utf8Error;
/// Returned by
/// [`OcamlRep::from_ocaml... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/rc.rs | ocamlrep/rc.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
//! Provides `RcOc`, a single-threaded reference-counting pointer. `RcOc` stands
//! for "reference counted with Ocaml-value cache".
us... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/impls.rs | ocamlrep/impls.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::borrow::Borrow;
use std::borrow::Cow;
use std::cell::Cell;
use std::cell::RefCell;
use std::collections::BTreeMap;
use std::col... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | true |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/ptr.rs | ocamlrep/ptr.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
//! FFI types for representing pointers-to-OCaml-managed-data in Rust
//! (`UnsafeOcamlPtr`) and pointers-to-Rust-managed-data in OCaml ... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/cache.rs | ocamlrep/cache.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
//! Provides `MemoizationCache`, a simple cache designed to aid implementation
//! of the `Allocator` trait.
use std::cell::RefCell;
t... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/test/test_add_root.rs | ocamlrep/test/test_add_root.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![cfg(test)]
use ocamlrep::Allocator;
use ocamlrep::Arena;
use ocamlrep::FromOcamlRep;
use ocamlrep::ToOcamlRep;
#[test]
fn shared_st... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/test/test_from_ocamlrep.rs | ocamlrep/test/test_from_ocamlrep.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![cfg(test)]
use ocamlrep::Allocator;
use ocamlrep::Arena;
use ocamlrep::FromError::*;
use ocamlrep::FromOcamlRep;
use ocamlrep::ToOca... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/test/test_bindings.rs | ocamlrep/test/test_bindings.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![feature(exit_status_error)]
use std::cell::RefCell;
use std::collections::BTreeMap;
use std::collections::BTreeSet;
use ocamlrep::Fr... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep/test/test_from_ocamlrep_in.rs | ocamlrep/test/test_from_ocamlrep_in.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![cfg(test)]
use std::fmt::Debug;
use bumpalo::Bump;
use ocamlrep::FromOcamlRepIn;
use ocamlrep::ToOcamlRep;
fn test_round_trip<'a, ... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_marshal/ser.rs | ocamlrep_marshal/ser.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
// Initially generatd by c2rust of 'extern.c' at revision:
// `f14c8ff3f8a164685bc24184fba84904391e378e`.
use std::io;
use std::io::Rea... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_marshal/deser.rs | ocamlrep_marshal/deser.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
// This file ('deser.rs') was based off c2rust generated code of 'intern.c' at
// revision `15553b77175270d987058b386d737ccb939e8d5a` (i... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_marshal/intext.rs | ocamlrep_marshal/intext.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![allow(dead_code)] //for now
pub(crate) const MAGIC_NUMBER_SMALL: u32 = 0x8495A6BE; // 10000100100101011010011010111110
pub(crate) con... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_marshal/build.rs | ocamlrep_marshal/build.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
// Assume an opam environment (`eval "$(opam env --switch=default
// --set-switch)"`) then to find the prevailing standard library caml
... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_marshal/ocamlrep_marshal.rs | ocamlrep_marshal/ocamlrep_marshal.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![feature(new_zeroed_alloc)]
mod deser; // deserialize; c.f 'runtime/intern.c'
mod intext; // c.f. 'runtime/caml/intext.h'
mod ser; //... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_marshal/test/ocamlrep_marshal_ffi_bindings.rs | ocamlrep_marshal/test/ocamlrep_marshal_ffi_bindings.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![feature(exit_status_error)]
use ocamlrep::FromOcamlRep;
type OcamlValue = usize;
#[unsafe(no_mangle)]
unsafe extern "C" fn ocamlrep... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_custom/lib.rs | ocamlrep_custom/lib.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
//! Library to build `Custom_tag` OCaml values.
use std::ffi::CStr;
use std::ffi::CString;
use std::mem::MaybeUninit;
use std::ops::Der... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_custom/test/counter.rs | ocamlrep_custom/test/counter.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![feature(exit_status_error)]
use std::cell::Cell;
use ocamlrep_custom::CamlSerialize;
use ocamlrep_custom::Custom;
use ocamlrep_cust... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_custom/test/test_custom.rs | ocamlrep_custom/test/test_custom.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::cell::RefCell;
use std::io::Write;
use std::rc::Rc;
use ocamlrep_custom::CamlSerialize;
use ocamlrep_custom::Custom;
use ocaml... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/cargo_test_utils/cargo_test_utils.rs | cargo_test_utils/cargo_test_utils.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![feature(exit_status_error)]
use std::process::Command;
use std::process::ExitStatusError;
pub fn cmd(prog: &str, args: &[&str], dir:... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/rust_to_ocaml_attr/rust_to_ocaml_attr.rs | rust_to_ocaml/rust_to_ocaml_attr/rust_to_ocaml_attr.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use proc_macro::TokenStream;
/// This attribute macro is intended to be consumed by the rust_to_ocaml codegen
/// tool, so this proc ma... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/rust_to_ocaml/config.rs | rust_to_ocaml/rust_to_ocaml/config.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::str::FromStr;
use indexmap::IndexMap;
use indexmap::IndexSet;
use indexmap::indexmap;
use indexmap::indexset;
use serde::Deser... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/rust_to_ocaml/rust_to_ocaml.rs | rust_to_ocaml/rust_to_ocaml/rust_to_ocaml.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#[macro_use]
mod macros;
mod config;
mod convert;
mod ir;
mod rewrite_module_names;
mod rewrite_types;
use std::io::Write;
use std::pa... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/rust_to_ocaml/rewrite_module_names.rs | rust_to_ocaml/rust_to_ocaml/rewrite_module_names.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use crate::Config;
use crate::ir;
pub fn rewrite_file(config: &'static Config, file: &mut ir::File) {
let rewriter = Rewriter { con... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/rust_to_ocaml/convert.rs | rust_to_ocaml/rust_to_ocaml/convert.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use anyhow::Context;
use anyhow::Result;
use anyhow::bail;
use anyhow::ensure;
use convert_case::Case;
use convert_case::Casing;
use cr... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/rust_to_ocaml/macros.rs | rust_to_ocaml/rust_to_ocaml/macros.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
/// Provide impls of `Serialize` and `Deserialize` which delegate to the impls
/// of `std::fmt::Display` and `std::str::FromStr` respec... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/rust_to_ocaml/ir.rs | rust_to_ocaml/rust_to_ocaml/ir.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
mod display;
use derive_more::Display;
#[derive(Debug)]
pub struct File {
pub root: Module,
}
#[derive(Debug)]
pub struct Module ... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/rust_to_ocaml/rewrite_types.rs | rust_to_ocaml/rust_to_ocaml/rewrite_types.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use convert_case::Case;
use convert_case::Casing;
use crate::Config;
use crate::ir;
pub fn rewrite_file(config: &'static Config, file:... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/rust_to_ocaml/ir/display.rs | rust_to_ocaml/rust_to_ocaml/ir/display.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::fmt::Display;
use std::fmt::Formatter;
use std::fmt::Result;
use convert_case::Case;
use convert_case::Casing;
use crate::ir;... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/test_rust_to_ocaml.rs | rust_to_ocaml/test/test_rust_to_ocaml.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::ffi::OsStr;
use std::path::Path;
use std::path::PathBuf;
#[derive(Debug, clap::Parser)]
struct Opts {
/// The directory co... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/struct.rs | rust_to_ocaml/test/cases/struct.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub struct MyStruct {
pub foo: isize,
pub bar: isize,
}
#[rust_to_ocaml(prefix = "a_")]
pub struct StructA {
pub foo: isize... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/type_name_matches_module_name.rs | rust_to_ocaml/test/cases/type_name_matches_module_name.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub type A = pos::Pos;
pub type B = crate::relative_path::RelativePath;
pub type C = collections::s_set::SSet;
pub type TypeNameMatch... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/inline_tuple.rs | rust_to_ocaml/test/cases/inline_tuple.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub enum E {
Foo((A, B)),
Bar(Box<(A, B)>),
#[rust_to_ocaml(inline_tuple)]
Baz((A, B)),
#[rust_to_ocaml(inline_tuple... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/attrs.rs | rust_to_ocaml/test/cases/attrs.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
/// type X
#[rust_to_ocaml(attr = "deriving show")]
pub type X = A;
/// type Y
#[rust_to_ocaml(
prefix = "y_",
attr = r#"derivi... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/mutual_rec.rs | rust_to_ocaml/test/cases/mutual_rec.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub struct Foo(pub Bar, pub Bar);
#[rust_to_ocaml(and)]
pub struct Bar(pub Option<Foo>, pub Option<Foo>);
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/pointers.rs | rust_to_ocaml/test/cases/pointers.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub type BoxA = Box<A>;
pub type RcA = Rc<A>;
pub type ArcA = Arc<A>;
pub type RcOcA = RcOc<A>;
pub type StdBoxA = std::boxed::Box<A>;
... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/tuple_structs.rs | rust_to_ocaml/test/cases/tuple_structs.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub struct A;
pub struct B();
pub struct C(());
pub struct D(pub X);
pub struct E(pub Y, pub Z);
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/keywords.rs | rust_to_ocaml/test/cases/keywords.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub struct Foo {
and: A,
assert: A,
asr: A,
begin: A,
class: A,
constraint: A,
done: A,
downto: A,
e... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/lists.rs | rust_to_ocaml/test/cases/lists.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub type MyVec = Vec<X>;
pub type BoxedSlice = Box<[X]>;
pub type Slice<'a> = &'a [X];
pub type StdVec = std::vec::Vec<X>;
pub type Std... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/type_args.rs | rust_to_ocaml/test/cases/type_args.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub type MaybeA = Option<A>;
pub type MyResult = Result<B, C>;
pub type Bar = foo::Bar<D, E, F>;
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/qualified_name.rs | rust_to_ocaml/test/cases/qualified_name.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub type A = x::Foo;
pub type B = y::z::Foo;
pub type C = my_module::some_submodule::Foo;
pub type D = i_map::IMap<X>;
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/variants.rs | rust_to_ocaml/test/cases/variants.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub enum A {
I,
J(isize),
K(isize, isize),
L((isize, isize)),
M { x: isize, y: isize },
}
#[rust_to_ocaml(prefix = ... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/tuple.rs | rust_to_ocaml/test/cases/tuple.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
type TupleA = (A, B);
type TupleB = (A, (B, C));
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/option.rs | rust_to_ocaml/test/cases/option.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub enum MyOption<A> {
None,
Some(A),
}
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/int.rs | rust_to_ocaml/test/cases/int.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub type A = i8;
pub type B = u8;
pub type C = i16;
pub type D = u16;
pub type E = i32;
pub type F = u32;
pub type G = i64;
pub t... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/my_result.rs | rust_to_ocaml/test/cases/my_result.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub enum Result<T, E> {
Ok(T),
Err(E),
}
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/name_attribute.rs | rust_to_ocaml/test/cases/name_attribute.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#[rust_to_ocaml(name = "aa")] // ignored
type A = X;
#[rust_to_ocaml(name = "bb")] // ignored
struct B {
#[rust_to_ocaml(name = "bb... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/doc_comment.rs | rust_to_ocaml/test/cases/doc_comment.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
/// Type A
pub type A = X;
/// Type B
/// is int
pub type B = X;
/// Type C has a fenced code block:
///
/// ```
/// function f(): int... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/bool_alias.rs | rust_to_ocaml/test/cases/bool_alias.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub type A = bool;
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/test/cases/inline_tuple_bad.rs | rust_to_ocaml/test/cases/inline_tuple_bad.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
pub enum E {
#[rust_to_ocaml(inline_tuple)]
Foo(Box<A>),
}
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/rust_to_ocaml/attr_parser/attr_parser.rs | rust_to_ocaml/attr_parser/attr_parser.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use syn::Meta::List;
use syn::Meta::NameValue;
use syn::Meta::Path;
use syn::NestedMeta::Lit;
use syn::NestedMeta::Meta;
static DOC: &s... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_derive/lib.rs | ocamlrep_derive/lib.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![recursion_limit = "128"]
use proc_macro2::TokenStream;
use quote::quote;
use syn::Attribute;
use syn::Meta;
use syn::NestedMeta;
use... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_caml_builtins/lib.rs | ocamlrep_caml_builtins/lib.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use ocamlrep::*;
use ocamlrep_custom::CustomOperations;
use serde::Deserialize;
use serde::Serialize;
/// `Int64.t` conversion guide.
/... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/shim/third-party/rust/fixups/libsqlite3-sys/bindgen.rs | shim/third-party/rust/fixups/libsqlite3-sys/bindgen.rs | /* automatically generated by rust-bindgen 0.69.4 */
extern "C" {
pub fn sqlite3_auto_extension(
xEntryPoint: ::std::option::Option<
unsafe extern "C" fn(
db: *mut sqlite3,
pzErrMsg: *mut *mut ::std::os::raw::c_char,
_: *const sqlite3_api_routines... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | true |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/shim/third-party/rust/top/main.rs | shim/third-party/rust/top/main.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#![allow(unused_crate_dependencies)]
fn main() {}
| rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/macro_test_util/macro_test_util.rs | macro_test_util/macro_test_util.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::fmt::Display;
use proc_macro2::TokenStream;
use proc_macro2::TokenTree;
fn mismatch(ta: Option<TokenTree>, tb: Option<TokenTr... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
facebook/ocamlrep | https://github.com/facebook/ocamlrep/blob/3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6/ocamlrep_ocamlpool/lib.rs | ocamlrep_ocamlpool/lib.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use std::ffi::CString;
use std::panic::UnwindSafe;
pub use bumpalo::Bump;
use ocamlrep::Allocator;
use ocamlrep::BlockBuilder;
pub use ... | rust | MIT | 3ed6e41c17c6d05e19121b59beb8efbb1a7ce3b6 | 2026-01-04T20:16:50.959951Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.