oracle/rust-oracledb
oracle/rust-oracledb has 43 GitHub stars and 15 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 01:49 UTC. Last push 2026-11-13.
What you can do
- No Oracle Client libraries required
- Support for Rust 1.89 and higher
- Connects to Oracle Database 12, 18, 19, 21 and 26 on-premises or in the Cloud
- SQL and PL/SQL Execution with significant optimizations including compressed fetch, pre-fetching, client and server result set caching, and statement caching with auto-tuning
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
Oracle Database driver for Rust maintained by Oracle Corporation. Connect your Rust applications instantly to Oracle Database.
DataREADME.md
Originalrust-oracledb
A pure Rust driver for Oracle Database without any Oracle Client libraries required, maintained by Oracle.
Features
- No Oracle Client libraries required
- Support for Rust 1.89 and higher
- Connects to Oracle Database 12, 18, 19, 21 and 26 on-premises or in the Cloud
- SQL and PL/SQL Execution with significant optimizations including compressed fetch, pre-fetching, client and server result set caching, and statement caching with auto-tuning
- Full use of Oracle Network Service infrastructure, including encrypted network traffic and security features
- Extensive Oracle data type support, including VECTOR, JSON and large object support (CLOB and BLOB)
- Array operations for efficient INSERT, UPDATE and MERGE execution
- Connection pooling
- Database Resident Connection Pooling (DRCP)
- Privileged Connections
- End-to-end monitoring and tracing
- Support for Oracle AI Database 26ai Deep Data Security
- Support for fetching and inserting Arrow arrays
Getting Started
Add to your Cargo.toml:
[dependencies]
oracledb = "26.0.0-beta.6"
If you wish to make use of the optional Arrow support, use this instead:
[dependencies]
oracledb = { version = "26.0.0-beta.6", features = ["arrow"] }
Documentation
The documentation can be found here.
Examples
Execute queries and return rows.
use oracledb;
fn main() -> Result<(), oracledb::Error> {
// create configuration and connect to the database
let config = oracledb::Config::default()
.set_credentials("user", "password")
.set_connect_string("server:1521/service_name")?;
let conn = oracledb::connect(config)?;
// perform simple query that returns a single row with no bind parameters
let row = conn.query_row("select user from dual", &[])?;
// get value by position
let user: String = row.get(0)?;
println!("Connected as {user}");
// get value by name
let user: String = row.get("user")?;
// perform query that returns multiple rows with a bind parameter
// Assuming that the EMP table exists
let cursor = conn.query(
"select ename, sal, comm from emp where deptno = :1", &[&30]
)?;
for row_result in cursor {
let row = row_result?;
let ename: String = row.get("ename")?;
let sal: i32 = row.get("sal")?;
let comm: Option<i32> = row.get("comm")?;
}
}
Execute a query and return an Arrow RecordBatch.
use arrow_array::{Array, StringArray};
use oracledb;
fn main() -> Result<(), oracledb::Error> {
// create configuration and connect to the database
let config = oracledb::Config::default()
.set_credentials("user", "password")
.set_connect_string("server:1521/service_name")?;
let conn = oracledb::connect(config)?;
// perform simple query that returns an Arrow RecordBatch
let rb = conn.query_arrow(
"select user from dual",
oracledb::BindParameters::default(),
)?;
// access a single Arrow column
let users = rb
.column(0)
.as_any()
.downcast_ref::<StringArray>()
.expect("Failed to downcast to StringArray");
for user in users.iter() {
println!("User = {}", user.unwrap_or("NULL"));
}
Ok(())
}
Help
Questions can be asked in GitHub Discussions.
Problem reports can be raised in GitHub Issues.
Contributing
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide.
Security
Please consult the security guide for our responsible security vulnerability disclosure process.
License
See LICENSE.
History
This replaces the original Rust thin driver produced by Muhammed Durakovic. The new name for that driver is oraclemcp-driver-cx.