<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mukhtar</title>
    <description>The latest articles on DEV Community by Mukhtar (@mukhtar_onif).</description>
    <link>https://dev.to/mukhtar_onif</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F595040%2F8151d7ee-efb8-44be-adbf-e2bb1bc1d460.JPG</url>
      <title>DEV Community: Mukhtar</title>
      <link>https://dev.to/mukhtar_onif</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mukhtar_onif"/>
    <language>en</language>
    <item>
      <title>Meet Surveilr: The SQL-First Platform That Turns Any Resource Into Compliance Gold</title>
      <dc:creator>Mukhtar</dc:creator>
      <pubDate>Tue, 26 Aug 2025 10:59:46 +0000</pubDate>
      <link>https://dev.to/mukhtar_onif/meet-surveilr-the-sql-first-platform-that-turns-any-resource-into-compliance-gold-2cn3</link>
      <guid>https://dev.to/mukhtar_onif/meet-surveilr-the-sql-first-platform-that-turns-any-resource-into-compliance-gold-2cn3</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 1 of 6 in the "Surveilr Deep Dive" series&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Picture this: It's Monday morning, and your organization is facing a compliance audit. The auditors want to know about every file that contains sensitive data, every email with external attachments, every system configuration change in the last quarter. Your team scrambles across dozens of tools, exports from multiple systems, and spends weeks manually correlating data that should be instantly queryable.&lt;/p&gt;

&lt;p&gt;What if I told you there's a tool that turns ANY file, email, or system resource into queryable SQL data in minutes? Meet &lt;strong&gt;Surveilr&lt;/strong&gt;  – the open-source platform that's revolutionizing how organizations approach compliance, security monitoring, and resource surveillance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Compliance Data Problem
&lt;/h2&gt;

&lt;p&gt;Before we dive into the solution, let's acknowledge the problem. Modern organizations generate digital evidence across countless systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Files scattered across file systems&lt;/strong&gt; with varying permissions and metadata&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emails buried in different mailboxes&lt;/strong&gt; with attachments and complex threading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project management data&lt;/strong&gt; spread across GitHub, Jira, GitLab&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System configurations and logs&lt;/strong&gt; in proprietary formats&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network resources and databases&lt;/strong&gt; with their own query languages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When audit time comes, teams spend 80% of their effort just &lt;strong&gt;finding and correlating data&lt;/strong&gt;, leaving only 20% for actual analysis. This is backwards.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter Surveilr: The SQL-First Revolution
&lt;/h2&gt;

&lt;p&gt;Surveilr flips this equation. Its core philosophy is elegantly simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Walk resources. Capture everything. Query anything.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead of learning dozens of tools and APIs, you learn SQL once and query everything. Instead of fragmented data silos, you get unified Resource Surveillance State Databases (RSSDs) that contain all your organizational evidence in a single, queryable format.&lt;/p&gt;

&lt;p&gt;Here's what makes Surveilr different:&lt;/p&gt;

&lt;h3&gt;
  
  
  🎯 &lt;strong&gt;SQL-First Architecture&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Every piece of data – files, emails, system info, project data – becomes rows and columns in SQLite databases. If you know SQL, you can analyze anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  🏠 &lt;strong&gt;Local-First, Edge-Based&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Your data stays on your infrastructure. Surveilr creates local SQLite databases that can be queried without internet connectivity or cloud dependencies.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔓 &lt;strong&gt;Tool-Independent Results&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Once created, RSSDs are standard SQLite files. You can query them with any SQL tool, language, or platform. Surveilr doesn't hold your data hostage.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧩 &lt;strong&gt;Universal Resource Processing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Files, emails, APIs, executables, documents – if it exists on your systems, Surveilr can ingest it and make it queryable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The RSSD: Your Universal Evidence Database
&lt;/h2&gt;

&lt;p&gt;At the heart of Surveilr is the &lt;strong&gt;Resource Surveillance State Database (RSSD)&lt;/strong&gt;. Think of it as a universal translator that converts any resource into structured, queryable data.&lt;/p&gt;

&lt;p&gt;Here's the magic: every RSSD contains a standard schema with tables like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;uniform_resource&lt;/code&gt; – Every file, email, or resource becomes a row&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;device&lt;/code&gt; – Information about the systems being surveilled
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ur_ingest_session&lt;/code&gt; – Audit trail of when and how data was collected&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;uniform_resource_transform&lt;/code&gt; – Processed and enriched data&lt;/li&gt;
&lt;li&gt;Plus dozens more for specialized data types&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The beauty is consistency. Whether you're analyzing a Windows server, a Linux container, or a MacBook, the RSSD schema remains the same. Your SQL queries work everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your First Surveilr Experience
&lt;/h2&gt;

&lt;p&gt;Let's get hands-on. I'll walk you through creating your first RSSD and running your first surveillance queries.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;Surveilr provides a one-liner installation script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sL&lt;/span&gt; https://raw.githubusercontent.com/opsfolio/releases.opsfolio.com/main/surveilr/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or if you prefer a custom installation path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;SURVEILR_HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/bin"&lt;/span&gt; curl &lt;span class="nt"&gt;-sL&lt;/span&gt; https://raw.githubusercontent.com/opsfolio/releases.opsfolio.com/main/surveilr/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify your installation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;surveilr &lt;span class="nt"&gt;--version&lt;/span&gt;
surveilr &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Your First Ingestion
&lt;/h3&gt;

&lt;p&gt;Let's start simple – surveilling your current directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# See what would be ingested (dry run)&lt;/span&gt;
surveilr ingest files &lt;span class="nt"&gt;--dry-run&lt;/span&gt;

&lt;span class="c"&gt;# Actually ingest the files&lt;/span&gt;
surveilr ingest files

&lt;span class="c"&gt;# Check what we created&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt; resource-surveillance.sqlite.db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! You've just created your first RSSD. Surveilr walked through your current directory, captured metadata about every file, and stored it all in a SQLite database.&lt;/p&gt;

&lt;h3&gt;
  
  
  Your First Queries
&lt;/h3&gt;

&lt;p&gt;Now comes the magic. Let's query our surveillance data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Connect to the database&lt;/span&gt;
sqlite3 resource-surveillance.sqlite.db

&lt;span class="c"&gt;# See what tables were created&lt;/span&gt;
.tables

&lt;span class="c"&gt;# Look at the uniform_resource table structure&lt;/span&gt;
.schema uniform_resource

&lt;span class="c"&gt;# Find all files modified in the last 7 days&lt;/span&gt;
SELECT 
    uri,
    size_bytes,
    datetime&lt;span class="o"&gt;(&lt;/span&gt;last_modified_at, &lt;span class="s1"&gt;'unixepoch'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; as modified_date
FROM uniform_resource 
WHERE last_modified_at &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; strftime&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'%s'&lt;/span&gt;, &lt;span class="s1"&gt;'now'&lt;/span&gt;, &lt;span class="s1"&gt;'-7 days'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
ORDER BY last_modified_at DESC&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c"&gt;# Find the largest files&lt;/span&gt;
SELECT 
    uri,
    size_bytes,
    ROUND&lt;span class="o"&gt;(&lt;/span&gt;size_bytes/1024.0/1024.0, 2&lt;span class="o"&gt;)&lt;/span&gt; as size_mb
FROM uniform_resource 
WHERE size_bytes IS NOT NULL
ORDER BY size_bytes DESC 
LIMIT 10&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c"&gt;# Look for configuration files&lt;/span&gt;
SELECT uri, nature, size_bytes
FROM uniform_resource 
WHERE uri LIKE &lt;span class="s1"&gt;'%.conf%'&lt;/span&gt; 
   OR uri LIKE &lt;span class="s1"&gt;'%.config%'&lt;/span&gt; 
   OR uri LIKE &lt;span class="s1"&gt;'%.json%'&lt;/span&gt;
   OR uri LIKE &lt;span class="s1"&gt;'%.yaml%'&lt;/span&gt;
   OR uri LIKE &lt;span class="s1"&gt;'%.yml%'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What Just Happened?
&lt;/h3&gt;

&lt;p&gt;In less than 5 minutes, you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Installed&lt;/strong&gt; a powerful surveillance platform&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ingested&lt;/strong&gt; file system metadata from your current directory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Queried&lt;/strong&gt; that data using standard SQL&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generated insights&lt;/strong&gt; about file modifications, sizes, and types&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But this is just the beginning. That RSSD you just created is a standard SQLite database. You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Query it from any programming language with SQLite support&lt;/li&gt;
&lt;li&gt;Import it into business intelligence tools&lt;/li&gt;
&lt;li&gt;Share it with team members&lt;/li&gt;
&lt;li&gt;Merge it with other RSSDs&lt;/li&gt;
&lt;li&gt;Archive it for compliance purposes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Architecture Behind the Magic
&lt;/h2&gt;

&lt;p&gt;Before we wrap up this introduction, let's peek under the hood. Surveilr's architecture is elegantly modular:&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Components
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;surveilr ingest&lt;/code&gt;&lt;/strong&gt; – The data collection engine that walks resources and populates RSSDs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;surveilr admin&lt;/code&gt;&lt;/strong&gt; – Administrative commands for managing and merging databases&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;surveilr notebooks&lt;/code&gt;&lt;/strong&gt; – Built-in SQL notebooks for common queries and reports&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;surveilr shell&lt;/code&gt;&lt;/strong&gt; – Interactive SQL interface with enhanced capabilities&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resource Types
&lt;/h3&gt;

&lt;p&gt;Surveilr doesn't just handle files. It can ingest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;File systems&lt;/strong&gt; with full metadata and content analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Email systems&lt;/strong&gt; via IMAP (Gmail, Outlook, Microsoft 365)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project management&lt;/strong&gt; platforms (GitHub, GitLab, Jira, OpenProject)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Executable scripts&lt;/strong&gt; that generate dynamic data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud storage&lt;/strong&gt; systems via OpenDAL integration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom data sources&lt;/strong&gt; through capturable executables&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SQL-Centric Philosophy
&lt;/h3&gt;

&lt;p&gt;Everything in Surveilr revolves around SQL:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Configuration&lt;/strong&gt; is stored in SQL tables&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Business logic&lt;/strong&gt; is implemented as SQL queries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reports&lt;/strong&gt; are SQL result sets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensions&lt;/strong&gt; are SQL functions and procedures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Migrations&lt;/strong&gt; are SQL scripts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means you can understand, modify, and extend Surveilr using the same SQL knowledge you already have.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Coming Next in This Series
&lt;/h2&gt;

&lt;p&gt;We've just scratched the surface. Over the next five articles, we'll build on this foundation:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Article 2: "From Chaos to Queries"&lt;/strong&gt; – We'll expand our RSSD with email ingestion, project management data, and capturable executables. You'll see how multiple data sources become a unified, queryable dataset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Article 3: "Talk to Your Data"&lt;/strong&gt; – We'll add AI-powered natural language querying, turning your RSSD into a conversational interface. Ask questions in plain English, get SQL results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Article 4: "Zero-Code Dashboards"&lt;/strong&gt; – We'll build web-based compliance dashboards using SQLPage, creating visual interfaces that non-technical stakeholders can use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Article 5: "Breaking SQLite Barriers"&lt;/strong&gt; – We'll enable remote team access using Surveilr's PostgreSQL wire protocol implementation, making your local RSSD accessible to distributed teams.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Article 6: "Enterprise Mastery"&lt;/strong&gt; – We'll explore advanced features like document processing, data deidentification, and building compliance automation workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;The best way to understand Surveilr is to use it. Here are some exercises to try before the next article:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install Surveilr&lt;/strong&gt; and create your first RSSD&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experiment with different directories&lt;/strong&gt; – try surveilling &lt;code&gt;/etc&lt;/code&gt; (on Unix systems) or your Documents folder&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explore the schema&lt;/strong&gt; – run &lt;code&gt;.schema&lt;/code&gt; in sqlite3 to see all available tables&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write custom queries&lt;/strong&gt; – look for files by type, size, or modification date&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check out the help&lt;/strong&gt; – run &lt;code&gt;surveilr ingest files --help&lt;/code&gt; to see advanced options&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The SQL-First Future
&lt;/h2&gt;

&lt;p&gt;Surveilr represents a fundamental shift in how we think about organizational data. Instead of learning new tools for each data source, we leverage the universal language of SQL. Instead of fragmented compliance efforts, we build unified evidence databases. Instead of vendor lock-in, we create portable, standards-based data assets.&lt;/p&gt;

&lt;p&gt;In a world where data is the new oil, Surveilr is the refinery that turns raw organizational resources into compliance gold.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Ready to dive deeper? In the next article, we'll expand our surveillance capabilities beyond simple files to include emails, project management data, and dynamic executable content. Your RSSD is about to become a lot more interesting.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coming up in Article 2:&lt;/strong&gt; "From Chaos to Queries: Ingesting Files, Emails, and Everything Else"&lt;/p&gt;




</description>
      <category>programming</category>
      <category>sqlite</category>
      <category>surveilr</category>
      <category>rust</category>
    </item>
    <item>
      <title>Implementing OpenDAL with Filesystem (FS) In Rust</title>
      <dc:creator>Mukhtar</dc:creator>
      <pubDate>Sat, 19 Jul 2025 18:55:47 +0000</pubDate>
      <link>https://dev.to/mukhtar_onif/implementing-opendal-with-filesystem-fs-in-rust-2ha8</link>
      <guid>https://dev.to/mukhtar_onif/implementing-opendal-with-filesystem-fs-in-rust-2ha8</guid>
      <description>&lt;h2&gt;
  
  
  Introduction to OpenDAL with SQLite Virtual Tables
&lt;/h2&gt;

&lt;p&gt;OpenDAL is a powerful and unified data access layer that provides an abstraction for different storage backends such as local filesystems, cloud storage, and object stores. It simplifies file and metadata operations by offering a unified API, allowing seamless interaction with different storage solutions.&lt;/p&gt;

&lt;p&gt;This guide explains the &lt;strong&gt;concepts&lt;/strong&gt; behind integrating OpenDAL with SQLite virtual tables, allowing you to query filesystem metadata using SQL. The code examples demonstrate key concepts rather than complete implementations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Concepts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. OpenDAL Operator
&lt;/h3&gt;

&lt;p&gt;The foundation of any OpenDAL integration is the &lt;strong&gt;Operator&lt;/strong&gt; - your interface to the storage backend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concept&lt;/strong&gt;: Create a configured operator for your storage type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual example - actual implementation needs error handling&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;fs_builder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Fs&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;default&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.root&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;operator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Operator&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fs_builder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="nf"&gt;.finish&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Ideas&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The operator abstracts away storage-specific details&lt;/li&gt;
&lt;li&gt;Different services (Fs, S3, Azure, etc.) use the same Operator interface&lt;/li&gt;
&lt;li&gt;Configuration happens through service-specific builders&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. SQLite Virtual Table Architecture
&lt;/h3&gt;

&lt;p&gt;Virtual tables in SQLite allow you to present non-SQL data as queryable tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concept&lt;/strong&gt;: Bridge between OpenDAL and SQLite&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual structure - real implementation much more complex&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;FileSystemTable&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;sqlite3_vtab&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;// Required SQLite base&lt;/span&gt;
    &lt;span class="n"&gt;operator&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Rc&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Operator&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       &lt;span class="c1"&gt;// Your OpenDAL operator&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Ideas&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Virtual tables implement a specific SQLite interface&lt;/li&gt;
&lt;li&gt;They translate SQL queries into storage operations&lt;/li&gt;
&lt;li&gt;The table schema defines what data is queryable&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Schema Design
&lt;/h3&gt;

&lt;p&gt;Design your virtual table schema to expose useful file metadata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concept&lt;/strong&gt;: Map file attributes to SQL columns&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;filesystem_view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                    &lt;span class="c1"&gt;-- File name&lt;/span&gt;
    &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                    &lt;span class="c1"&gt;-- Full path&lt;/span&gt;
    &lt;span class="n"&gt;last_modified&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;-- When file was changed&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="nb"&gt;BLOB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                 &lt;span class="c1"&gt;-- File contents (lazy-loaded)&lt;/span&gt;
    &lt;span class="k"&gt;size&lt;/span&gt; &lt;span class="nb"&gt;INTEGER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                 &lt;span class="c1"&gt;-- File size in bytes&lt;/span&gt;
    &lt;span class="n"&gt;content_type&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;            &lt;span class="c1"&gt;-- MIME type&lt;/span&gt;
    &lt;span class="n"&gt;digest&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                  &lt;span class="c1"&gt;-- File hash/checksum&lt;/span&gt;
    &lt;span class="n"&gt;arg_path&lt;/span&gt; &lt;span class="n"&gt;HIDDEN&lt;/span&gt;              &lt;span class="c1"&gt;-- Query parameter (hidden column)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Ideas&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hidden columns can accept query parameters&lt;/li&gt;
&lt;li&gt;BLOB columns can hold binary data&lt;/li&gt;
&lt;li&gt;Schema should balance utility with performance&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Query Translation Flow
&lt;/h3&gt;

&lt;p&gt;The magic happens in translating SQL queries into OpenDAL operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concept&lt;/strong&gt;: SQL WHERE clause becomes OpenDAL list operations&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual flow - real implementation involves cursor management&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;handle_query_with_path_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;FileMetadata&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// 1. Use OpenDAL to list files in the specified path&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;lister&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;operator&lt;/span&gt;&lt;span class="nf"&gt;.lister_with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;.metakey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;Metakey&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;ContentLength&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="nn"&gt;Metakey&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;LastModified&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;.call&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// 2. Convert OpenDAL entries to your table format&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Vec&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;lister&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="nf"&gt;.metadata&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.mode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nn"&gt;EntryMode&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;FILE&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="nf"&gt;.push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;convert_to_table_row&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;results&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Ideas&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQL filters become OpenDAL query parameters&lt;/li&gt;
&lt;li&gt;Metadata is fetched on-demand to avoid performance issues&lt;/li&gt;
&lt;li&gt;Results are converted to SQLite-compatible format&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Lazy Loading Strategy
&lt;/h3&gt;

&lt;p&gt;For performance, expensive operations (like reading file contents) should be lazy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concept&lt;/strong&gt;: Only load data when specifically requested&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual approach to lazy loading&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;get_column_value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;SqliteValue&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nn"&gt;SqliteValue&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.file_name&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
        &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nn"&gt;SqliteValue&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.file_path&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
        &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nn"&gt;SqliteValue&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;Integer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.file_size&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// Expensive operation - only do when column is requested&lt;/span&gt;
            &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.operator&lt;/span&gt;&lt;span class="nf"&gt;.read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.file_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nn"&gt;SqliteValue&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nn"&gt;SqliteValue&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Ideas&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Separate metadata operations from content operations&lt;/li&gt;
&lt;li&gt;Use OpenDAL's &lt;code&gt;stat()&lt;/code&gt; for metadata, &lt;code&gt;read()&lt;/code&gt; for content&lt;/li&gt;
&lt;li&gt;Only perform expensive operations when columns are actually selected&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Error Handling Patterns
&lt;/h3&gt;

&lt;p&gt;Bridge OpenDAL errors to SQLite errors appropriately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concept&lt;/strong&gt;: Convert storage errors to SQL errors&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual error mapping&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;map_opendal_error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;OpenDalError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;SqliteError&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="nf"&gt;.kind&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nn"&gt;ErrorKind&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;NotFound&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nn"&gt;SqliteError&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;NotFound&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nn"&gt;ErrorKind&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;PermissionDenied&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nn"&gt;SqliteError&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Auth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nn"&gt;ErrorKind&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Unexpected&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nn"&gt;SqliteError&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Internal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nn"&gt;SqliteError&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Internal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Ideas&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenDAL errors need translation to SQLite error codes&lt;/li&gt;
&lt;li&gt;Some errors should be handled gracefully (missing files)&lt;/li&gt;
&lt;li&gt;Others should propagate up to the SQL layer&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Usage Patterns
&lt;/h2&gt;

&lt;p&gt;Once implemented, your virtual table enables powerful queries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- List all files in a directory&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;size&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;filesystem_view&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;arg_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'/documents'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Find large files&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;size&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;filesystem_view&lt;/span&gt; 
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;arg_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'/media'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="k"&gt;size&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1000000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Search by file type (if you implement content_type detection)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;filesystem_view&lt;/span&gt; 
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;arg_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'/projects'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;content_type&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'text/%'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Benefits of This Approach
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why combine OpenDAL with SQLite virtual tables?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unified Query Interface&lt;/strong&gt;: Use SQL to query any storage backend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility&lt;/strong&gt;: Same queries work across local files, S3, Azure, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration&lt;/strong&gt;: Easy to embed in existing SQLite-based applications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;: SQLite's query optimization benefits your file operations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecosystem&lt;/strong&gt;: Leverage SQLite's rich ecosystem of tools and extensions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;To implement this approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Study SQLite's virtual table interface documentation&lt;/li&gt;
&lt;li&gt;Explore OpenDAL's service implementations for your storage needs&lt;/li&gt;
&lt;li&gt;Design your schema based on your specific use cases&lt;/li&gt;
&lt;li&gt;Implement the virtual table interface with proper error handling&lt;/li&gt;
&lt;li&gt;Add performance optimizations like caching and pagination&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This pattern opens up powerful possibilities for unified data access across different storage systems while maintaining the familiar SQL interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This guide demonstrated how to use OpenDAL for filesystem operations in Rust and integrate it with SQLite virtual tables. By leveraging OpenDAL, you can seamlessly interact with local storage while maintaining a structured query interface via SQLite.&lt;/p&gt;

&lt;p&gt;For more details, check out &lt;a href="https://github.com/apache/opendal" rel="noopener noreferrer"&gt;OpenDAL's documentation&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>rust</category>
      <category>opendal</category>
      <category>sqlite</category>
    </item>
    <item>
      <title>Getting Started with Rust in 2025: Why Now Is a Great Time to Learn Rust 🦀</title>
      <dc:creator>Mukhtar</dc:creator>
      <pubDate>Sun, 13 Jul 2025 20:48:12 +0000</pubDate>
      <link>https://dev.to/mukhtar_onif/getting-started-with-rust-in-2025-why-now-is-a-great-time-to-learn-rust-1d89</link>
      <guid>https://dev.to/mukhtar_onif/getting-started-with-rust-in-2025-why-now-is-a-great-time-to-learn-rust-1d89</guid>
      <description>&lt;h2&gt;
  
  
  Getting Started with Rust in 2025 🦀
&lt;/h2&gt;

&lt;p&gt;Rust has been growing steadily over the years, and in 2025, it's more relevant than ever. If you've been on the fence about learning it, now's the perfect time to jump in.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Why Learn Rust?
&lt;/h2&gt;

&lt;p&gt;Rust is a modern systems programming language focused on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt; (like C/C++)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety&lt;/strong&gt; (no nulls, no data races)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern developer experience&lt;/strong&gt; (great tooling, compiler messages)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Companies like Microsoft, Amazon, Cloudflare, and Dropbox use Rust in production. It's built to help you write &lt;strong&gt;fast, reliable, and maintainable&lt;/strong&gt; software.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 What Makes Rust Special?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Memory safety without garbage collection&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fearless concurrency&lt;/strong&gt; – build multi-threaded apps without race conditions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Helpful compiler&lt;/strong&gt; – the compiler actually teaches you!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Powerful tooling&lt;/strong&gt; – &lt;code&gt;cargo&lt;/code&gt;, &lt;code&gt;clippy&lt;/code&gt;, &lt;code&gt;rustfmt&lt;/code&gt;, and more&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-cost abstractions&lt;/strong&gt; – safety and performance, no tradeoffs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've dealt with C/C++ bugs or hit performance walls in Python or JavaScript, Rust is the best of both worlds.&lt;/p&gt;




&lt;h2&gt;
  
  
  🆚 Rust vs Other Languages
&lt;/h2&gt;

&lt;p&gt;Rust sits in a unique position compared to other programming languages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt; – As fast as C/C++ but much safer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory Management&lt;/strong&gt; – Manual control without the crashes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type Safety&lt;/strong&gt; – Catches bugs at compile time, not runtime&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrency&lt;/strong&gt; – Built-in support for safe multi-threading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning Curve&lt;/strong&gt; – Steeper initially, but pays off long-term&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unlike garbage-collected languages, Rust gives you control. Unlike manual memory management languages, Rust prevents common bugs.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Code Examples
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Hello World
&lt;/h3&gt;

&lt;p&gt;Every Rust program starts with a main() function. This is your entry point!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// This is the main function - where your program starts&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// println! is a macro that prints to the console&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, world!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Variables and Types
&lt;/h3&gt;

&lt;p&gt;Rust is statically typed but can often infer types. Variables are immutable by default - you need mut to change them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Variables are immutable by default&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Alice"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;           &lt;span class="c1"&gt;// string slice (&amp;amp;str)&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;           &lt;span class="c1"&gt;// unsigned 32-bit integer&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;         &lt;span class="c1"&gt;// 'mut' makes it mutable (changeable)&lt;/span&gt;

    &lt;span class="c1"&gt;// We can change mutable variables&lt;/span&gt;
    &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// {} are placeholders for variables in println!&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{} is {} years old with a score of {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Functions
&lt;/h3&gt;

&lt;p&gt;Functions in Rust are defined with fn. The last expression (without semicolon) is the return value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Function that takes two i32 parameters and returns an i32&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;  &lt;span class="c1"&gt;// no semicolon = this is the return value&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Call the function and store the result&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"5 + 3 = {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Ownership (Rust's Superpower)
&lt;/h3&gt;

&lt;p&gt;Ownership is Rust's way of managing memory safely. Each value has one owner, and when the owner goes out of scope, the value is dropped.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Create a String on the heap&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// This MOVES s1 to s2. s1 is no longer valid!&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// This would cause a compile error because s1 was moved&lt;/span&gt;
    &lt;span class="c1"&gt;// println!("{}", s1); &lt;/span&gt;

    &lt;span class="c1"&gt;// Only s2 is valid now&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Borrowing
&lt;/h3&gt;

&lt;p&gt;Borrowing lets you use a value without taking ownership. Think of it like borrowing a book - you can read it, but you have to give it back!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// This function borrows a String reference (&amp;amp;String)&lt;/span&gt;
&lt;span class="c1"&gt;// It doesn't take ownership, just looks at the data&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;print_length&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Length: {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="nf"&gt;.len&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;my_string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Pass a reference (&amp;amp;) to the function&lt;/span&gt;
    &lt;span class="nf"&gt;print_length&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;my_string&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// We can still use my_string because we only borrowed it&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;my_string&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Structs &amp;amp; Methods
&lt;/h3&gt;

&lt;p&gt;Structs are like classes in other languages - they group related data together. You can add methods to them using impl blocks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Define a struct (like a class in other languages)&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Implementation block - where we define methods&lt;/span&gt;
&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Associated function (like a constructor)&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="c1"&gt;// shorthand for name: name, age: age&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Method that takes &amp;amp;self (borrows the instance)&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hi, I'm {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Create a new Person instance&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Bob"&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Call the method&lt;/span&gt;
    &lt;span class="n"&gt;person&lt;/span&gt;&lt;span class="nf"&gt;.greet&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Error Handling
&lt;/h3&gt;

&lt;p&gt;Rust doesn't have exceptions. Instead, it uses Result to handle errors explicitly. This forces you to deal with potential failures.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Function returns Result&amp;lt;T, E&amp;gt; - either Ok(value) or Err(error)&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;divide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;f64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;f64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;f64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Return an error&lt;/span&gt;
        &lt;span class="nf"&gt;Err&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Cannot divide by zero"&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Return the successful result&lt;/span&gt;
        &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Use match to handle both success and error cases&lt;/span&gt;
    &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="nf"&gt;divide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;10.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;2.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Result: {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nf"&gt;Err&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Error: {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🛠️ Getting Started
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install Rust&lt;/strong&gt;: &lt;code&gt;curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create new project&lt;/strong&gt;: &lt;code&gt;cargo new my_project&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build and run&lt;/strong&gt;: &lt;code&gt;cargo run&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read "The Rust Book"&lt;/strong&gt; online for free&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🔥 What You Can Build
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web servers&lt;/strong&gt; (Actix, Rocket frameworks)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Command-line tools&lt;/strong&gt; (ripgrep, bat)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Game engines&lt;/strong&gt; (Bevy)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blockchain projects&lt;/strong&gt; (Solana, Polkadot)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WebAssembly applications&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operating systems&lt;/strong&gt; (Redox OS)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 Why 2025 is Perfect
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mature ecosystem&lt;/strong&gt; – tons of quality crates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Industry adoption&lt;/strong&gt; – major companies using it in production&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Great learning resources&lt;/strong&gt; – excellent documentation and community&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Job market&lt;/strong&gt; – high demand, good salaries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Future-proof&lt;/strong&gt; – language designed for next-generation computing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rust's combination of performance, safety, and growing ecosystem makes it an excellent choice for modern development in 2025!&lt;/p&gt;

</description>
      <category>rust</category>
      <category>programming</category>
      <category>c</category>
      <category>community</category>
    </item>
  </channel>
</rss>
