Git Product home page Git Product logo

rust-sqlite3's Introduction

Rust-Sqlite3

Rustic bindings for sqlite3.

Copyright (c) 2014 Dan Connolly

Share and enjoy. LICENSE: MIT.

Documentation, Status

View the documentation online

Three layers of API are provided:

  • mod ffi provides exhaustive, though unsafe, bindgen bindings for libsqlite.h
  • mod core provides a minimal safe interface to the basic sqlite3 API
  • mod types provides ToSql/FromSql traits, and the library provides convenient query() and update() APIs.

The API design is perhaps stabilizing, though testing is uneven and I have not used the library beyond trivial integration tests.

Build Status

TODO

  • another thorough read-through of the sqlite API intro, with unit tests to match; especially...
    • unit testing other than the happy-paths
  • ToSql/FromSql can now be implemented by clients, but the types module probably doesn't hit the 80% mark yet; e.g. it's missing uint and &[u8].
  • investigate test coverage tools for rust
  • basic benchmarking

Motivation and Acknowledgements

I was looking into sandstorm, a personal cloud platform with an architecture based on the wonderful capability security paradigm, and I found a rust application, acronymy, that uses the native API rather than the traditional POSIX environment.

I started poring over the code and followed the dependency link to linuxfood's rustsqlite. I started working on a memory safety issue etc. but soon found a number of large-scale API design issues that I wasn't sure how to approach with the upstream developers. I was also inspired by FromSql, ToSql and such from sfackler's rust-postgres API.

So I started from scratch, using bindgen, Result (sum types) etc.

rust-sqlite3's People

Contributors

carols10cents avatar dckc avatar dgilman avatar doy avatar gwenn avatar hydhknn avatar kyledewey avatar peterreid avatar pnispel avatar zsiciarz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.