SShortSingh.
Back to feed

Keylight Crate Enables Offline License Validation in Rust Apps

0
·1 views

Keylight is a Rust crate that allows desktop and CLI applications to validate software licenses without an internet connection. It uses Ed25519-signed JSON documents called leases, which apps verify locally using a bundled public key — requiring no server call at startup. The system separates two distinct tasks: offline verification of license authenticity and periodic background revalidation to detect server-side changes like refunds or revocations. At launch, the app checks a cached lease instantly; network calls only occur when a scheduled revalidation is due. The synchronous crate uses blocking HTTP via ureq, requires no async runtime, and exposes a standalone verify_lease function for flexible use in custom gating logic or CLI tools.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

A Practical Manual Checklist to Improve Web Page Readability on Mobile

Many web pages that look polished on desktops become difficult to navigate on small screens due to issues like tiny text, crowded buttons, and oversized images. A short manual review can catch most mobile readability problems without requiring advanced tools. Key checks include verifying that body text is legible without zooming, ensuring tap targets are well-spaced, and confirming that images resize correctly without triggering horizontal scrolling. Paragraph length also matters, as desktop-friendly text can appear as dense, tiring blocks on a phone. Simple adjustments such as improved spacing, shorter paragraphs, and adequately sized buttons can significantly enhance the mobile reading experience.

0
ProgrammingDEV Community ·

Developer Builds Two Local AI Desktop Tools Using Claude CLI Instead of API Keys

A developer has released two Python-based AI desktop tools — Rasco, a JARVIS-style assistant that executes system commands, and Gosi, a coding assistant that reads local project files to answer context-specific questions. Both tools run entirely on the user's machine using Python and Tkinter, with no direct cloud API calls. Instead of using pay-per-token API keys, they route prompts through the Claude Code CLI via subprocess, requiring only an existing Claude Pro or Max subscription. Rasco handles over 40 predefined system actions and falls back to Claude for anything unrecognised, while Gosi uses a relevance-scoring algorithm to select the most pertinent files before querying the model. The approach eliminates extra API costs for developers already subscribed to Claude Code, though it does depend on that subscription as a prerequisite.

0
ProgrammingDEV Community ·

How Redis Distributed Locking Prevents Duplicate Scheduled Jobs Across Servers

When a team scaled their product-import service from one server to ten, all instances began firing the same hourly job simultaneously, causing redundant API calls, extra costs, and potential database duplicates. To fix this, they implemented distributed locking using Redis, where every server races to acquire a lock before executing the job, and only the winner proceeds while others skip that run. The lock is set atomically using Redis's SET NX EX command, ensuring no two servers can claim it at the same time and that it auto-expires if the winning server crashes. Each lock is tagged with a unique random token, and release is handled via a Lua script to ensure the check-and-delete operation is atomic, preventing a server from accidentally releasing another server's lock. The solution requires no dedicated leader election or manual failover logic, relying entirely on a Redis instance most teams already operate.

0
ProgrammingDEV Community ·

How Text Embeddings Power Semantic Search and Modern AI Applications

Embeddings are numerical representations of text — dense vectors of floating-point numbers — that capture the semantic meaning of language rather than its literal wording. Unlike traditional keyword search, embedding models map text into a high-dimensional vector space where phrases with similar meanings are placed close together, even if they share no common words. Similarity between vectors is measured using cosine similarity, which calculates the angle between two vectors to determine how semantically related they are. This technology is central to Retrieval-Augmented Generation (RAG) pipelines, where user queries and documents are both converted into vectors and compared via similarity search before being passed to a large language model. Embeddings underpin a wide range of AI features, including document retrieval and recommendation systems, making them a foundational concept for anyone building LLM-based applications.

Keylight Crate Enables Offline License Validation in Rust Apps · ShortSingh