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 |
|---|---|---|---|---|---|---|---|---|
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/download_models.rs | src/download_models.rs | use hf_hub::api::tokio::Api;
use std::path::{Path, PathBuf};
use tokio::fs;
use tracing::info;
pub enum Model {
Model(String),
AllRtDetr2,
AllYolo5,
AllRfDetr,
All,
}
pub const RT_DETR2_MODELS: (&str, &[&str]) = (
"xnorpx/rt-detr2-onnx",
&[
"rt-detrv2-s.onnx",
"rt-detrv2-s.... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/lib.rs | src/lib.rs | use clap::ValueEnum;
use cli::Cli;
use detector::OnnxConfig;
use serde::Deserialize;
use server::run_server;
use startup_coordinator::spawn_detector_initialization;
use std::{future::Future, path::PathBuf};
use tokio_util::sync::CancellationToken;
use tracing::{Level, info};
pub mod api;
pub mod cli;
pub mod detector;
... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/image.rs | src/image.rs | use crate::api::Prediction;
use ab_glyph::{FontArc, PxScale};
use anyhow::bail;
use bytes::Bytes;
use image::{DynamicImage, ImageBuffer};
use jpeg_encoder::{ColorType, Encoder};
use std::{fmt, path::Path, time::Instant};
use tracing::{debug, info};
use zune_core::{bytestream::ZCursor, colorspace::ColorSpace, options::D... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/detector.rs | src/detector.rs | #[cfg(windows)]
use crate::direct_ml_available;
use crate::{
api::Prediction,
get_object_classes,
image::{
Image, Resizer, create_od_image_name, decode_jpeg,
encode_maybe_draw_boundary_boxes_and_save_jpeg,
},
};
use anyhow::{anyhow, bail};
use bytes::Bytes;
use ndarray::{Array, ArrayView... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | true |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/cli.rs | src/cli.rs | use crate::{LogLevel, detector::ObjectDetectionModel, download_models::Model, init_logging};
use clap::Parser;
use serde::{Deserialize, Serialize};
use std::{path::PathBuf, time::Duration};
#[derive(Parser, Serialize, Deserialize, Clone)]
#[command(author = "Marcus Asteborg", version=env!("CARGO_PKG_VERSION"), about =... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/api.rs | src/api.rs | use anyhow::{Context, anyhow};
use axum::body::Bytes;
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
use std::fmt::Debug;
#[derive(Default)]
pub struct VisionDetectionRequest {
pub min_confidence: f32,
pub image_data: Bytes,
pub image_name: String,
}
#[allow(non_snake_case)]
#[derive(Seriali... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/worker.rs | src/worker.rs | use crate::{
api::{VisionDetectionRequest, VisionDetectionResponse},
detector::{Detector, DetectorConfig, DeviceType},
image::create_random_jpeg_name,
};
use crossbeam::channel::{Receiver, Sender};
use std::time::{Duration, Instant};
use tokio::sync::oneshot;
use tracing::{debug, info, warn};
pub struct De... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/server.rs | src/server.rs | use crate::{
api::{
StatusUpdateResponse, VersionInfo, VisionCustomListResponse, VisionDetectionRequest,
VisionDetectionResponse,
},
detector::ExecutionProvider,
startup_coordinator::{DetectorInfo, InitResult},
};
use askama::Template;
use axum::{
Json, Router,
body::{self, Body}... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | true |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/system_info.rs | src/system_info.rs | use tracing::info;
pub fn system_info() -> anyhow::Result<()> {
info!("System Information:");
cpu_info()?;
gpu_info(true)?;
Ok(())
}
pub fn cpu_model() -> String {
use raw_cpuid::CpuId;
let cpuid = CpuId::new();
match cpuid.get_processor_brand_string() {
Some(cpu_brand) => cpu_bran... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/startup_coordinator.rs | src/startup_coordinator.rs | use crate::{
api::VisionDetectionRequest, api::VisionDetectionResponse, detector::DetectorConfig,
detector::ExecutionProvider, worker::DetectorWorker,
};
use crossbeam::channel::Sender;
use std::time::Instant;
use tokio::sync::oneshot;
use tracing::{error, info};
/// Information about the initialized detector
... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/bin/test_blue_onyx.rs | src/bin/test_blue_onyx.rs | use blue_onyx::{DOG_BIKE_CAR_BYTES, api::VisionDetectionResponse};
use clap::Parser;
use indicatif::{ProgressBar, ProgressStyle};
use reqwest::{Body, Client, multipart};
use std::time::{Duration, Instant};
use tokio::fs::File;
use tokio_util::codec::{BytesCodec, FramedRead};
// Simple test client to send multiple requ... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/bin/blue_onyx_service.rs | src/bin/blue_onyx_service.rs | //! Blue Onyx service.
//!
//! This service loads configuration from blue_onyx_config_service.json
//! If the config file doesn't exist, it creates one with default values.
//!
//! Install the service with proper GPU access:
//!
//! Increase service timeout to 10 minutes for model loading:
//! `reg add "HKLM\SYSTEM\Cur... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/bin/blue_onyx_benchmark.rs | src/bin/blue_onyx_benchmark.rs | //! Blue Onyx Benchmark Application
//!
//! This application benchmarks the inference performance of the rt-detrv2 model across
//! different device configurations. It records statistics such as total inference time,
//! average, minimum, and maximum inference durations, as well as images processed per second.
//! The ... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
xnorpx/blue-onyx | https://github.com/xnorpx/blue-onyx/blob/dc00f8bd73857e721a73e0ea804da436fef3ebed/src/bin/blue_onyx.rs | src/bin/blue_onyx.rs | use blue_onyx::{
blue_onyx_service as create_blue_onyx_service, cli::Cli, init_logging,
system_info::system_info, update_log_level,
};
use tracing::{error, info, warn};
fn main() -> anyhow::Result<()> {
let Some(mut current_args) = Cli::from_config_and_args()? else {
return Ok(());
};
let _... | rust | MIT | dc00f8bd73857e721a73e0ea804da436fef3ebed | 2026-01-04T20:24:46.035395Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/builder.rs | src/builder.rs | //! contains the QuickJsRuntimeBuilder which may be used to instantiate a new QuickjsRuntimeFacade
use crate::facades::QuickJsRuntimeFacade;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsruntimeadapter::QuickJsRuntimeAdapter;
use crate::jsutils::modules::{CompiledModuleLoader, NativeModuleLoa... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/lib.rs | src/lib.rs | //! # quickjs_runtime
//! This crate consists of two main parts:
//! * thread-safe utils and wrappers
//! you can call these from any thread, all logic is directed to a single worker-thread(EventLoop) which invokes the quickjs API
//! * quickjs bindings and utils
//! these talk to the quickjs API directly and need ... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjsvalueadapter.rs | src/quickjsvalueadapter.rs | //! JSValueRef is a wrapper for quickjs's JSValue. it provides automatic reference counting making it safer to use
use crate::jsutils::{JsError, JsValueType};
use crate::quickjs_utils::typedarrays::is_typed_array;
use crate::quickjs_utils::{arrays, errors, functions, primitives, promises};
use crate::reflection::is_... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/values.rs | src/values.rs | use crate::facades::QuickjsRuntimeFacadeInner;
use crate::jsutils::{JsError, JsValueType};
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
use crate::reflection::JsProxyInstanceId;
use futures::executor::block_on;
use futures::Future;
use hirofa_utils::debug_mut... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjsruntimeadapter.rs | src/quickjsruntimeadapter.rs | // store in thread_local
use crate::facades::QuickjsRuntimeFacadeInner;
use crate::jsutils::modules::{CompiledModuleLoader, NativeModuleLoader, ScriptModuleLoader};
use crate::jsutils::{JsError, Script, ScriptPreProcessor};
use crate::quickjs_utils::compile::from_bytecode;
use crate::quickjs_utils::modules::{
add_... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjsrealmadapter.rs | src/quickjsrealmadapter.rs | use crate::facades::QuickjsRuntimeFacadeInner;
use crate::quickjs_utils::objects::construct_object;
use crate::quickjs_utils::primitives::{from_bool, from_f64, from_i32, from_string_q};
use crate::quickjs_utils::typedarrays::{
detach_array_buffer_buffer_q, get_array_buffer_buffer_copy_q, get_array_buffer_q,
new... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | true |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/facades.rs | src/facades.rs | //! contains the QuickJsRuntimeFacade
use crate::builder::QuickJsRuntimeBuilder;
use crate::jsutils::{JsError, Script};
use crate::quickjs_utils::{functions, objects};
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsruntimeadapter::{
CompiledModuleLoaderAdapter, MemoryUsage, NativeModuleLoad... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | true |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/reflection/eventtarget.rs | src/reflection/eventtarget.rs | //! EventTarget utils
//!
use crate::jsutils::JsError;
use crate::quickjs_utils;
use crate::quickjs_utils::objects::{create_object_q, set_property_q};
use crate::quickjs_utils::primitives::from_bool;
use crate::quickjs_utils::{functions, objects, parse_args, primitives};
use crate::quickjsrealmadapter::QuickJsRealmAda... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/reflection/mod.rs | src/reflection/mod.rs | //! utils for implementing proxy classes which can be used to use rust structs from JS (define method/getters/setters/etc)
use crate::jsutils::JsError;
use crate::quickjs_utils;
use crate::quickjs_utils::functions::new_native_function_q;
use crate::quickjs_utils::objects::{get_property, set_property2_q};
use crate::qu... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | true |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/jsutils/modules.rs | src/jsutils/modules.rs | use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
use std::sync::Arc;
pub trait ScriptModuleLoader {
fn normalize_path(
&self,
realm: &QuickJsRealmAdapter,
ref_path: &str,
path: &str,
) -> Option<String>;
fn load_module... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/jsutils/mod.rs | src/jsutils/mod.rs | //! This contains abstract traits and structs for use with different javascript runtimes
//! the Adapter traits are use in the worker thread (EventLoop) of the Runtime and thus are not Send, they should never leave the thread
//! The facade classes are for use outside the worker thread, they are Send
//!
use crate::va... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/jsutils/jsproxies.rs | src/jsutils/jsproxies.rs | use crate::reflection::Proxy;
pub type JsProxy = Proxy;
pub type JsProxyInstanceId = usize;
| rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/jsutils/promises.rs | src/jsutils/promises.rs | use crate::jsutils::helper_tasks::{add_helper_task, add_helper_task_async};
use crate::jsutils::JsError;
use crate::quickjs_utils::promises::QuickJsPromiseAdapter;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
use futures::Future;
#[allow(clippy::type_complex... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/jsutils/helper_tasks.rs | src/jsutils/helper_tasks.rs | use futures::Future;
use hirofa_utils::task_manager::TaskManager;
use lazy_static::lazy_static;
use tokio::task::JoinError;
lazy_static! {
/// a static Multithreaded task manager used to run rust ops async and multithreaded ( in at least 2 threads)
static ref HELPER_TASKS: TaskManager = TaskManager::new(std::c... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/features/set_timeout.rs | src/features/set_timeout.rs | use crate::jsutils::JsError;
use crate::quickjs_utils;
use crate::quickjs_utils::{functions, get_global, objects, parse_args, primitives};
use crate::quickjsruntimeadapter::QuickJsRuntimeAdapter;
use hirofa_utils::eventloop::EventLoop;
use libquickjs_sys as q;
use std::time::Duration;
/// provides the setImmediate met... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/features/mod.rs | src/features/mod.rs | //! contains engine features like console, setTimeout, setInterval and setImmediate
use crate::facades::QuickJsRuntimeFacade;
use crate::jsutils::JsError;
#[cfg(feature = "console")]
pub mod console;
#[cfg(any(feature = "settimeout", feature = "setinterval"))]
pub mod set_timeout;
#[cfg(feature = "setimmediate")]
pub ... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/features/console.rs | src/features/console.rs | //! the console feature enables the script to use various cansole.log variants
//! see also: [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Console)
//! the following methods are available
//! * console.log()
//! * console.info()
//! * console.error()
//! * console.warning()
//! * console.trace()
//!
//! The me... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/features/setimmediate.rs | src/features/setimmediate.rs | use crate::facades::QuickJsRuntimeFacade;
use crate::jsutils::JsError;
use crate::quickjs_utils;
use crate::quickjs_utils::{functions, get_global_q, objects, parse_args};
use crate::quickjsruntimeadapter::QuickJsRuntimeAdapter;
use libquickjs_sys as q;
/// provides the setImmediate methods for the runtime
/// # Exampl... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/typescript/mod.rs | src/typescript/mod.rs | // public transpile function which can also be used by gcs to transpile clientside ts
use crate::jsutils::JsError;
use crate::jsutils::Script;
use crate::quickjs_utils::modules::detect_module;
use crate::quickjsruntimeadapter::QuickJsRuntimeAdapter;
use std::cell::RefCell;
use std::collections::HashMap;
use std::io;
u... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/class_ids.rs | src/quickjs_utils/class_ids.rs | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false | |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/errors.rs | src/quickjs_utils/errors.rs | //! utils for getting and reporting exceptions
use crate::jsutils::JsError;
use crate::quickjs_utils::{objects, primitives};
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::{QuickJsValueAdapter, TAG_EXCEPTION};
use libquickjs_sys as q;
/// Get the last exception from the runtime, ... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/dates.rs | src/quickjs_utils/dates.rs | //! Utils for working with Date objects
use crate::jsutils::JsError;
use crate::quickjs_utils;
#[cfg(feature = "bellard")]
use crate::quickjs_utils::class_ids::JS_CLASS_DATE;
use crate::quickjs_utils::{functions, primitives};
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::QuickJsV... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/objects.rs | src/quickjs_utils/objects.rs | //! Utils for working with objects
use crate::jsutils::JsError;
use crate::quickjs_utils::properties::JSPropertyEnumRef;
use crate::quickjs_utils::{atoms, functions, get_constructor, get_global};
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsruntimeadapter::{make_cstring, QuickJsRuntimeAdapter... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/properties.rs | src/quickjs_utils/properties.rs | use crate::jsutils::JsError;
use crate::quickjs_utils::atoms;
use crate::quickjs_utils::atoms::JSAtomRef;
use libquickjs_sys as q;
#[cfg(feature = "bellard")]
use std::os::raw::c_int;
#[allow(clippy::upper_case_acronyms)]
/// this is a wrapper struct for JSPropertyEnum struct in quickjs
/// it used primarily as a resu... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/arrays.rs | src/quickjs_utils/arrays.rs | use crate::jsutils::JsError;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
use libquickjs_sys as q;
/// Check whether an object is an array
/// # Example
/// ```rust
/// use quickjs_runtime::builder::QuickJsRuntimeBuilder;
/// use quickjs_runtime::jsutils::Sc... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/compile.rs | src/quickjs_utils/compile.rs | //! Utils to compile script to bytecode and run script from bytecode
use crate::jsutils::JsError;
use crate::jsutils::Script;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsruntimeadapter::make_cstring;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
use libquickjs_sys as q;
use std::os::r... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/modules.rs | src/quickjs_utils/modules.rs | //! utils for working with ES6 Modules
use crate::jsutils::{JsError, Script};
use crate::quickjs_utils::atoms;
use crate::quickjs_utils::atoms::JSAtomRef;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsruntimeadapter::QuickJsRuntimeAdapter;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
u... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/functions.rs | src/quickjs_utils/functions.rs | //! utils to create and invoke functions
use crate::jsutils::JsError;
use crate::jsutils::Script;
use crate::quickjs_utils::errors::error_to_js_error;
use crate::quickjs_utils::{atoms, errors, objects, parse_args, primitives};
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsruntimeadapter::{make... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | true |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/json.rs | src/quickjs_utils/json.rs | //! serialize and stringify JavaScript objects
use crate::jsutils::JsError;
use crate::quickjs_utils;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
use libquickjs_sys as q;
use std::ffi::CString;
/// Parse a JSON string into an Object
/// please note that JS... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/primitives.rs | src/quickjs_utils/primitives.rs | use crate::jsutils::JsError;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
use core::ptr;
use libquickjs_sys as q;
use std::os::raw::c_char;
pub fn to_bool(value_ref: &QuickJsValueAdapter) -> Result<bool, JsError> {
if value_ref.is_bool() {
let r ... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/atoms.rs | src/quickjs_utils/atoms.rs | //JS_AtomToCString(ctx: *mut JSContext, atom: JSAtom) -> *const ::std::os::raw::c_char
use crate::jsutils::JsError;
use crate::quickjs_utils::primitives;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
use libquickjs_sys as q;
use std::ffi::CString;
#[allow(cli... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/iterators.rs | src/quickjs_utils/iterators.rs | //! utils for the iterator protocol
use crate::jsutils::JsError;
use crate::quickjs_utils::{functions, objects, primitives};
use crate::quickjsvalueadapter::QuickJsValueAdapter;
use libquickjs_sys as q;
/// iterate over an object conforming to the [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Ref... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/runtime.rs | src/quickjs_utils/runtime.rs | use libquickjs_sys as q;
/// create new class id
/// # Safety
/// make sure the runtime param is from a live JsRuntimeAdapter instance
pub unsafe fn new_class_id(_runtime: *mut q::JSRuntime) -> u32 {
let mut c_id: u32 = 0;
#[cfg(feature = "bellard")]
let class_id: u32 = q::JS_NewClassID(&mut c_id);
#... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/mod.rs | src/quickjs_utils/mod.rs | //! low level contains utils for calling the quickjs api
use crate::quickjsruntimeadapter::QuickJsRuntimeAdapter;
#[cfg(feature = "bellard")]
pub mod class_ids {
pub const JS_CLASS_OBJECT: u32 = 1;
pub const JS_CLASS_ARRAY: u32 = 2;
pub const JS_CLASS_ERROR: u32 = 3;
pub const JS_CLASS_NUMBER: u32 = 4... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/bigints.rs | src/quickjs_utils/bigints.rs | use crate::jsutils::JsError;
use crate::quickjs_utils;
use crate::quickjs_utils::{functions, primitives};
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsvalueadapter::QuickJsValueAdapter;
#[cfg(feature = "bellard")]
use crate::quickjsvalueadapter::TAG_BIG_INT;
use libquickjs_sys as q;
pub fn ne... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/promises.rs | src/quickjs_utils/promises.rs | use crate::jsutils::JsError;
use crate::quickjs_utils;
#[cfg(feature = "bellard")]
use crate::quickjs_utils::class_ids::JS_CLASS_PROMISE;
use crate::quickjs_utils::errors::get_stack;
use crate::quickjs_utils::functions;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsruntimeadapter::QuickJsRuntim... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/interrupthandler.rs | src/quickjs_utils/interrupthandler.rs | use crate::quickjsruntimeadapter::QuickJsRuntimeAdapter;
use libquickjs_sys as q;
use std::ffi::c_void;
use std::os::raw::c_int;
//
/// set an interrupt handler for the runtime
/// # Safety
/// be safe
pub unsafe fn set_interrupt_handler(runtime: *mut q::JSRuntime, handler: q::JSInterruptHandler) {
q::JS_SetInter... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/maps.rs | src/quickjs_utils/maps.rs | //! Map utils, these methods can be used to manage Map objects from rust
//! see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) for more on Maps
use crate::jsutils::JsError;
#[cfg(feature = "bellard")]
use crate::quickjs_utils::class_ids::JS_CLASS_MAP;
use crate::quickjs_ut... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/typedarrays.rs | src/quickjs_utils/typedarrays.rs | //! this module is a work in progress and is currently used by me to pass Vec<u8>'s from rust to js and back again
//!
//!
//!
use crate::jsutils::JsError;
use crate::quickjs_utils::class_ids::JS_CLASS_ARRAY_BUFFER;
use crate::quickjs_utils::get_constructor;
use crate::quickjs_utils::objects::{
construct_object, ge... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
HiRoFa/quickjs_es_runtime | https://github.com/HiRoFa/quickjs_es_runtime/blob/86cd72baf95baa4391cd831432fd2a1f4defbde5/src/quickjs_utils/sets.rs | src/quickjs_utils/sets.rs | //! Set utils, these methods can be used to manage Set objects from rust
//! see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Sap) for more on Sets
use crate::jsutils::JsError;
#[cfg(feature = "bellard")]
use crate::quickjs_utils::class_ids::JS_CLASS_SET;
use crate::quickjs_ut... | rust | MIT | 86cd72baf95baa4391cd831432fd2a1f4defbde5 | 2026-01-04T20:25:00.898147Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/misc/simple_message_relay/src/main.rs | misc/simple_message_relay/src/main.rs | use std::{
collections::{HashMap, VecDeque},
sync::Mutex,
};
use actix_web::{
get, post,
web::{self, Bytes},
App, HttpResponse, HttpServer, Responder,
};
#[derive(Default)]
struct UserMessages {
messages_by_user_id: Mutex<HashMap<String, VecDeque<Vec<u8>>>>,
}
#[get("/")]
async fn hello() -> ... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/misc/display_as_json/src/lib.rs | misc/display_as_json/src/lib.rs | extern crate proc_macro;
use proc_macro::TokenStream;
use quote::quote;
#[proc_macro_derive(Display)]
pub fn display_as_json_derive(input: TokenStream) -> TokenStream {
let ast = syn::parse(input).unwrap();
impl_display(&ast)
}
fn impl_display(ast: &syn::DeriveInput) -> TokenStream {
let name = &ast.iden... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/misc/display_as_json/tests/demo.rs | misc/display_as_json/tests/demo.rs | extern crate display_as_json;
extern crate serde;
use serde::{Deserialize, Serialize};
use crate::display_as_json::Display;
#[derive(Serialize, Deserialize, Display)]
struct TestStruct {
field1: u32,
field2: String,
}
#[test]
fn test_display_as_json() {
let instance = TestStruct {
field1: 42,
... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/lib.rs | did_core/did_doc/src/lib.rs | extern crate display_as_json;
extern crate serde;
extern crate serde_json;
pub mod error;
pub mod schema;
pub use did_parser_nom;
| rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/error.rs | did_core/did_doc/src/error.rs | use crate::schema::verification_method::{error::KeyDecodingError, VerificationMethodType};
#[derive(Debug)]
pub enum DidDocumentBuilderError {
CustomError(String),
MissingField(&'static str),
JsonError(serde_json::Error),
KeyDecodingError(KeyDecodingError),
UnsupportedVerificationMethodType(Verific... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/mod.rs | did_core/did_doc/src/schema/mod.rs | pub mod did_doc;
pub mod service;
pub mod types;
pub mod utils;
pub mod verification_method;
/// Module of commonly used DID-related JSON-LD contexts
pub mod contexts {
pub const W3C_DID_V1: &str = "https://www.w3.org/ns/did/v1";
pub const W3C_DID_V1_ALT: &str = "https://w3id.org/did/v1";
pub const W3C_SUI... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/did_doc.rs | did_core/did_doc/src/schema/did_doc.rs | use std::collections::HashMap;
use did_parser_nom::{Did, DidUrl};
use display_as_json::Display;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use super::{
types::uri::Uri,
utils::OneOrList,
verification_method::{VerificationMethod, VerificationMethodKind},
};
use crate::{error::DidDocumentBu... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/service/service_key_kind.rs | did_core/did_doc/src/schema/service/service_key_kind.rs | use std::fmt::Display;
use did_key::DidKey;
use did_parser_nom::DidUrl;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(untagged)]
pub enum ServiceKeyKind {
DidKey(DidKey),
Reference(DidUrl),
Value(String),
}
impl Display for ServiceKeyKind {
fn... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/service/mod.rs | did_core/did_doc/src/schema/service/mod.rs | use std::collections::HashMap;
use display_as_json::Display;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use service_accept_type::ServiceAcceptType;
use service_key_kind::ServiceKeyKind;
use url::Url;
use crate::{
error::DidDocumentBuilderError,
schema::{service::typed::ServiceType, types::uri... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/service/service_accept_type.rs | did_core/did_doc/src/schema/service/service_accept_type.rs | use std::fmt::Display;
use serde::{Deserialize, Deserializer, Serialize};
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
pub enum ServiceAcceptType {
DIDCommV1,
DIDCommV2,
Other(String),
}
impl From<&str> for ServiceAcceptType {
fn from(s: &str) -> Self {
match s {
"didcomm/aip2;env... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/service/typed/aip1.rs | did_core/did_doc/src/schema/service/typed/aip1.rs | use display_as_json::Display;
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Default, Display, TypedBuilder)]
#[serde(deny_unknown_fields)]
pub struct ExtraFieldsAIP1 {}
| rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/service/typed/mod.rs | did_core/did_doc/src/schema/service/typed/mod.rs | pub mod aip1;
pub mod didcommv1;
pub mod didcommv2;
pub mod legacy;
use std::{fmt::Display, str::FromStr};
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
use url::Url;
use crate::{error::DidDocumentBuilderError, schema::types::uri::Uri};
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/service/typed/didcommv2.rs | did_core/did_doc/src/schema/service/typed/didcommv2.rs | use display_as_json::Display;
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
use url::Url;
use crate::schema::{
service::{
service_accept_type::ServiceAcceptType,
service_key_kind::ServiceKeyKind,
typed::{ServiceType, TypedService},
},
types::uri::Uri,
};
#[d... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/service/typed/legacy.rs | did_core/did_doc/src/schema/service/typed/legacy.rs | use display_as_json::Display;
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
use crate::schema::service::service_key_kind::ServiceKeyKind;
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Default, Display, TypedBuilder)]
#[serde(rename_all = "camelCase")]
#[serde(deny_unknown_fields)]
... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/service/typed/didcommv1.rs | did_core/did_doc/src/schema/service/typed/didcommv1.rs | use std::collections::HashMap;
use display_as_json::Display;
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
use url::Url;
use crate::{
error::DidDocumentBuilderError,
schema::{
service::{
service_accept_type::ServiceAcceptType,
service_key_kind::ServiceKe... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/utils/error.rs | did_core/did_doc/src/schema/utils/error.rs | use std::fmt::{self, Display, Formatter};
use thiserror::Error;
#[derive(Debug, Error)]
pub struct DidDocumentLookupError {
reason: String,
}
impl DidDocumentLookupError {
pub fn new(reason: String) -> Self {
Self { reason }
}
}
impl Display for DidDocumentLookupError {
fn fmt(&self, f: &mut... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/utils/mod.rs | did_core/did_doc/src/schema/utils/mod.rs | pub mod error;
use std::fmt::{Debug, Display};
use serde::{Deserialize, Serialize};
use crate::schema::{
did_doc::DidDocument,
service::{typed::ServiceType, Service},
types::uri::Uri,
utils::error::DidDocumentLookupError,
verification_method::{VerificationMethod, VerificationMethodKind, Verificat... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/types/multibase.rs | did_core/did_doc/src/schema/types/multibase.rs | use std::{
error::Error,
fmt::{self, Display, Formatter},
str::FromStr,
};
use multibase::decode;
use serde::{Deserialize, Serialize};
use thiserror::Error;
#[derive(Debug, Error)]
pub struct MultibaseWrapperError {
reason: &'static str,
#[source]
source: Box<dyn Error + Sync + Send>,
}
impl ... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/types/uri.rs | did_core/did_doc/src/schema/types/uri.rs | use std::{
fmt::{self, Display, Formatter},
str::FromStr,
};
use serde::{Deserialize, Serialize};
use thiserror::Error;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
pub struct Uri(uniresid::Uri);
#[derive(Debug, Error)]
pub struct UriWrapperError {
reason: uniresid::Error,
}
impl ... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/types/mod.rs | did_core/did_doc/src/schema/types/mod.rs | pub mod jsonwebkey;
pub mod multibase;
pub mod uri;
| rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/types/jsonwebkey.rs | did_core/did_doc/src/schema/types/jsonwebkey.rs | use std::{
collections::HashMap,
error::Error,
fmt::{self, Display, Formatter},
str::FromStr,
};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use thiserror::Error;
#[derive(Debug, Error)]
pub struct JsonWebKeyError {
reason: &'static str,
#[source]
source: Box<dyn Error + Sy... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/verification_method/public_key.rs | did_core/did_doc/src/schema/verification_method/public_key.rs | use base64::{engine::general_purpose, Engine};
use public_key::Key;
use serde::{Deserialize, Serialize};
use crate::schema::{types::jsonwebkey::JsonWebKey, verification_method::error::KeyDecodingError};
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(untagged)]
#[serde(deny_unknown_fields)]
pub enu... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/verification_method/error.rs | did_core/did_doc/src/schema/verification_method/error.rs | use std::{
error::Error,
fmt,
fmt::{Display, Formatter},
};
use thiserror::Error;
use crate::schema::types::{jsonwebkey::JsonWebKeyError, multibase::MultibaseWrapperError};
#[derive(Debug, Error)]
pub struct KeyDecodingError {
reason: &'static str,
#[source]
source: Option<Box<dyn Error + Syn... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/verification_method/mod.rs | did_core/did_doc/src/schema/verification_method/mod.rs | pub mod error;
pub mod public_key;
mod verification_method_kind;
mod verification_method_type;
use ::public_key::Key;
use did_parser_nom::{Did, DidUrl};
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
pub use verification_method_kind::VerificationMethodKind;
pub use verification_method_type::Veri... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/verification_method/verification_method_type.rs | did_core/did_doc/src/schema/verification_method/verification_method_type.rs | use std::fmt::Display;
use public_key::KeyType;
use serde::{Deserialize, Serialize};
use crate::{error::DidDocumentBuilderError, schema::contexts};
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq)]
pub enum VerificationMethodType {
/// https://w3id.org/security/suites/jws-2020/v1
JsonWebKey202... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_doc/src/schema/verification_method/verification_method_kind.rs | did_core/did_doc/src/schema/verification_method/verification_method_kind.rs | use did_parser_nom::DidUrl;
use serde::{Deserialize, Serialize};
use super::VerificationMethod;
// Either a set of verification methods maps or DID URLs
// https://www.w3.org/TR/did-core/#did-document-properties
#[allow(clippy::large_enum_variant)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(un... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/lib.rs | did_core/did_methods/did_resolver_sov/src/lib.rs | pub extern crate did_resolver;
pub mod dereferencing;
pub mod error;
pub mod reader;
pub mod resolution;
pub mod service;
| rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/service.rs | did_core/did_methods/did_resolver_sov/src/service.rs | use std::{collections::HashSet, fmt::Display};
use serde::{Deserialize, Deserializer};
use url::Url;
#[derive(Debug, Deserialize, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct EndpointDidSov {
pub endpoint: Url,
#[serde(default)]
pub routing_keys: Vec<String>,
#[serde(
d... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/error/resolution.rs | did_core/did_methods/did_resolver_sov/src/error/resolution.rs | use did_resolver::traits::resolvable::{
resolution_error::DidResolutionError, resolution_metadata::DidResolutionMetadata,
};
use super::DidSovError;
impl From<&DidSovError> for DidResolutionError {
fn from(err: &DidSovError) -> Self {
match err {
DidSovError::NotFound(_) => DidResolutionEr... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/error/mod.rs | did_core/did_methods/did_resolver_sov/src/error/mod.rs | pub mod parsing;
mod resolution;
use aries_vcx_ledger::errors::error::VcxLedgerError;
use did_resolver::did_doc::{error::DidDocumentBuilderError, schema::types::uri::UriWrapperError};
use thiserror::Error;
use self::parsing::ParsingErrorSource;
use crate::error::DidSovError::ParsingError;
// TODO: DIDDocumentBuilder... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/error/parsing.rs | did_core/did_methods/did_resolver_sov/src/error/parsing.rs | use did_resolver::{did_doc::schema::types::uri::UriWrapperError, did_parser_nom};
use thiserror::Error;
use super::DidSovError;
#[derive(Error, Debug)]
pub enum ParsingErrorSource {
#[error("DID document parsing error: {0}")]
DidDocumentParsingError(#[from] did_parser_nom::ParseError),
#[error("DID docume... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/reader/mod.rs | did_core/did_methods/did_resolver_sov/src/reader/mod.rs | use aries_vcx_ledger::ledger::base_ledger::IndyLedgerRead;
use async_trait::async_trait;
use did_resolver::did_parser_nom::Did;
use crate::error::DidSovError;
#[async_trait]
#[cfg_attr(test, mockall::automock)]
pub trait AttrReader: Send + Sync {
async fn get_attr(&self, target_did: &Did, attr_name: &str) -> Resu... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/dereferencing/utils.rs | did_core/did_methods/did_resolver_sov/src/dereferencing/utils.rs | use std::io::Cursor;
use did_resolver::{
did_doc::schema::{
did_doc::DidDocument, service::Service, verification_method::VerificationMethod,
},
did_parser_nom::DidUrl,
traits::{
dereferenceable::{
dereferencing_metadata::DidDereferencingMetadata,
dereferencing_ou... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/dereferencing/mod.rs | did_core/did_methods/did_resolver_sov/src/dereferencing/mod.rs | mod dereferencer;
mod utils;
| rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/dereferencing/dereferencer.rs | did_core/did_methods/did_resolver_sov/src/dereferencing/dereferencer.rs | use std::{borrow::Borrow, io::Cursor};
use async_trait::async_trait;
use did_resolver::{
did_parser_nom::DidUrl,
error::GenericError,
traits::{
dereferenceable::{
dereferencing_options::DidDereferencingOptions,
dereferencing_output::DidDereferencingOutput, DidDereferenceable... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/resolution/utils.rs | did_core/did_methods/did_resolver_sov/src/resolution/utils.rs | use chrono::{DateTime, Utc};
use did_resolver::{
did_doc::schema::{
did_doc::DidDocument,
service::{typed::ServiceType, Service},
types::uri::Uri,
utils::OneOrList,
verification_method::{PublicKeyField, VerificationMethod, VerificationMethodType},
},
did_parser_nom::{... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/resolution/mod.rs | did_core/did_methods/did_resolver_sov/src/resolution/mod.rs | mod resolver;
mod utils;
pub use resolver::DidSovResolver;
| rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/src/resolution/resolver.rs | did_core/did_methods/did_resolver_sov/src/resolution/resolver.rs | use std::{borrow::Borrow, marker::PhantomData};
use async_trait::async_trait;
use did_resolver::{
did_parser_nom::Did,
error::GenericError,
traits::resolvable::{resolution_output::DidResolutionOutput, DidResolvable},
};
use serde_json::Value;
use super::utils::{is_valid_sovrin_did_id, ledger_response_to_d... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/tests/resolution.rs | did_core/did_methods/did_resolver_sov/tests/resolution.rs | use std::{thread, time::Duration};
use aries_vcx::common::ledger::{service_didsov::EndpointDidSov, transactions::write_endpoint};
use aries_vcx_ledger::ledger::base_ledger::IndyLedgerWrite;
use aries_vcx_wallet::wallet::base_wallet::{did_wallet::DidWallet, BaseWallet};
use did_resolver::{
did_doc::schema::service:... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_sov/tests/dereferencing.rs | did_core/did_methods/did_resolver_sov/tests/dereferencing.rs | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false | |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_web/src/lib.rs | did_core/did_methods/did_resolver_web/src/lib.rs | pub mod error;
pub mod resolution;
| rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_web/src/error/mod.rs | did_core/did_methods/did_resolver_web/src/error/mod.rs | pub mod parsing;
use hyper::StatusCode;
use thiserror::Error;
use self::parsing::ParsingErrorSource;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum DidWebError {
#[error("DID method not supported: {0}")]
MethodNotSupported(String),
#[error("Representation not supported: {0}")]
RepresentationNotSu... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_web/src/error/parsing.rs | did_core/did_methods/did_resolver_web/src/error/parsing.rs | use thiserror::Error;
use super::DidWebError;
#[derive(Error, Debug)]
pub enum ParsingErrorSource {
#[error("JSON parsing error: {0}")]
JsonError(#[from] serde_json::Error),
#[error("Invalid encoding: {0}")]
Utf8Error(#[from] std::string::FromUtf8Error),
}
impl From<serde_json::Error> for DidWebError... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_web/src/resolution/mod.rs | did_core/did_methods/did_resolver_web/src/resolution/mod.rs | pub mod resolver;
| rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_web/src/resolution/resolver.rs | did_core/did_methods/did_resolver_web/src/resolution/resolver.rs | use async_trait::async_trait;
use did_resolver::{
did_parser_nom::Did,
error::GenericError,
shared_types::did_document_metadata::DidDocumentMetadata,
traits::resolvable::{
resolution_metadata::DidResolutionMetadata, resolution_output::DidResolutionOutput,
DidResolvable,
},
};
use htt... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
openwallet-foundation/vcx | https://github.com/openwallet-foundation/vcx/blob/2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7/did_core/did_methods/did_resolver_web/tests/resolution.rs | did_core/did_methods/did_resolver_web/tests/resolution.rs | use std::convert::Infallible;
use did_resolver::{
did_doc::schema::did_doc::DidDocument,
did_parser_nom::Did,
traits::resolvable::{resolution_output::DidResolutionOutput, DidResolvable},
};
use did_resolver_web::resolution::resolver::DidWebResolver;
use http_body_util::{combinators::BoxBody, BodyExt, Full}... | rust | Apache-2.0 | 2d3034ed73ba8d49e0f72251b4c7cfb859a1efe7 | 2026-01-04T20:24:59.602734Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.