thinkingdata-core 0.2.0

Core implementation of the ThinkingData Analytics Rust SDK: data model, validation, and log/batch/debug consumers with blocking and async APIs.
Documentation
# Copyright 2026 houseme
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[package]
name = "thinkingdata-core"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
# Per-crate README (resolved relative to this crate) for the crates.io page;
# inheriting the workspace-level path would package the workspace root README.
readme = "README.md"
keywords.workspace = true
categories.workspace = true
description = "Core implementation of the ThinkingData Analytics Rust SDK: data model, validation, and log/batch/debug consumers with blocking and async APIs."

[features]
default = ["blocking"]
# Synchronous API (`Consumer` trait, `TDAnalytics`, blocking consumer methods).
blocking = ["dep:flate2", "dep:uuid"]
# Asynchronous API (`AsyncConsumer` trait, `TDAnalyticsAsync`, `*_async`
# consumer methods) with streaming pipelines built on Tokio.
async = ["dep:async-trait", "dep:flate2", "dep:uuid"]

[dependencies]
async-trait = { workspace = true, optional = true }
flate2 = { workspace = true, optional = true }
jiff = { workspace = true }
regex = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
url = { workspace = true }
uuid = { workspace = true, optional = true }

[dev-dependencies]
flate2 = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["test-util"] }

[[example]]
name = "async_track"
required-features = ["async"]

[[example]]
name = "batch_upload"
required-features = ["blocking"]

[[example]]
name = "debug_validate"
required-features = ["blocking"]

[[example]]
name = "log_basic"
required-features = ["blocking"]