Skip to content

Commit ae0c044

Browse files
committed
More progress to cli dev and also the rust sdk file storage
1 parent ad49c7b commit ae0c044

205 files changed

Lines changed: 6608 additions & 2768 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/python-sdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [main]
66
paths:
77
- 'link/sdks/python/**'
8-
- 'link/kalam-client/**'
8+
- 'link/sdks/rust/**'
99
- 'link/link-common/**'
1010
- '.github/workflows/python-sdk.yml'
1111
workflow_dispatch:

.github/workflows/rust-sdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [main]
66
paths:
77
- 'link/sdks/rust/**'
8-
- 'link/kalam-client/**'
8+
- 'link/sdks/rust/**'
99
- 'link/link-common/**'
1010
- 'backend/crates/kalamdb-commons/**'
1111
- 'backend/crates/kalamdb-observability/**'

.github/workflows/versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- 'backend/Cargo.toml'
99
- 'cli/Cargo.toml'
1010
- 'pg/Cargo.toml'
11-
- 'link/kalam-client/Cargo.toml'
11+
- 'link/sdks/rust/Cargo.toml'
1212
- 'link/sdks/rust/**'
1313
- 'link/sdks/typescript/**/package.json'
1414
- 'link/sdks/dart/pubspec.yaml'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,5 @@ link/sdks/typescript/client/.npmrc
131131
/tools/supabase-local
132132
/.playwright-mcp
133133
cli/kalam.toml
134+
/link/sdks/rust/sdks/typescript/client/.wasm-cargo-home
135+
/link/sdks/rust/sdks/typescript/client/.wasm-target

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ members = [
4646
"backend/crates/kalamdb-server-auth",
4747
"backend",
4848
"link/link-common",
49-
"link/kalam-client",
49+
"link/sdks/rust",
5050
"link/kalam-consumer-wasm",
5151
"link/kalam-link-dart",
5252
"cli",
@@ -185,6 +185,7 @@ x509-parser = "0.18.1"
185185
kalamdb-commons = { path = "backend/crates/kalamdb-commons", default-features = false }
186186
kalamdb-observability = { path = "backend/crates/kalamdb-observability", default-features = false }
187187
link-common = { path = "link/link-common", default-features = false }
188+
kalam-client = { path = "link/sdks/rust", default-features = false }
188189
kalamdb-row-filter = { path = "backend/crates/kalamdb-row-filter" }
189190
kalamdb-transfer = { path = "backend/crates/kalamdb-transfer" }
190191
kalamdb-plan-cache = { path = "backend/crates/kalamdb-plan-cache" }

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ Agents and frontends use the same backend directly: SQL over HTTP for reads and
5757
</tbody>
5858
</table>
5959

60-
SDKs: [TypeScript/JavaScript](https://www.npmjs.com/package/@kalamdb/client), [Dart/Flutter](https://pub.dev/packages/kalam_link), and [Rust](https://crates.io/crates/kalam-client).
61-
6260
PostgreSQL extension Docker image: [jamals86/pg-kalam](https://hub.docker.com/r/jamals86/pg-kalam) with `pg_kalam` preinstalled.
6361

6462
> Frontend clients can execute SQL directly against KalamDB. You keep one SQL API plus live subscriptions instead of maintaining a custom REST or GraphQL CRUD layer for every agent workflow.

backend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ kalamdb-configs = { path = "crates/kalamdb-configs" }
150150
kalamdb-tables = { path = "crates/kalamdb-tables" }
151151
kalamdb-raft = { path = "crates/kalamdb-raft" }
152152
kalamdb-dba = { path = "crates/kalamdb-dba" }
153-
kalam-client = { path = "../link/kalam-client", default-features = false, features = ["tokio-runtime", "cluster"] }
153+
kalam-client = { path = "../link/sdks/rust", default-features = false, features = ["tokio-runtime", "cluster"] }
154154

155155
# External dependencies
156156
tempfile = { workspace = true }

backend/crates/kalamdb-commons/src/constants.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ pub const RESERVED_NAMESPACE_NAMES: &[&str] = &[
122122

123123
/// SQL keywords that must never be used as namespace, table, or column identifiers.
124124
pub const CRITICAL_RESERVED_SQL_KEYWORDS: &[&str] = &[
125-
"TABLE", "TABLES", "TABLESPACE", "INDEX", "VIEW", "SCHEMA", "DATABASE", "INSERT", "UPDATE",
126-
"DELETE", "CREATE", "DROP", "ALTER",
125+
"TABLE",
126+
"TABLES",
127+
"TABLESPACE",
128+
"INDEX",
129+
"VIEW",
130+
"SCHEMA",
131+
"DATABASE",
132+
"INSERT",
133+
"UPDATE",
134+
"DELETE",
135+
"CREATE",
136+
"DROP",
137+
"ALTER",
127138
];

backend/crates/kalamdb-commons/src/conversions/arrow_json_conversion.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,8 @@ mod tests {
588588
let batch = json_rows_to_arrow_batch(&schema, rows).unwrap();
589589
let embedding = batch
590590
.column(1)
591-
.as_any().downcast_ref::<FixedSizeListArray>()
591+
.as_any()
592+
.downcast_ref::<FixedSizeListArray>()
592593
.expect("embedding array");
593594

594595
assert!(embedding.is_null(0));

backend/crates/kalamdb-commons/src/helpers/arrow_utils.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,20 @@ pub fn compute_min_max(array: &ArrayRef) -> (Option<StoredScalarValue>, Option<S
324324
pub fn array_value_to_string(array: &dyn arrow::array::Array, row_idx: usize) -> Option<String> {
325325
match array.data_type() {
326326
ArrowDataType::Int64 => array
327-
.as_any().downcast_ref::<Int64Array>()
327+
.as_any()
328+
.downcast_ref::<Int64Array>()
328329
.map(|arr| arr.value(row_idx).to_string()),
329330
ArrowDataType::Int32 => array
330-
.as_any().downcast_ref::<Int32Array>()
331+
.as_any()
332+
.downcast_ref::<Int32Array>()
331333
.map(|arr| arr.value(row_idx).to_string()),
332334
ArrowDataType::Utf8 => array
333-
.as_any().downcast_ref::<StringArray>()
335+
.as_any()
336+
.downcast_ref::<StringArray>()
334337
.map(|arr| arr.value(row_idx).to_string()),
335338
ArrowDataType::LargeUtf8 => array
336-
.as_any().downcast_ref::<LargeStringArray>()
339+
.as_any()
340+
.downcast_ref::<LargeStringArray>()
337341
.map(|arr| arr.value(row_idx).to_string()),
338342
_ => None,
339343
}

0 commit comments

Comments
 (0)