0.1.2 |
|
---|---|
0.1.1 |
|
0.1.0 |
|
#14 in #products
320KB
9K SLoC
Cassander
Cassander 是 Apache Cassandra 和 DataStax 产品 DataStax C/C++ 驱动的 Rust 封装。
这是一个正在进行的工程项目:预期会有破坏性变更和缺陷。
最低支持的 C/C++ 驱动程序版本是 2.17.1。
lib.rs
:
Cassander
该 cassander
包提供了对 Apache Cassandra 的 DataStax C++ 驱动的 Rust 风格绑定。该包是一个正在进行的工程项目,并不是功能完整的。该包尚未准备好用于生产环境。
架构
+---------+
|cassander|
+---------+
|
| +----------+
+->|mod driver|
| +----------+
| |
| | +-------+
| +->|mod ffi|
| | +-------+
| | | +--------------------+
| | +->|struct_CassStatement|
| | B | +--------------------+
| | I | +--------------------+
| | N +->| ... |
| | D | +--------------------+
| | I | +--------------------+
| | N +->| enum_CassError |
| | G | +--------------------+
| | S | +--------------------+
| | +->|cass_session_prepare|
| | +--------------------+
| |
| | +--------+
| +->|mod cass|
| +--------+
| | +-------------+
| +->| CassError |
| | +-------------+
| | +-------------+
| S +->| CassFuture |
| A | +-------------+
| F | +-------------+
| E +->|CassStatement|
| | +-------------+
| W | +-------------+
| R +->| ... |
| A | +-------------+
| P | +-------------+
| P +->| newtypes |
| E | +-------------+
| R | +-------------+
| S +->| traits |
| | +-------------+
| | +-------------+
| +->| methods |
| +-------------+
|
-----------+---------------------------------------------
|
v
+-------------+
|Rustified API|
+-------------+
|
| +---------------+
+->| Statement |
| +---------------+
| +---------------+
+->|CachedStatement|
| +---------------+
| +---------------+
+->| Query |
| +---------------+
| +---------------+
+->| CqlValue |
| +---------------+
| +---------------+
+->| ClusterConfig |
| +---------------+
| +---------------+
+->| ... |
+---------------+
依赖
~5–13MB
~151K SLoC