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
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/tasks/benchmark/src/main.rs
tasks/benchmark/src/main.rs
extern crate criterion; extern crate mdx_rs; extern crate pico_args; use criterion::{BenchmarkId, Criterion, Throughput}; use mdx_rs::compile; use pico_args::Arguments; use std::fs::File; use std::io::prelude::*; pub fn main() { let mut args = Arguments::from_env(); let baseline: Option<String> = args.opt_value_f...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/plugin_html/src/lib.rs
crates/plugin_html/src/lib.rs
//! Author: sanyuan0704 //! //! This plugin is used to serialize hast to html. use hast::Node; fn display_property_value(value: &hast::PropertyValue) -> String { match value { hast::PropertyValue::String(value) => value.clone(), hast::PropertyValue::Boolean(value) => value.to_string(), _ => "".to_string...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/slugger/src/lib.rs
crates/slugger/src/lib.rs
//! You can understand the module as `github-slugger-rs` //! //! Author: sanyuan0704 //! //! Port of <https://github.com/Flet/github-slugger> use lazy_static::lazy_static; use regex::Regex; use std::collections::HashMap; pub struct Slugger { occurrences: HashMap<String, i32>, } lazy_static! { static ref REMOVE_...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/plugin_highlighter/src/lib.rs
crates/plugin_highlighter/src/lib.rs
//! Author: shulaoda //! //! This plugin is used to collect code lang in mdx. use markdown::mdast::Node; use std::collections::HashSet; pub fn mdx_plugin_highlighter(node: &Node) -> Vec<String> { let mut languages: HashSet<String> = HashSet::new(); if let Node::Root(root) = node { for child in &root.children...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/plugin_normalize_link/src/lib.rs
crates/plugin_normalize_link/src/lib.rs
#![allow(clippy::format_in_format_args)] use std::path::Path; const PROTOCOLS: &[&str] = &["http://", "https://", "mailto:", "tel:", "javascript:", "#"]; const TEMP_VARIABLE: &str = "image_"; const IMAGE_EXTNAMES: &[&str] = &[".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp"]; const MD_EXTNAMES: &[&str] = &[".md", ".md...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/plugin_container/src/lib.rs
crates/plugin_container/src/lib.rs
//! Author: sanyuan0704 //! //! This plugin is used to parse the container in markdown. #![allow(clippy::ptr_arg)] // parse title from `title="xxx"` or `title=xxx` or `title='xxx'` pub fn parse_title_from_meta(title_meta: &str) -> String { let mut title = title_meta; let quote = title_meta.chars().nth(6).unwrap();...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
true
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/plugin_toc/src/lib.rs
crates/plugin_toc/src/lib.rs
//! Author: sanyuan0704 //! //! This plugin is used to generate toc in mdx. Features: //! 1. Collect h2 ~ h4 as toc //! 2. Collect h1 as title //! 3. Support custom id, example: `# hello world {#custom-id}` use markdown::mdast::{self, Heading}; use slugger::Slugger; use std::vec; use utils::extract_title_and_id; #[de...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/mdx_rs/src/swc_util_build_jsx.rs
crates/mdx_rs/src/swc_util_build_jsx.rs
//! Turn JSX into function calls. use crate::hast_util_to_swc::Program; use crate::mdx_plugin_recma_document::JsxRuntime; use crate::swc_utils::{ bytepos_to_point, create_bool_expression, create_call_expression, create_ident, create_ident_expression, create_member_expression_from_str, create_null_expression, cre...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
true
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/mdx_rs/src/swc.rs
crates/mdx_rs/src/swc.rs
//! Bridge between `markdown-rs` and SWC. extern crate markdown; use crate::swc_utils::{ create_span, prefix_error_with_point, DropContext, RewritePrefixContext, RewriteStopsContext, }; use markdown::{mdast::Stop, Location, MdxExpressionKind, MdxSignal}; use std::rc::Rc; use swc_core::common::{ comments::{Comment...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/mdx_rs/src/lib.rs
crates/mdx_rs/src/lib.rs
//! Public API of `mdxjs-rs`. //! //! This module exposes primarily [`compile()`][]. //! //! * [`compile()`][] //! — turn MDX into JavaScript #![deny(clippy::pedantic)] #![allow(clippy::uninlined_format_args)] #![allow(clippy::missing_panics_doc)] #![allow(clippy::must_use_candidate)] #![allow(clippy::too_many_li...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/mdx_rs/src/configuration.rs
crates/mdx_rs/src/configuration.rs
//! Configuration. use crate::mdx_plugin_recma_document::JsxRuntime; /// Like `Constructs` from `markdown-rs`. /// /// You can’t use: /// /// * `autolink` /// * `code_indented` /// * `html_flow` /// * `html_text` /// * `mdx_esm` /// * `mdx_expression_flow` /// * `mdx_expression_text` /// * `mdx_jsx_fl...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/mdx_rs/src/mdx_plugin_recma_document.rs
crates/mdx_rs/src/mdx_plugin_recma_document.rs
//! Turn a JavaScript AST, coming from MD(X), into a component. //! //! Port of <https://github.com/mdx-js/mdx/blob/main/packages/mdx/lib/plugin/recma-document.js>, //! by the same author. use crate::hast_util_to_swc::Program; use crate::swc_utils::{ bytepos_to_point, create_call_expression, create_ident, create_ide...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/mdx_rs/src/hast_util_to_swc.rs
crates/mdx_rs/src/hast_util_to_swc.rs
//! Turn an HTML AST into a JavaScript AST. //! //! Port of <https://github.com/syntax-tree/hast-util-to-estree>, by the same //! author: //! //! (The MIT License) //! //! Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com> //! //! Permission is hereby granted, free of charge, to any person obtaining //! a copy of ...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
true
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/mdx_rs/src/swc_utils.rs
crates/mdx_rs/src/swc_utils.rs
//! Lots of helpers for dealing with SWC, particularly from unist, and for //! building its ES AST. use markdown::{ id_cont, id_start, mdast::Stop, unist::{Point, Position}, Location, }; use swc_core::common::{BytePos, Span, SyntaxContext, DUMMY_SP}; use swc_core::ecma::ast::{ BinExpr, BinaryOp, Bool, CallE...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/mdx_rs/src/mdx_plugin_recma_jsx_rewrite.rs
crates/mdx_rs/src/mdx_plugin_recma_jsx_rewrite.rs
//! Rewrite JSX tags to accept them from props and an optional provider. //! //! Port of <https://github.com/mdx-js/mdx/blob/main/packages/mdx/lib/plugin/recma-jsx-rewrite.js>, //! by the same author. use crate::hast_util_to_swc::{Program, MAGIC_EXPLICIT_MARKER}; use crate::swc_utils::{ create_binary_expression, cre...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
true
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/mdx_rs/src/mdast_util_to_hast.rs
crates/mdx_rs/src/mdast_util_to_hast.rs
//! Turn a markdown AST into an HTML AST. //! //! Port of <https://github.com/syntax-tree/mdast-util-to-hast>, by the same //! author: //! //! (The MIT License) //! //! Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com> //! //! Permission is hereby granted, free of charge, to any person obtaining //! a copy of thi...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
true
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/plugin_external_link/src/lib.rs
crates/plugin_external_link/src/lib.rs
//! Author: sanyuan0704 //! //! This plugin is used to handle the external link in mdx. //! //! If the link is external, we will add the `target="_blank"` and `rel="noopener noreferrer"` attribute to the link element. fn is_external_url(url: &str) -> bool { if url.starts_with("http://") || url.starts_with("https://"...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/utils/src/lib.rs
crates/utils/src/lib.rs
//! Author: sanyuan0704 pub fn extract_title_and_id(text_value: &str) -> (String, String) { let mut title = String::new(); let mut custom_id = String::new(); if let Some(index) = text_value.find("{#") { let (mut title_part, id_part) = text_value.split_at(index); title_part = title_part.trim_end(); ti...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/hast/src/lib.rs
crates/hast/src/lib.rs
//! HTML syntax tree: [hast][]. //! //! [hast]: https://github.com/syntax-tree/hast #![allow(dead_code)] extern crate alloc; extern crate markdown; pub use markdown::mdast::{AttributeContent, AttributeValue, MdxJsxAttribute, Stop}; use markdown::unist::Position; /// Nodes. #[derive(Clone, PartialEq, Eq)] pub enum Nod...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/plugin_frontmatter/src/lib.rs
crates/plugin_frontmatter/src/lib.rs
//! Author: sanyuan0704 //! //! This plugin is used to parse the front matter in markdown and export it in mdx file. use markdown::mdast; use serde_yaml::Value; fn yaml_to_json(yaml_str: &str) -> String { if yaml_str.is_empty() { return "{}".into(); } let parsed_value: Value = serde_yaml::from_str(yaml_str) ...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/plugin_code_block/src/lib.rs
crates/plugin_code_block/src/lib.rs
//! Author: sanyuan0704 //! //! [Deprecated] //! This plugin is used to construct the code block in mdx. fn transform_pre_code_element(node: &mut hast::Node) { // find the <pre><code className="language-jsx"> // and then transform it if let hast::Node::Element(node) = node { if node.tag_name == "pre" { ...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/plugin_header_anchor/src/lib.rs
crates/plugin_header_anchor/src/lib.rs
//! Author: sanyuan0704 //! //! This plugin is used to add anchor to the header in link element. use slugger::Slugger; use utils::extract_title_and_id; fn collect_title_in_hast(node: &mut hast::Element) -> (String, String) { let mut title = String::new(); let mut id = String::new(); let mut custom_id_expression...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/binding/build.rs
crates/binding/build.rs
extern crate napi_build; fn main() { napi_build::setup(); }
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
web-infra-dev/mdx-rs
https://github.com/web-infra-dev/mdx-rs/blob/04633f3cb2d8062e2578ea02213db42c2e4a5952/crates/binding/src/lib.rs
crates/binding/src/lib.rs
#[cfg(not(all(target_os = "linux", target_env = "musl", target_arch = "aarch64")))] #[global_allocator] static ALLOC: mimalloc_rust::GlobalMiMalloc = mimalloc_rust::GlobalMiMalloc; use mdx_plugin_toc::TocItem; use mdx_rs::{self, CompileResult}; #[macro_use] extern crate napi_derive; use napi::{ bindgen_prelude::{A...
rust
MIT
04633f3cb2d8062e2578ea02213db42c2e4a5952
2026-01-04T20:17:17.706328Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/src/config.rs
src/config.rs
use crate::{FormatFn, LogId}; use log::{Level, LevelFilter, Record}; use std::ffi::CString; use std::fmt; /// Filter for android logger. #[derive(Default)] pub struct Config { pub(crate) log_level: Option<LevelFilter>, pub(crate) buf_id: Option<LogId>, filter: Option<env_filter::Filter>, pub(crate) tag...
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/src/lib.rs
src/lib.rs
// Copyright 2016 The android_logger Developers // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. This file may not be // copied, modified, or distributed except a...
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/src/arrays.rs
src/arrays.rs
use crate::LOGGING_TAG_MAX_LEN; use std::ffi::CStr; use std::mem::MaybeUninit; // FIXME: When `maybe_uninit_uninit_array` is stabilized, use it instead of this helper pub fn uninit_array<const N: usize, T>() -> [MaybeUninit<T>; N] { // SAFETY: Array contains MaybeUninit, which is fine to be uninit unsafe { May...
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/src/tests.rs
src/tests.rs
use super::*; use log::LevelFilter; use std::sync::atomic::{AtomicBool, Ordering}; #[test] fn check_config_values() { // Filter is checked in config_filter_match below. let config = Config::default() .with_max_level(LevelFilter::Trace) .with_log_buffer(LogId::System) .with_tag("my_app")...
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/src/id.rs
src/id.rs
/// Possible identifiers of a specific buffer of Android logging system for /// logging a message. #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum LogId { /// Main log buffer. /// /// This is the only log buffer available to apps. Main, /// Radio log buffer. Radio, /// Event log buff...
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/src/platform_log_writer.rs
src/platform_log_writer.rs
use crate::arrays::slice_assume_init_ref; use crate::{LOGGING_MSG_MAX_LEN, LogId, android_log, uninit_array}; use log::Level; #[cfg(target_os = "android")] use log_ffi::LogPriority; use std::ffi::CStr; use std::mem::MaybeUninit; use std::{fmt, mem, ptr}; /// The purpose of this "writer" is to split logged messages on ...
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/tests/multiple_init.rs
tests/multiple_init.rs
extern crate android_logger; extern crate log; #[test] fn multiple_init() { android_logger::init_once( android_logger::Config::default().with_max_level(log::LevelFilter::Trace), ); // Second initialization should be silently ignored android_logger::init_once( android_logger::Config::de...
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/tests/config_log_level.rs
tests/config_log_level.rs
extern crate android_logger; extern crate log; #[test] fn config_log_level() { android_logger::init_once( android_logger::Config::default().with_max_level(log::LevelFilter::Trace), ); assert_eq!(log::max_level(), log::LevelFilter::Trace); }
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/tests/default_init.rs
tests/default_init.rs
extern crate android_logger; extern crate log; #[test] fn default_init() { android_logger::init_once(Default::default()); // android_logger has default log level "off" assert_eq!(log::max_level(), log::LevelFilter::Off); }
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
rust-mobile/android_logger-rs
https://github.com/rust-mobile/android_logger-rs/blob/71fd4fd2ab3788063886fb56017597f424e511ac/examples/system_log_level_overrides.rs
examples/system_log_level_overrides.rs
//! An utility for testing the behavior of `android_logger` crate. //! //! ## Build //! //! 1. Setup [`cargo-ndk`](https://github.com/bbqsrc/cargo-ndk) //! //! ``` //! cargo install cargo-ndk //! rustup target add x86_64-linux-android //! ``` //! //! 2. Build with `cargo ndk`: //! //! ``` //! ANDROID_...
rust
Apache-2.0
71fd4fd2ab3788063886fb56017597f424e511ac
2026-01-04T20:17:15.588112Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/wql/src/test.rs
wql/src/test.rs
use super::*; use std::collections::HashMap; use uuid::Uuid; #[cfg(test)] mod test_create { use std::str::FromStr; use super::*; #[test] fn empty_wql() { let wql = Wql::from_str(""); assert_eq!(wql.err(), Some(String::from("Empty WQL"))); } #[test] fn create_shit() { ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/wql/src/select.rs
wql/src/select.rs
use serde::{Deserialize, Serialize}; use std::{collections::HashMap, str::FromStr}; use uuid::Uuid; const ALGEBRA: [&str; 6] = ["DEDUP", "GROUP", "ORDER", "OFFSET", "LIMIT", "COUNT"]; const OPERATORS: [&str; 10] = [ "ID", "IDS", "WHERE", "WHEN", "DEDUP", "GROUP", "ORDER", "OFFSET", "LIMIT", "COUNT", ]; #[derive(D...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/wql/src/lib.rs
wql/src/lib.rs
use chrono::{DateTime, Utc}; use language_parser::read_symbol; use serde::{Deserialize, Serialize}; use std::{cmp::Ordering, hash::Hash}; use std::{collections::HashMap, str::FromStr}; use uuid::Uuid; mod join; mod language_parser; mod logic; mod relation; mod select; #[cfg(test)] mod test; mod where_clause; pub use l...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/wql/src/where_clause.rs
wql/src/where_clause.rs
use std::str::FromStr; use crate::{logic::parse_value, select::algebra_functions, ToSelect, Types, Wql}; use serde::{Deserialize, Serialize}; pub fn where_selector( entity_name: String, arg: ToSelect, chars: &mut std::str::Chars, ) -> Result<Wql, String> { let mut open = chars.skip_while(|c| c.is_whit...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/wql/src/relation.rs
wql/src/relation.rs
use serde::{Deserialize, Serialize}; use std::str::FromStr; use crate::Wql; const ERROR: &str = "Supported operations for INTERSECT and DIFFERECE are KEY for mathching keys and KEY_VALUE for matching key_values"; #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub enum Relation { Difference, In...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/wql/src/language_parser.rs
wql/src/language_parser.rs
use crate::{ join::join, logic::{read_args, read_map_as_str}, relation::{relation, Relation}, select::{select_all, select_args}, }; use super::{read_map, read_match_args, FromStr, MatchCondition, Uuid, Wql}; #[allow(clippy::redundant_pub_crate)] pub(crate) fn read_symbol(a: char, chars: &mut std::str:...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/wql/src/join.rs
wql/src/join.rs
use std::str::FromStr; use crate::Wql; pub fn join(chars: &mut std::str::Chars) -> Result<Wql, String> { let mut entity_a = (String::new(), String::new()); let mut entity_b = (String::new(), String::new()); let mut ent = String::new(); let mut key = String::new(); let mut is_entity = true; lo...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/wql/src/logic.rs
wql/src/logic.rs
use chrono::{DateTime, Utc}; use uuid::Uuid; use super::{FromStr, HashMap, MatchCondition, Types}; #[allow(clippy::redundant_pub_crate)] pub(crate) fn read_match_args(chars: &mut std::str::Chars) -> Result<Vec<MatchCondition>, String> { let base = chars .skip_while(|c| c == &'(' || c.is_whitespace()) ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/main.rs
woori-db/src/main.rs
use actix_web::{ middleware::{DefaultHeaders, Logger}, web, App, HttpResponse, HttpServer, }; mod actors; #[allow(dead_code)] mod auth; mod controllers; mod core; mod http; mod io; mod model; mod repository; mod schemas; use http::{ping, readiness, routes}; #[actix_web::main] async fn main() -> std::io::Resu...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/auth/middlewares.rs
woori-db/src/auth/middlewares.rs
use crate::repository::local::{SessionContext, SessionInfo}; use actix_web::{dev::ServiceRequest, web, Error}; use actix_web_httpauth::extractors::bearer::BearerAuth; use std::{ collections::BTreeMap, sync::{Arc, Mutex}, }; use super::schemas::Role; pub async fn wql_validator( req: ServiceRequest, cre...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/auth/io.rs
woori-db/src/auth/io.rs
use std::{ fs::OpenOptions, io::{BufRead, BufReader, Seek, SeekFrom, Write}, }; use crate::model::error::Error; use bcrypt::{hash, DEFAULT_COST}; use chrono::{DateTime, Utc}; use ron::from_str; use uuid::Uuid; use super::models::{AdminInfo, User, UserRegistry}; use super::schemas; pub fn read_admin_info() ->...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/auth/mod.rs
woori-db/src/auth/mod.rs
pub(crate) mod controllers; pub(crate) mod io; #[cfg(not(debug_assertions))] pub(crate) mod middlewares; pub(crate) mod models; pub(crate) mod schemas;
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/auth/controllers.rs
woori-db/src/auth/controllers.rs
use std::sync::{Arc, Mutex}; use actix_web::{web, HttpResponse, Responder}; use bcrypt::hash; use chrono::Utc; use ron::de::from_str; use uuid::Uuid; use crate::{ core::pretty_config_output, model::{ error::{error_to_http, Error}, DataI64, }, repository::local::{SessionContext, Session...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/auth/schemas.rs
woori-db/src/auth/schemas.rs
use serde::{Deserialize, Serialize}; use uuid::Uuid; #[derive(Serialize, Deserialize)] pub struct CreateUserWithAdmin { pub admin_id: String, pub admin_password: String, pub user_info: UserInfo, } #[derive(Serialize, Deserialize)] pub struct DeleteUsersWithAdmin { pub admin_id: String, pub admin_p...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/auth/models.rs
woori-db/src/auth/models.rs
use bcrypt::verify; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use uuid::Uuid; use crate::{core::pretty_config_inner, model::error::Error}; use super::schemas::Role; #[derive(Serialize, Deserialize)] pub struct AdminInfo { admin_id: String, admin_hash: String, cost: u32, } impl Ad...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/schemas/tx.rs
woori-db/src/schemas/tx.rs
#[cfg(not(feature = "json"))] use crate::core::pretty_config_output; use serde::{Deserialize, Serialize}; use uuid::Uuid; #[derive(Debug, Clone, Serialize, Deserialize)] pub enum TxType { Create, Insert, UpdateSet, UpdateContent, Delete, EvictEntity, EvictEntityTree, } #[derive(Debug, Clon...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/schemas/error.rs
woori-db/src/schemas/error.rs
use crate::core::pretty_config_output; use serde::Serialize; use std::fmt; #[derive(Debug, Clone, Serialize)] pub struct Response { error_type: String, error_message: String, } impl Response { pub fn new(error_type: String, error_message: String) -> Self { Self { error_type, ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/schemas/history.rs
woori-db/src/schemas/history.rs
use chrono::{DateTime, Utc}; use serde::Deserialize; use uuid::Uuid; #[derive(Debug, Clone, Deserialize)] pub struct EntityHistoryInfo { pub entity_key: String, pub entity_id: Uuid, pub start_datetime: Option<DateTime<Utc>>, pub end_datetime: Option<DateTime<Utc>>, }
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/schemas/mod.rs
woori-db/src/schemas/mod.rs
pub mod error; pub mod history; pub mod query; pub mod tx;
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/schemas/query.rs
woori-db/src/schemas/query.rs
use std::collections::{BTreeMap, HashMap}; use crate::{core::pretty_config_output, model::error::Error}; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use uuid::Uuid; use wql::Types; #[derive(Debug, Clone, Deserialize, Serialize)] pub struct CountResponse { response: Box<Response>, count: ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/model/wql.rs
woori-db/src/model/wql.rs
use std::collections::HashMap; use uuid::Uuid; use wql::{MatchCondition, Types}; #[derive(Debug, PartialEq)] pub enum Action { CreateEntity, Insert, Read, UpdateSet, UpdateContent, Delete, EvictEntity, EvictEntityId, Error, } impl std::fmt::Display for Action { fn fmt(&self, f...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/model/error.rs
woori-db/src/model/error.rs
use actix::MailboxError; use actix_web::{error, HttpResponse}; use std::io; use uuid::Uuid; use wql::Types; use crate::schemas::error::Response; #[derive(Debug)] pub enum Error { Io(io::Error), QueryFormat(String), InvalidQuery, EntityAlreadyCreated(String), EntityNotCreated(String), EntityNo...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/model/mod.rs
woori-db/src/model/mod.rs
pub(crate) mod error; pub(crate) mod wql; use actix::prelude::*; use actix_web::web; use serde::{Deserialize, Serialize}; use std::{ io::Error, sync::{atomic::AtomicUsize, Arc, Mutex}, }; use crate::{ actors::wql::Executor, repository::local::{EncryptContext, LocalContext, UniquenessContext}, }; pub ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/clauses.rs
woori-db/src/controllers/clauses.rs
use std::collections::{BTreeMap, HashMap}; use rayon::prelude::*; use uuid::Uuid; use wql::{Algebra, Clause, ToSelect, Types, Value}; use crate::{ core::registry::get_registries, model::{error::Error, DataLocalContext, DataRegister}, schemas::query::Response as QueryResponse, }; use crate::core::query::{...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/query_test.rs
woori-db/src/controllers/query_test.rs
use crate::{http::routes, schemas::tx::TxResponse}; use actix_http::body::ResponseBody; use actix_web::{body::Body, test, App}; #[ignore] #[actix_rt::test] async fn test_select_all_id_post_ok() { let mut app = test::init_service(App::new().configure(routes)).await; let req = test::TestRequest::post() ....
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/json_history_test.rs
woori-db/src/controllers/json_history_test.rs
use crate::{auth::schemas::UserId, http::routes, schemas::tx::InsertEntityResponse}; use actix_http::body::ResponseBody; use actix_web::{body::Body, test, App}; use uuid::Uuid; #[actix_rt::test] async fn test_history_ok() { let mut app = test::init_service(App::new().configure(routes)).await; let req = test::T...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/relation.rs
woori-db/src/controllers/relation.rs
use std::collections::HashMap; use wql::{RelationType, ToSelect, Wql}; use crate::{ model::{error::Error, DataExecutor, DataLocalContext}, schemas::query::Response, }; use super::{ clauses::select_where_controller, query::{ select_all, select_all_id_when_controller, select_all_with_id, select...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/tx.rs
woori-db/src/controllers/tx.rs
use crate::core::tx_time; use crate::schemas::tx::{TxResponse, TxType}; use crate::{ actors::{ encrypts::{CreateWithEncryption, EncryptContent, WriteWithEncryption}, recovery::{LocalData, OffsetCounter}, state::{MatchUpdate, PreviousRegistry, State}, uniques::{CreateWithUniqueKeys, W...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/entity_history_test.rs
woori-db/src/controllers/entity_history_test.rs
use crate::{http::routes, schemas::tx::TxResponse}; use actix_http::body::ResponseBody; use actix_web::{body::Body, test, App}; use chrono::Utc; use std::{thread, time}; #[actix_rt::test] async fn test_history_ok() { let mut app = test::init_service(App::new().configure(routes)).await; let req = test::TestRequ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/clauses_test.rs
woori-db/src/controllers/clauses_test.rs
use std::collections::{BTreeMap, HashMap}; use crate::http::routes; use actix_http::body::ResponseBody; use actix_web::{body::Body, test, App}; use uuid::Uuid; use wql::Types; use super::tx_test::clear; #[ignore] #[actix_rt::test] async fn simple_where_clause_eq() { let mut app = test::init_service(App::new().co...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/mod.rs
woori-db/src/controllers/mod.rs
#[cfg(test)] pub mod algebra_test; pub mod clauses; #[cfg(test)] pub mod clauses_test; pub(crate) mod entity_history; #[cfg(all(test, feature = "history"))] pub mod entity_history_test; #[cfg(all(test, feature = "history", feature = "json"))] pub mod json_history_test; pub(crate) mod query; #[cfg(test)] pub mod query_t...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/query.rs
woori-db/src/controllers/query.rs
use std::{ collections::{BTreeMap, HashMap, HashSet}, str::FromStr, }; use actix_web::{HttpResponse, Responder}; use rayon::prelude::*; use uuid::Uuid; use wql::{ToSelect, Types, Wql}; use crate::{ actors::{ encrypts::VerifyEncryption, state::State, when::{ReadEntitiesAt, ReadEntit...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/entity_history.rs
woori-db/src/controllers/entity_history.rs
use crate::model::error::{error_to_http, Error}; use crate::{ actors::history::History, core::pretty_config_output, model::{DataExecutor, DataLocalContext}, schemas::history::EntityHistoryInfo, }; use actix_web::{HttpResponse, Responder}; use chrono::{DateTime, Utc}; use rayon::prelude::*; use std::col...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/algebra_test.rs
woori-db/src/controllers/algebra_test.rs
use std::collections::BTreeMap; use crate::http::routes; use actix_http::{body::ResponseBody, Request}; use actix_web::{body::Body, test, App}; use std::collections::HashMap; use uuid::Uuid; use wql::Types; #[ignore] #[actix_rt::test] async fn test_select_all_limit_offset_ok() { let mut app = test::init_service(A...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/relation_test.rs
woori-db/src/controllers/relation_test.rs
use crate::http::routes; use actix_http::{body::ResponseBody, Request}; use actix_web::{body::Body, test, App}; use uuid::Uuid; #[actix_rt::test] async fn test_intersect_key() { let mut app = test::init_service(App::new().configure(routes)).await; let req = test::TestRequest::post() .header("Content-Ty...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/controllers/tx_test.rs
woori-db/src/controllers/tx_test.rs
use crate::io::read; use crate::{http::routes, schemas::tx::TxResponse}; use actix_http::body::ResponseBody; use actix_web::{body::Body, test, App}; use uuid::Uuid; #[actix_rt::test] async fn test_create_post_ok() { let mut app = test::init_service(App::new().configure(routes)).await; let req = test::TestReque...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
true
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/actors/uniques.rs
woori-db/src/actors/uniques.rs
use std::{ collections::{HashMap, HashSet}, sync::{Arc, Mutex}, }; use actix::prelude::*; use ron::ser::to_string_pretty; use serde::Serialize; use wql::Types; use crate::{ actors::wql::Executor, core::pretty_config_inner, io::write::unique_data, model::error::Error, repository::local::UniquenessConte...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/actors/wql.rs
woori-db/src/actors/wql.rs
use actix::prelude::*; use chrono::{DateTime, Utc}; use std::io::Error; use uuid::Uuid; use crate::core::wql::{ create_entity, delete_entity_content, evict_entity_content, evict_entity_id_content, insert_entity_content, update_content_entity_content, update_set_entity_content, }; pub struct Executor; impl Ac...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/actors/state.rs
woori-db/src/actors/state.rs
use actix::prelude::*; use rayon::prelude::*; use std::collections::HashMap; use wql::{MatchCondition, Types}; use crate::actors::wql::Executor; use crate::{model::error::Error, repository::local::StateInfo}; pub struct State(pub String); impl Message for State { type Result = Result<HashMap<String, Types>, Erro...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/actors/when.rs
woori-db/src/actors/when.rs
use actix::prelude::*; use chrono::{DateTime, Utc}; use std::collections::{BTreeMap, HashMap, HashSet}; use uuid::Uuid; use wql::Types; use crate::{core::query::filter_keys_and_hash, io::read::read_date_log, model::error::Error}; use super::wql::Executor; pub struct ReadEntityRange { entity_name: String, uuid...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/actors/history.rs
woori-db/src/actors/history.rs
use actix::prelude::*; use chrono::{DateTime, Utc}; use std::collections::HashMap; use wql::Types; use crate::model::error::Error; use crate::{actors::wql::Executor, model::DataRegister}; pub type HistoryRegistry = (HashMap<String, Types>, DateTime<Utc>, Option<DataRegister>); pub struct History(pub String); impl Me...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/actors/mod.rs
woori-db/src/actors/mod.rs
pub mod encrypts; pub mod history; pub mod recovery; pub mod scheduler; pub mod state; pub mod uniques; pub mod when; pub mod wql;
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/actors/encrypts.rs
woori-db/src/actors/encrypts.rs
use std::{ collections::{HashMap, HashSet}, sync::{Arc, Mutex}, }; use actix::prelude::*; use chrono::{DateTime, Utc}; use rayon::prelude::*; use ron::ser::{to_string_pretty, PrettyConfig}; use serde::{Deserialize, Serialize}; use wql::Types; use crate::{ actors::wql::Executor, model::error::Error, reposi...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/actors/recovery.rs
woori-db/src/actors/recovery.rs
use actix::prelude::*; use crate::{ core::pretty_config_inner, io::write::{local_data, offset_counter}, model::error::Error, repository::local::LocalContext, }; use super::wql::Executor; pub struct OffsetCounter { pub offset: usize, } impl OffsetCounter { pub fn new(offset: usize) -> Self { ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/actors/scheduler.rs
woori-db/src/actors/scheduler.rs
use actix::prelude::*; use chrono::{Local, TimeZone, Utc}; use cron::Schedule; use std::{ fs::OpenOptions, io::{BufReader, BufWriter}, path::PathBuf, process::Command, str::FromStr, time::Duration, }; pub struct Scheduler; impl Actor for Scheduler { type Context = Context<Self>; fn st...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/repository/local.rs
woori-db/src/repository/local.rs
use std::collections::{BTreeMap, HashMap, HashSet}; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use uuid::Uuid; use crate::{auth::schemas::Role, model::DataRegister}; pub type StateInfo = (DataRegister, Vec<u8>); pub type LocalContext = BTreeMap<String, BTreeMap<Uuid, StateInfo>>; pub type Uniq...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/repository/mod.rs
woori-db/src/repository/mod.rs
pub(crate) mod local;
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/core/wql.rs
woori-db/src/core/wql.rs
use std::collections::HashMap; use chrono::{DateTime, Utc}; use uuid::Uuid; use wql::Types; use crate::{ actors::wql::{ DeleteId, EvictEntityId, InsertEntityContent, UpdateContentEntityContent, UpdateSetEntityContent, }, core::pretty_config_inner, model::wql::Action, }; use ron::ser::t...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/core/registry.rs
woori-db/src/core/registry.rs
use std::collections::BTreeMap; use uuid::Uuid; use crate::{ model::{error::Error, DataLocalContext}, repository::local::StateInfo, }; pub fn get_registries( entity: &str, local_data: &DataLocalContext, ) -> Result<BTreeMap<Uuid, StateInfo>, Error> { let local_data = if let Ok(guard) = local_data...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/core/mod.rs
woori-db/src/core/mod.rs
extern crate wql as ewql; use std::collections::HashMap; use chrono::{DateTime, Utc}; use ewql::Types; use ron::ser::PrettyConfig; use crate::model::error::Error; pub(crate) mod query; pub(crate) mod registry; pub(crate) mod wql; pub fn pretty_config_output() -> PrettyConfig { PrettyConfig::new() .separ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/core/query.rs
woori-db/src/core/query.rs
use std::{ cmp::Ordering, collections::{BTreeMap, HashMap, HashSet}, }; use rayon::prelude::*; use uuid::Uuid; use wql::{Algebra, Types}; use crate::{ model::DataRegister, schemas::query::{CountResponse, Response as QueryResponse}, }; pub(crate) fn filter_keys_and_hash( state: HashMap<String, Typ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/io/write.rs
woori-db/src/io/write.rs
use chrono::{DateTime, Utc}; use std::io::{Error, Seek, SeekFrom}; use std::path::Path; use std::{fs::OpenOptions, io::Write}; pub fn write_to_log(log: &str) -> Result<(usize, bool), Error> { let utc: DateTime<Utc> = Utc::now(); let date_log = utc.format("data/%Y_%m_%d.log").to_string(); let is_empty = !Pa...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/io/mod.rs
woori-db/src/io/mod.rs
pub(crate) mod read; pub(crate) mod write;
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/io/read.rs
woori-db/src/io/read.rs
use std::{ collections::{BTreeMap, HashMap, HashSet}, fs::OpenOptions, io::{BufReader, Error, Read, Seek, SeekFrom}, }; use rayon::prelude::*; use crate::{actors::encrypts::WriteWithEncryption, model::DataRegister}; use crate::{model::error, repository::local::LocalContext}; #[cfg(test)] pub fn assert_co...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/src/http/mod.rs
woori-db/src/http/mod.rs
#[cfg(not(debug_assertions))] use crate::auth::{ controllers as auth, io::read_admin_info, middlewares::{history_validator, wql_validator}, }; #[cfg(not(debug_assertions))] use actix_web_httpauth::middleware::HttpAuthentication; use crate::{ actors::{scheduler::Scheduler, wql::Executor}, controller...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/benches/wql.rs
woori-db/benches/wql.rs
use std::str::FromStr; use criterion::{criterion_group, criterion_main, Criterion}; use wql::Wql; fn criterion_benchmark(c: &mut Criterion) { c.bench_function("create_entity", |b| { b.iter(|| Wql::from_str("create entity my_entity")) }); c.bench_function("inser_entity", |b| { b.iter(|| Wq...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/benches/tx.rs
woori-db/benches/tx.rs
use criterion::{criterion_group, criterion_main, Criterion}; use rand::prelude::*; use serde::{Deserialize, Serialize}; use std::process::Command; use uuid::Uuid; fn criterion_benchmark(c: &mut Criterion) { let entity = get_rand_value(); let ent_str = entity.as_str(); c.bench_function("create_entity", |b| ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/benches/history.rs
woori-db/benches/history.rs
use criterion::{criterion_group, criterion_main, Criterion}; use rand::prelude::*; use serde::{Deserialize, Serialize}; use std::process::Command; use uuid::Uuid; fn criterion_benchmark(c: &mut Criterion) { let ent_str = "test_history_bench"; curl_create(ent_str); let id = curl_insert_with_id(ent_str); ...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
naomijub/wooridb
https://github.com/naomijub/wooridb/blob/bcef59acbf1bb1509a8b3d1b2f914e45921ba026/woori-db/benches/query.rs
woori-db/benches/query.rs
use criterion::{criterion_group, criterion_main, Criterion}; use std::process::Command; fn criterion_benchmark(c: &mut Criterion) { let ent_str = "bench_entity_name"; curl_create(ent_str); curl_insert(ent_str); c.bench_function("select_all_1_entity", |b| b.iter(|| curl_select(ent_str))); curl_inse...
rust
MIT
bcef59acbf1bb1509a8b3d1b2f914e45921ba026
2026-01-04T20:17:21.692961Z
false
KallDrexx/mmids
https://github.com/KallDrexx/mmids/blob/3d732616da3bc8976dbcd5f859758ed3f06dc38f/mmids-rtmp/src/lib.rs
mmids-rtmp/src/lib.rs
//! RTMP components for mmids. Includes the ability for a mmids application to act as an RTMP and //! RTMPS server, accepting connections by RTMP clients and having their media routed into //! mmids workflows pub mod rtmp_server; pub mod utils; pub mod workflow_steps;
rust
MIT
3d732616da3bc8976dbcd5f859758ed3f06dc38f
2026-01-04T20:17:23.887411Z
false
KallDrexx/mmids
https://github.com/KallDrexx/mmids/blob/3d732616da3bc8976dbcd5f859758ed3f06dc38f/mmids-rtmp/src/utils.rs
mmids-rtmp/src/utils.rs
use mmids_core::VideoTimestamp; use rml_rtmp::sessions::StreamMetadata; use rml_rtmp::time::RtmpTimestamp; use std::collections::HashMap; use std::time::Duration; use tracing::error; /// Creates a new video timestamp from RTMP data. RTMP packets contain a timestamp in the /// RTMP header itself and a composition time...
rust
MIT
3d732616da3bc8976dbcd5f859758ed3f06dc38f
2026-01-04T20:17:23.887411Z
false
KallDrexx/mmids
https://github.com/KallDrexx/mmids/blob/3d732616da3bc8976dbcd5f859758ed3f06dc38f/mmids-rtmp/src/rtmp_server/mod.rs
mmids-rtmp/src/rtmp_server/mod.rs
//! This endpoint acts as a server for RTMP clients that want to publish or watch RTMP live streams. //! Workflow steps send a message requesting to allow RTMP publishers or watchers for specific //! port, RTMP application and stream key combinations. The RTMP server endpoint will register the //! specified port with ...
rust
MIT
3d732616da3bc8976dbcd5f859758ed3f06dc38f
2026-01-04T20:17:23.887411Z
false
KallDrexx/mmids
https://github.com/KallDrexx/mmids/blob/3d732616da3bc8976dbcd5f859758ed3f06dc38f/mmids-rtmp/src/rtmp_server/actor/actor_types.rs
mmids-rtmp/src/rtmp_server/actor/actor_types.rs
use super::connection_handler::{ConnectionRequest, ConnectionResponse}; use super::{RtmpEndpointPublisherMessage, RtmpEndpointRequest, StreamKeyRegistration}; use crate::rtmp_server::{ IpRestriction, RtmpEndpointMediaData, RtmpEndpointMediaMessage, RtmpEndpointWatcherNotification, ValidationResponse, }; use byt...
rust
MIT
3d732616da3bc8976dbcd5f859758ed3f06dc38f
2026-01-04T20:17:23.887411Z
false
KallDrexx/mmids
https://github.com/KallDrexx/mmids/blob/3d732616da3bc8976dbcd5f859758ed3f06dc38f/mmids-rtmp/src/rtmp_server/actor/mod.rs
mmids-rtmp/src/rtmp_server/actor/mod.rs
pub mod actor_types; mod connection_handler; #[cfg(test)] mod tests; use super::{ RtmpEndpointMediaData, RtmpEndpointPublisherMessage, RtmpEndpointRequest, StreamKeyRegistration, }; use crate::rtmp_server::actor::connection_handler::ConnectionResponse; use crate::rtmp_server::actor::internal_futures::notify_on_va...
rust
MIT
3d732616da3bc8976dbcd5f859758ed3f06dc38f
2026-01-04T20:17:23.887411Z
true
KallDrexx/mmids
https://github.com/KallDrexx/mmids/blob/3d732616da3bc8976dbcd5f859758ed3f06dc38f/mmids-rtmp/src/rtmp_server/actor/connection_handler.rs
mmids-rtmp/src/rtmp_server/actor/connection_handler.rs
use super::RtmpEndpointPublisherMessage; use crate::rtmp_server::RtmpEndpointMediaData; use anyhow::{anyhow, Result}; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use bytes::{BufMut, Bytes, BytesMut}; use mmids_core::actor_utils::{notify_on_unbounded_closed, notify_on_unbounded_recv}; use mmids_core::net::t...
rust
MIT
3d732616da3bc8976dbcd5f859758ed3f06dc38f
2026-01-04T20:17:23.887411Z
true
KallDrexx/mmids
https://github.com/KallDrexx/mmids/blob/3d732616da3bc8976dbcd5f859758ed3f06dc38f/mmids-rtmp/src/rtmp_server/actor/tests/test_context.rs
mmids-rtmp/src/rtmp_server/actor/tests/test_context.rs
use crate::rtmp_server::actor::tests::rtmp_client::RtmpTestClient; use crate::rtmp_server::{ start_rtmp_server_endpoint, IpRestriction, RtmpEndpointMediaMessage, RtmpEndpointPublisherMessage, RtmpEndpointRequest, RtmpEndpointWatcherNotification, StreamKeyRegistration, }; use mmids_core::{test_utils, StreamI...
rust
MIT
3d732616da3bc8976dbcd5f859758ed3f06dc38f
2026-01-04T20:17:23.887411Z
false