5 files changed
+343
Cargo.lock
+301
@@ -160,6 +160,15 @@ version = "2.9.1"
160
source = "registry+https://github.com/rust-lang/crates.io-index"
161
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
162
163
+[[package]]
164
+name = "block-buffer"
165
+version = "0.10.4"
166
+source = "registry+https://github.com/rust-lang/crates.io-index"
167
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
168
+dependencies = [
169
+ "generic-array",
170
+]
171
+
172
[[package]]
173
name = "bumpalo"
174
version = "3.19.0"
@@ -172,6 +181,12 @@ version = "0.6.9"
181
source = "registry+https://github.com/rust-lang/crates.io-index"
182
checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e"
183
184
+[[package]]
185
+name = "byteorder"
186
+version = "1.5.0"
187
+source = "registry+https://github.com/rust-lang/crates.io-index"
188
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
189
+
190
[[package]]
191
name = "bytes"
192
version = "1.10.1"
@@ -308,6 +323,25 @@ version = "0.8.7"
323
source = "registry+https://github.com/rust-lang/crates.io-index"
324
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
325
326
+[[package]]
327
+name = "cpufeatures"
328
+version = "0.2.17"
329
+source = "registry+https://github.com/rust-lang/crates.io-index"
330
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
331
+dependencies = [
332
+ "libc",
333
+]
334
+
335
+[[package]]
336
+name = "crypto-common"
337
+version = "0.1.6"
338
+source = "registry+https://github.com/rust-lang/crates.io-index"
339
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
340
+dependencies = [
341
+ "generic-array",
342
+ "typenum",
343
+]
344
+
345
[[package]]
346
name = "deranged"
347
version = "0.4.0"
@@ -330,6 +364,17 @@ dependencies = [
364
"zeroize",
365
]
366
367
+[[package]]
368
+name = "digest"
369
+version = "0.10.7"
370
+source = "registry+https://github.com/rust-lang/crates.io-index"
371
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
372
+dependencies = [
373
+ "block-buffer",
374
+ "crypto-common",
375
+ "subtle",
376
+]
377
+
378
[[package]]
379
name = "dirs"
380
version = "6.0.0"
@@ -393,6 +438,12 @@ dependencies = [
438
"windows-sys 0.60.2",
439
]
440
441
+[[package]]
442
+name = "fallible-iterator"
443
+version = "0.2.0"
444
+source = "registry+https://github.com/rust-lang/crates.io-index"
445
+checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
446
+
447
[[package]]
448
name = "fastrand"
449
version = "2.3.0"
@@ -436,6 +487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
487
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
488
dependencies = [
489
"futures-core",
490
+ "futures-sink",
491
]
492
493
[[package]]
@@ -444,6 +496,17 @@ version = "0.3.31"
496
source = "registry+https://github.com/rust-lang/crates.io-index"
497
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
498
499
+[[package]]
500
+name = "futures-macro"
501
+version = "0.3.31"
502
+source = "registry+https://github.com/rust-lang/crates.io-index"
503
+checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
504
+dependencies = [
505
+ "proc-macro2",
506
+ "quote",
507
+ "syn 2.0.104",
508
+]
509
+
510
[[package]]
511
name = "futures-sink"
512
version = "0.3.31"
@@ -463,9 +526,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
526
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
527
dependencies = [
528
"futures-core",
529
+ "futures-macro",
530
+ "futures-sink",
531
"futures-task",
532
"pin-project-lite",
533
"pin-utils",
534
+ "slab",
535
+]
536
+
537
+[[package]]
538
+name = "generic-array"
539
+version = "0.14.7"
540
+source = "registry+https://github.com/rust-lang/crates.io-index"
541
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
542
+dependencies = [
543
+ "typenum",
544
+ "version_check",
545
]
546
547
[[package]]
@@ -522,6 +598,14 @@ dependencies = [
598
"url",
599
]
600
601
+[[package]]
602
+name = "gresiq"
603
+version = "0.1.0"
604
+dependencies = [
605
+ "tokio",
606
+ "tokio-postgres",
607
+]
608
+
609
[[package]]
610
name = "h2"
611
version = "0.4.11"
@@ -559,6 +643,15 @@ version = "0.5.0"
643
source = "registry+https://github.com/rust-lang/crates.io-index"
644
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
645
646
+[[package]]
647
+name = "hmac"
648
+version = "0.12.1"
649
+source = "registry+https://github.com/rust-lang/crates.io-index"
650
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
651
+dependencies = [
652
+ "digest",
653
+]
654
+
655
[[package]]
656
name = "home"
657
version = "0.5.11"
@@ -1034,6 +1127,16 @@ dependencies = [
1127
"syn 2.0.104",
1128
]
1129
1130
+[[package]]
1131
+name = "md-5"
1132
+version = "0.10.6"
1133
+source = "registry+https://github.com/rust-lang/crates.io-index"
1134
+checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
1135
+dependencies = [
1136
+ "cfg-if",
1137
+ "digest",
1138
+]
1139
+
1140
[[package]]
1141
name = "memchr"
1142
version = "2.7.5"
@@ -1242,6 +1345,24 @@ version = "2.3.1"
1345
source = "registry+https://github.com/rust-lang/crates.io-index"
1346
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
1347
1348
+[[package]]
1349
+name = "phf"
1350
+version = "0.11.3"
1351
+source = "registry+https://github.com/rust-lang/crates.io-index"
1352
+checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
1353
+dependencies = [
1354
+ "phf_shared",
1355
+]
1356
+
1357
+[[package]]
1358
+name = "phf_shared"
1359
+version = "0.11.3"
1360
+source = "registry+https://github.com/rust-lang/crates.io-index"
1361
+checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
1362
+dependencies = [
1363
+ "siphasher",
1364
+]
1365
+
1366
[[package]]
1367
name = "pin-project-lite"
1368
version = "0.2.16"
@@ -1266,6 +1387,35 @@ version = "1.11.1"
1387
source = "registry+https://github.com/rust-lang/crates.io-index"
1388
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
1389
1390
+[[package]]
1391
+name = "postgres-protocol"
1392
+version = "0.6.8"
1393
+source = "registry+https://github.com/rust-lang/crates.io-index"
1394
+checksum = "76ff0abab4a9b844b93ef7b81f1efc0a366062aaef2cd702c76256b5dc075c54"
1395
+dependencies = [
1396
+ "base64",
1397
+ "byteorder",
1398
+ "bytes",
1399
+ "fallible-iterator",
1400
+ "hmac",
1401
+ "md-5",
1402
+ "memchr",
1403
+ "rand",
1404
+ "sha2",
1405
+ "stringprep",
1406
+]
1407
+
1408
+[[package]]
1409
+name = "postgres-types"
1410
+version = "0.2.9"
1411
+source = "registry+https://github.com/rust-lang/crates.io-index"
1412
+checksum = "613283563cd90e1dfc3518d548caee47e0e725455ed619881f5cf21f36de4b48"
1413
+dependencies = [
1414
+ "bytes",
1415
+ "fallible-iterator",
1416
+ "postgres-protocol",
1417
+]
1418
+
1419
[[package]]
1420
name = "potential_utf"
1421
version = "0.1.2"
@@ -1281,6 +1431,15 @@ version = "0.2.0"
1431
source = "registry+https://github.com/rust-lang/crates.io-index"
1432
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
1433
1434
+[[package]]
1435
+name = "ppv-lite86"
1436
+version = "0.2.21"
1437
+source = "registry+https://github.com/rust-lang/crates.io-index"
1438
+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
1439
+dependencies = [
1440
+ "zerocopy",
1441
+]
1442
+
1443
[[package]]
1444
name = "proc-macro-error-attr2"
1445
version = "2.0.0"
@@ -1327,6 +1486,35 @@ version = "5.3.0"
1486
source = "registry+https://github.com/rust-lang/crates.io-index"
1487
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
1488
1489
+[[package]]
1490
+name = "rand"
1491
+version = "0.9.1"
1492
+source = "registry+https://github.com/rust-lang/crates.io-index"
1493
+checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"
1494
+dependencies = [
1495
+ "rand_chacha",
1496
+ "rand_core",
1497
+]
1498
+
1499
+[[package]]
1500
+name = "rand_chacha"
1501
+version = "0.9.0"
1502
+source = "registry+https://github.com/rust-lang/crates.io-index"
1503
+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
1504
+dependencies = [
1505
+ "ppv-lite86",
1506
+ "rand_core",
1507
+]
1508
+
1509
+[[package]]
1510
+name = "rand_core"
1511
+version = "0.9.3"
1512
+source = "registry+https://github.com/rust-lang/crates.io-index"
1513
+checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
1514
+dependencies = [
1515
+ "getrandom 0.3.3",
1516
+]
1517
+
1518
[[package]]
1519
name = "redox_syscall"
1520
version = "0.5.13"
@@ -1617,6 +1805,17 @@ dependencies = [
1805
"serde",
1806
]
1807
1808
+[[package]]
1809
+name = "sha2"
1810
+version = "0.10.9"
1811
+source = "registry+https://github.com/rust-lang/crates.io-index"
1812
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
1813
+dependencies = [
1814
+ "cfg-if",
1815
+ "cpufeatures",
1816
+ "digest",
1817
+]
1818
+
1819
[[package]]
1820
name = "sharded-slab"
1821
version = "0.1.7"
@@ -1647,6 +1846,12 @@ dependencies = [
1846
"libc",
1847
]
1848
1849
+[[package]]
1850
+name = "siphasher"
1851
+version = "1.0.1"
1852
+source = "registry+https://github.com/rust-lang/crates.io-index"
1853
+checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
1854
+
1855
[[package]]
1856
name = "slab"
1857
version = "0.4.10"
@@ -1788,6 +1993,17 @@ version = "1.2.0"
1993
source = "registry+https://github.com/rust-lang/crates.io-index"
1994
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
1995
1996
+[[package]]
1997
+name = "stringprep"
1998
+version = "0.1.5"
1999
+source = "registry+https://github.com/rust-lang/crates.io-index"
2000
+checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1"
2001
+dependencies = [
2002
+ "unicode-bidi",
2003
+ "unicode-normalization",
2004
+ "unicode-properties",
2005
+]
2006
+
2007
[[package]]
2008
name = "strsim"
2009
version = "0.11.1"
@@ -2040,6 +2256,21 @@ dependencies = [
2256
"zerovec",
2257
]
2258
2259
+[[package]]
2260
+name = "tinyvec"
2261
+version = "1.9.0"
2262
+source = "registry+https://github.com/rust-lang/crates.io-index"
2263
+checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71"
2264
+dependencies = [
2265
+ "tinyvec_macros",
2266
+]
2267
+
2268
+[[package]]
2269
+name = "tinyvec_macros"
2270
+version = "0.1.1"
2271
+source = "registry+https://github.com/rust-lang/crates.io-index"
2272
+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
2273
+
2274
[[package]]
2275
name = "tokio"
2276
version = "1.46.0"
@@ -2081,6 +2312,32 @@ dependencies = [
2312
"tokio",
2313
]
2314
2315
+[[package]]
2316
+name = "tokio-postgres"
2317
+version = "0.7.13"
2318
+source = "registry+https://github.com/rust-lang/crates.io-index"
2319
+checksum = "6c95d533c83082bb6490e0189acaa0bbeef9084e60471b696ca6988cd0541fb0"
2320
+dependencies = [
2321
+ "async-trait",
2322
+ "byteorder",
2323
+ "bytes",
2324
+ "fallible-iterator",
2325
+ "futures-channel",
2326
+ "futures-util",
2327
+ "log",
2328
+ "parking_lot",
2329
+ "percent-encoding",
2330
+ "phf",
2331
+ "pin-project-lite",
2332
+ "postgres-protocol",
2333
+ "postgres-types",
2334
+ "rand",
2335
+ "socket2",
2336
+ "tokio",
2337
+ "tokio-util",
2338
+ "whoami",
2339
+]
2340
+
2341
[[package]]
2342
name = "tokio-rustls"
2343
version = "0.26.2"
@@ -2287,12 +2544,39 @@ version = "0.2.5"
2544
source = "registry+https://github.com/rust-lang/crates.io-index"
2545
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
2546
2547
+[[package]]
2548
+name = "typenum"
2549
+version = "1.18.0"
2550
+source = "registry+https://github.com/rust-lang/crates.io-index"
2551
+checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
2552
+
2553
+[[package]]
2554
+name = "unicode-bidi"
2555
+version = "0.3.18"
2556
+source = "registry+https://github.com/rust-lang/crates.io-index"
2557
+checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"
2558
+
2559
[[package]]
2560
name = "unicode-ident"
2561
version = "1.0.18"
2562
source = "registry+https://github.com/rust-lang/crates.io-index"
2563
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
2564
2565
+[[package]]
2566
+name = "unicode-normalization"
2567
+version = "0.1.24"
2568
+source = "registry+https://github.com/rust-lang/crates.io-index"
2569
+checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956"
2570
+dependencies = [
2571
+ "tinyvec",
2572
+]
2573
+
2574
+[[package]]
2575
+name = "unicode-properties"
2576
+version = "0.1.3"
2577
+source = "registry+https://github.com/rust-lang/crates.io-index"
2578
+checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0"
2579
+
2580
[[package]]
2581
name = "unicode-width"
2582
version = "0.2.1"
@@ -2382,6 +2666,12 @@ dependencies = [
2666
"wit-bindgen-rt",
2667
]
2668
2669
+[[package]]
2670
+name = "wasite"
2671
+version = "0.1.0"
2672
+source = "registry+https://github.com/rust-lang/crates.io-index"
2673
+checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
2674
+
2675
[[package]]
2676
name = "wasm-bindgen"
2677
version = "0.2.100"
@@ -2473,6 +2763,17 @@ dependencies = [
2763
"wasm-bindgen",
2764
]
2765
2766
+[[package]]
2767
+name = "whoami"
2768
+version = "1.6.0"
2769
+source = "registry+https://github.com/rust-lang/crates.io-index"
2770
+checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7"
2771
+dependencies = [
2772
+ "redox_syscall",
2773
+ "wasite",
2774
+ "web-sys",
2775
+]
2776
+
2777
[[package]]
2778
name = "winapi"
2779
version = "0.3.9"
Cargo.toml
+2
@@ -2,6 +2,7 @@
2
resolver = "2"
3
members = [
4
"crates/cli",
5
+ "crates/gresiq",
6
"crates/smbcloud-model",
7
"crates/smbcloud-networking",
8
"crates/smbcloud-networking-project",
@@ -38,6 +39,7 @@ strum_macros = "0.27"
39
tabled = "0.20"
40
thiserror = "2.0"
41
tokio = "1.44"
42
+tokio-postgres = "0.7"
43
toml = "0.8"
44
tracing = "0.1.35"
45
tracing-bunyan-formatter = "0.3.3"
crates/gresiq/Cargo.toml
new
+10
@@ -0,0 +1,10 @@
1
+[package]
2
+name = "gresiq"
3
+description = "GresIQ is a serverlessPostgresSQL client for on the smbCloud platform."
4
+version = "0.1.0"
5
+edition = "2024"
6
+readme = "README.md"
7
+
8
+[dependencies]
9
+tokio = { workspace = true, features = ["full"] }
10
+tokio-postgres = { workspace = true }
crates/gresiq/README.md
new
+3
@@ -0,0 +1,3 @@
1
+# GresIQ
2
+
3
+GresIQ is a serverless PostgresSQL client for on the smbCloud platform.
crates/gresiq/src/main.rs
new
+27
@@ -0,0 +1,27 @@
1
+use tokio_postgres::{Error, NoTls};
2
+
3
+#[tokio::main]
4
+async fn main() -> Result<(), Error> {
5
+ println!("Hello, GresIQ client!");
6
+
7
+ // Connect to the database.
8
+ let (client, connection) =
9
+ tokio_postgres::connect("host=localhost user=postgres", NoTls).await?;
10
+
11
+ // The connection object performs the actual communication with the database,
12
+ // so spawn it off to run on its own.
13
+ tokio::spawn(async move {
14
+ if let Err(e) = connection.await {
15
+ eprintln!("connection error: {}", e);
16
+ }
17
+ });
18
+
19
+ // Now we can execute a simple statement that just returns its parameter.
20
+ let rows = client.query("SELECT $1::TEXT", &[&"hello world"]).await?;
21
+
22
+ // And then check that we got back the same string we sent over.
23
+ let value: &str = rows[0].get(0);
24
+ assert_eq!(value, "hello world");
25
+
26
+ Ok(())
27
+}