Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

rust-scholar-transformer

Latest version: v0.3.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: arabangoo
0 Stars
0 Forks
1 Versions
77 Downloads
Rust Repo language

Scan summary

rust-scholar-transformer was last scanned on 29 Nov 2026 at version 0.3.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 29 Nov 2026.
  • Findings: No rules fired in version 0.3.0.
  • Downloads: 77 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.3.0 LATEST 29 Nov 2026 No rules fired

No rules fired in 0.3.0

Findings

Findings for v0.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.3.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

rust_scholar_transformer

A real-time multi-source retrieval core engine, written in Rust.

It fetches arXiv, Semantic Scholar, news, blogs, YouTube, and the web concurrently, then runs normalize -> deduplicate -> rank fusion -> caching, and exposes a search core that an LLM or Python uses with a one-line import.

This document is the complete developer manual for the library. It covers the design philosophy, the public API, per-source behavior and limitations, Python usage, how to add a new source, and the build and test workflow.

Key references

  1. Reciprocal Rank Fusion outperforms Condorcet and individual Rank Learning Methods (Cormack et al., SIGIR 2009) - https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf
  2. LSHBloom: Memory-efficient, Extreme-scale Document Deduplication (2024) - https://arxiv.org/abs/2411.04257
  3. Precise Zero-Shot Dense Retrieval without Relevance Labels (HyDE, 2022) - https://arxiv.org/abs/2212.10496

Table of Contents

  1. Key Features
  2. Quick Start
  3. Installation and Cargo Features
  4. Architecture
  5. Common Data Model Reference
  6. Public API Reference
  7. Per-Source Behavior and Maturity
  8. Deduplication and Rank Fusion
  9. Cache and Rate Limiting
  10. Python Bindings (PyO3)
  11. Embedding into a Service Pipeline
  12. Adding a New Source Adapter
  13. Build, Feature Combinations, and Testing
  14. Directory Layout
  15. License
  16. Changelog

1. Key Features

In a RAG / research agent, external knowledge retrieval (the latest papers, news, and web) directly determines answer quality, yet the Rust ecosystem lacks a single core that federates, normalizes, deduplicates, and re-ranks multiple sources asynchronously. This library is not a plain fetch; it aims to be a collection, normalization, and ranking engine that prepares material an LLM can trust and cite.

Principle What it means
Multi-source federation One query fetches arXiv, Semantic Scholar, news, blogs, YouTube, and web concurrently (tokio fan-out) and normalizes them into a single Document.
Deterministic local processing Live API results are non-deterministic, but the local processing (normalization, deduplication, rank fusion) is deterministic: the same per-source result lists always yield the same order and dedup outcome, regardless of which source answered first.
Plugin-extensible A new source needs only one trait, Source. The core stays untouched.
Resilient If one source fails or times out, the rest of the results survive and the failure is reported as a warning in the SearchReport.
Model-free, zero-FFI by default The default build is pure Rust with no neural-network or LLM dependency. Semantic understanding, summarization, and re-ranking are the caller's (LLM's) job.
Why multi-source federation

A single fetch is network-bound, so the language difference is small. Where Rust makes a difference is large concurrent fan-out plus result post-processing (normalization, deduplication, rank fusion, caching): these are CPU and concurrency work, where GIL-free Rust wins on throughput and memory.

one LLM's fetch(url) = fetch a single page
this engine = fetch many sources at once -> normalize -> deduplicate -> rank fusion -> prepare citable material

There is one boundary between the core and the caller: can it be done deterministically without a model (core), or does it require understanding and generating meaning (caller). What to search, summarizing results, generating answers, and semantic re-ranking are the caller's job (LLM/Python).


2. Quick Start

Rust library
use rust_scholar_transformer::{ArxivSource, Engine, GoogleNewsSource, SearchQuery};

#[tokio::main]
async fn main() {
    let mut engine = Engine::new();
    engine.register(Box::new(ArxivSource::new()));       // no key needed
    engine.register(Box::new(GoogleNewsSource::new()));  // no key needed

    let report = engine.search(SearchQuery::from_text("agentic loop engineering", 20)).await;
    for d in &report.docs {
        println!("[{:?}] {} ({})", d.source, d.title, d.url);
    }
    for w in &report.warnings {
        eprintln!("warning from {:?}: {}", w.source, w.message);
    }
}
Python

Results are returned as a JSON string (serialization stability first).

import json
from rust_scholar_transformer import Retriever

r = Retriever(sources=["arxiv", "news"])          # works with zero keys
report = json.loads(r.search("agentic loop engineering", limit=20))
for d in report["docs"]:
    print(d["source"], d["title"], d["url"])
for w in report["warnings"]:                      # includes sources that returned nothing
    print("warning:", w["source"], w["message"])

Write focused queries. Terms are combined with AND, so a long natural-language sentence can legitimately return nothing. Use two or three keywords, or quote a phrase, and narrow by arXiv category when it helps:

r = Retriever(sources=["arxiv"], arxiv_categories=["cs.CL", "eess.AS"])
report = json.loads(r.search('"speaker diarization" whisper', limit=10))

Date windows, sort order, citation counts, and caching are optional arguments:

r = Retriever(sources=["arxiv", "s2"], cache="memory")
report = json.loads(r.search('"speaker diarization"', limit=10,
                             sort="citations", from_date="2024-01-01", to_date="2025-12-31"))
for d in report["docs"]:
    print(d["sources"], d["extra"].get("citationCount"), d["title"])

3. Installation and Cargo Features

Cargo.toml:

[dependencies]
rust_scholar_transformer = "0.3"
Feature list
Feature Enables Notes
(default) all source adapters + L1 in-memory cache + rate limiting pure Rust, zero FFI
cache-disk L2 disk cache redb (pure Rust, expiry checks)
python PyO3 cdylib bindings pyo3 (abi3, Python 3.9+)
# default = []  # free, keyless core + all adapters, zero FFI
rust_scholar_transformer = { version = "0.3", features = ["cache-disk"] }

The default build requires no external .so/.dll and no subprocess. The L1 cache (moka) and rate limiter are pure Rust and included by default; only the disk cache (redb) and Python bindings (pyo3) are explicit features. The published Python wheel is built with both python and cache-disk. Transport security uses rustls (avoiding a system OpenSSL dependency).


4. Architecture

SearchQuery -> Engine (fan-out + per-source concurrency cap + rate limit) -> [Source adapters run concurrently]
    -> normalize (single Document) -> results reordered by registration order
    -> identity grouping + weighted RRF fusion -> MinHash-LSH near-duplicate
    -> recency/date filter -> cache (successful reports only) -> SearchReport (docs + warnings)

The heart of it is the single Document layer and the Source trait abstraction. Each adapter normalizes a source's own response into a Document, and the engine performs fusion, deduplication, and filtering without knowing the source kind.

  • Collection: an adapter is registered in the Engine as a Source implementation. If a per-source rate policy exists, a limiter is attached automatically at registration.
  • Fusion: per-source result order is preserved and fused with RRF; when the same document appears in multiple sources, its rank contributions add up.
  • Deduplication: identity-based (identifier) merging plus MinHash-LSH near-duplicate merging.
  • Filter and cache: after a recency/date filter, top results are loaded into the cache and returned.

Because it calls live external APIs, the results themselves are non-deterministic. Determinism applies only to the local processing (normalization, deduplication, rank fusion).


5. Common Data Model Reference

The model module. Every type implements serde::{Serialize, Deserialize}.

pub struct Document {
    pub identity:     DocIdentity,           // deduplication key
    pub source:       SourceKind,            // Arxiv | News | Blog | Youtube | Web | Scholar
    pub title:        String,
    pub url:          String,
    pub authors:      Vec<Author>,
    pub published_at: Option<DateTime<Utc>>,
    pub fetched_at:   DateTime<Utc>,
    pub summary:      Option<String>,
    pub content:      Option<String>,
    pub language:     Option<String>,
    pub tags:         Vec<String>,
    pub sources:      Vec<SourceKind>,       // sources that provided the same document (merge tracking)
    pub score:        Score,
    pub extra:        HashMap<String, serde_json::Value>, // per-source raw data preserved
}

pub struct DocIdentity {
    pub doi:           Option<String>,
    pub arxiv_id:      Option<String>,       // normalized: 2301.00001v2 -> 2301.00001
    pub canonical_url: Option<String>,       // canonical URL after removing tracking parameters
    pub title_hash:    u64,                  // fallback when no identifier (FNV-1a)
}

pub struct Author { pub name: String, pub id: Option<String> }

/// Serialized as the enum name by serde. `Scholar` is Semantic Scholar (added in 0.3.0).
pub enum SourceKind { Arxiv, News, Blog, Youtube, Web, Scholar }

pub struct Score {
    pub fused:     f64,   // (weighted) RRF fusion result: the primary sort axis
    pub freshness: f64,   // freshness: the first tie-breaker
    pub authority: f64,   // per-source-kind prior, reported only (not used for ordering)
    pub relevance: f64,   // reserved; not populated by the core (always 0.0)
}

What the date and metadata fields mean, per source:

Field arXiv Semantic Scholar RSS / news
published_at first submission (<published>) publicationDate (midnight UTC; the venue's date, which may differ from the arXiv date) the item's pubDate
fetched_at when this engine received the response same same
extra primaryCategory, updated (last revision) citationCount, influentialCitationCount, year, venue, s2PaperId, openAccessPdf none
tags all arXiv categories fieldsOfStudy none

A missing citationCount means the source did not report one; 0 means the paper has no counted citations. Citation counts are an attention signal from one index, not a measure of correctness.

Query type:

pub struct SearchQuery {
    pub text:            String,
    pub sources:         Vec<SourceKind>,   // empty = all registered sources
    pub limit:           usize,             // unified top-K (not the per-source fetch count)
    pub language:        Option<String>,
    pub recency:         Option<Recency>,   // Day | Week | Month | Year
    pub from_date:       Option<DateTime<Utc>>,
    pub to_date:         Option<DateTime<Utc>>,
    pub sort:            SortOrder,         // Recent (default) | Relevance | Citations
    pub include_content: bool,              // not implemented: a Notice warning says so
    pub expansions:      Vec<String>,       // not implemented: a Notice warning says so
}

// helpers: SearchQuery::from_text(text, limit) .with_sources(vec![..]) .with_sort(SortOrder::Citations)
//          .with_recency(Recency::Month) .with_dates(Some(from), Some(to))

Query semantics:

  • sort orders results inside each source. The final list is always in fused (RRF) order, so sort="citations" with several sources gives "the most cited candidates from Semantic Scholar, fused with the others", not a citation-ordered list. For a strictly citation-ordered list, query Semantic Scholar alone.
  • recency and from_date/to_date combine into one window; the narrower lower bound wins. recency counts back from now in exact durations (Month is 31 days), not whole calendar days.
  • to_date given as a date covers that whole day (a document published at 15:00 on the to_date is kept).
  • Documents with no publication date are kept by the date filter, because "unknown" is not "outside the window".
  • from_date after to_date returns no documents and an error warning without calling any source.

6. Public API Reference

6.1 The Source Trait

Implemented by every source adapter. A new source implements only this and registers with the engine.

#[async_trait::async_trait]
pub trait Source: Send + Sync {
    fn kind(&self) -> SourceKind;
    async fn search(&self, query: &SearchQuery) -> Result<Vec<Document>, FetchError>;
    // what the engine calls; the default wraps `search` with no notes
    async fn search_with_notes(&self, query: &SearchQuery) -> Result<SourceOutput, FetchError>;
    fn rate_policy(&self) -> RatePolicy;   // default implementation provided
}

pub struct SourceOutput { pub docs: Vec<Document>, pub notes: Vec<SourceNote> }
pub struct SourceNote   { pub kind: WarningKind, pub message: String }   // SourceNote::notice(..), ::partial(..)

pub struct RatePolicy { pub min_interval_ms: u64, pub max_concurrency: usize, pub daily_quota: Option<u32> }

Override search_with_notes when a source has something to say besides its documents: a partial failure inside the source, or a requested option it could only approximate. daily_quota is not enforced by the engine yet.

6.2 Engine

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases rust-scholar-transformer

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Frame 2085668439 (1)
Group 1261154229