15 releases (breaking)

new 0.10.0 Sep 12, 2020
0.8.0 Aug 29, 2020
0.4.0 Jul 30, 2020

#113 in Database interfaces

Download history 37/week @ 2020-06-04 9/week @ 2020-06-11 8/week @ 2020-06-18 3/week @ 2020-06-25 9/week @ 2020-07-02 3/week @ 2020-07-09 16/week @ 2020-07-16 63/week @ 2020-07-23 19/week @ 2020-07-30 39/week @ 2020-08-06 18/week @ 2020-08-13 38/week @ 2020-08-20 36/week @ 2020-08-27 58/week @ 2020-09-03 31/week @ 2020-09-10

112 downloads per month

MIT license

305KB
6.5K SLoC

Rust Firebird Client

Build Crate API

A Firebird client library to Rust programing language

How to use it

  1. Start choosing the lib variation you want
// For use the compile time linked version
ConnectionBuilder::linked()
// Or using the runtime loaded lib
ConnectionBuilder::with_client("/my/firebird/here/lib/libfbclient.so")
// Or using the pure rust implementation
ConnectionBuilder::pure_rust()
  1. Set your connection params
// For a remote server
let mut conn = ConnectionBuilder::linked()
    .host("my.host.com.br")
    .db_name("awesome.fdb")
    .connect()?
// Or if you need a embedded/local only access
let mut conn = ConnectionBuilder::linked()
    .embedded()
    .db_name("/path/to/awesome.fdb")
    .connect()?
  1. Now you can use the lib
let rows = conn.query_iter("select col_a, col_b, col_c from test", ())?;
...

More examples here.

Cargo features

All features can be used at the same time if needed.

linking

Will use the dynamic library of the official fbclient at runtime and compiletime. Used in systems where there is already a firebird client installed and configured.

dynamic_loading

Can find the official fbclient native library by path at runtime, does not need the library at compiletime. Useful when you need to build in a system without a firebird client installed.

pure_rust

Uses a pure rust implementation of the firebird wire protocol, does not need the native library at all. Useful for cross-compilation and allow a single binary to be deployed without needing to install the firebird client.

Goals

  • Rust Api
  • Dynamic link with fbclient
  • Dynamic loading the fbclient(.dll or .so)
  • ARM support
  • Firebird embedded support
  • Extern this api to ruby
  • Extern this api to lua (in a new repo)

Dependencies

~2.6–3.5MB
~64K SLoC