Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/songtianyi/tdengine-rust-bindings
Rust binding for TDengine
https://github.com/songtianyi/tdengine-rust-bindings
binding-generator bindings rust tdengine tdengine-rust-bindings
Last synced: 14 days ago
JSON representation
Rust binding for TDengine
- Host: GitHub
- URL: https://github.com/songtianyi/tdengine-rust-bindings
- Owner: songtianyi
- License: agpl-3.0
- Created: 2020-10-22T03:20:27.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-13T16:22:05.000Z (over 2 years ago)
- Last Synced: 2024-08-02T07:10:38.943Z (4 months ago)
- Topics: binding-generator, bindings, rust, tdengine, tdengine-rust-bindings
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tdengine - TDengine Rust bindings - It's a Rust bindings project for TDengine. (Connector)
README
# TDengine rust bindings
It's a rust bindings project for [TDengine](https://github.com/taosdata/TDengine)
AND it's based on OUTDATED [tdengine-connector](https://github.com/tidyjiang8/tdengine-connector), thanks for [@tidyjiang8](https://github.com/tidyjiang8)'s prior work.
## Dependencies
- [Tdengine](https://www.taosdata.com/en/getting-started/)
- [Rust](https://www.rust-lang.org/learn/get-started)
- clang 3.9+
- cargo## How to use
The rust binding file of taos.h already generated, but you can try it with
```
cargo +nightly build
```
Then you find generated `bindings.rs`
```
find . -name "*.rs"
```
Copy to src folder
```
cp /path/to/bindings.rs src/
```
Run example `demo` to prepare demo data
> NOTE. `demo` will drop database 'demo' and create a new one.
```
cargo +nightly run --example demo
```
Then run example `subscribe` to test demo subscriber and check outputs
```
cargo +nightly run --example subscribe
```## TDegnine API coverage
- taos_init
- taos_connect
- taos_close
- taos_query
- taos_free_result
- taos_subscribe (callback function not support yet)
- taos_unsubscribe
- taos_consume
- taos_fetch_fields
- taos_field_count
- taos_fetch_row
- taos_errstr
- taos_errno## Platform coverage
This binding has only been tested in following platforms- CentOS-7 (kernel-3.10.0-957.27.2.el7.x86_64)
let me know if it's running well in your platform or just edit this list.
## Contribution
We should keep track of TDengine latest c interfaces and support as more interfaces as we need.## License
Keep same with [Tdengine](https://www.taosdata.com/en/getting-started/).