Move rust client to /client/rust.

This commit is contained in:
Sebastian Jeltsch
2025-07-24 17:04:09 +02:00
parent 69db5c591e
commit d88ca74795
17 changed files with 8 additions and 57 deletions

View File

@@ -1,4 +1,4 @@
exclude: '(trailbase-core/bindings|bindings)/.*'
exclude: '(trailbase-assets/js/bindings|trailbase-schema/bindings|vendor)/.*'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks

View File

@@ -1,7 +1,7 @@
[workspace]
resolver = "2"
members = [
"client/trailbase-rs",
"client/rust",
"docs/examples/record_api_rs",
"examples/custom-binary",
"trailbase-apalis",
@@ -18,7 +18,7 @@ members = [
"vendor/sqlean",
]
default-members = [
"client/trailbase-rs",
"client/rust",
"trailbase-assets",
"trailbase-build",
"trailbase-cli",
@@ -67,8 +67,9 @@ tokio = { version = "^1.38.0", features = ["macros", "rt-multi-thread", "fs", "s
tracing = { version = "0.1.40", default-features = false }
tracing-subscriber = { version = "0.3.18", default-features = false, features = ["smallvec", "std", "fmt", "json"] }
trailbase-apalis = { path = "trailbase-apalis", version = "0.1.0" }
trailbase-build = { path = "trailbase-build", version = "0.1.1" }
trailbase-assets = { path = "trailbase-assets", version = "0.2.0" }
trailbase-build = { path = "trailbase-build", version = "0.1.1" }
trailbase-client = { path = "client/rust", version = "0.5.0" }
trailbase-sqlean = { path = "vendor/sqlean", version = "0.0.3" }
trailbase-extension = { path = "trailbase-extension", version = "0.3.0" }
trailbase-js = { path = "trailbase-js", version = "0.2.0" }

View File

@@ -19,7 +19,7 @@ const PORT: u16 = 4057;
fn start_server() -> Result<Server, std::io::Error> {
let cwd = std::env::current_dir()?;
assert!(cwd.ends_with("trailbase-rs"));
assert!(cwd.ends_with("rust"));
let command_cwd = cwd.parent().unwrap().parent().unwrap();
let depot_path = "client/testfixture";

View File

@@ -9,4 +9,4 @@ anyhow = "1.0.95"
futures = "0.3.31"
serde_json = "1.0.137"
tokio = { workspace = true }
trailbase-client = { path = "../../../client/trailbase-rs/" }
trailbase-client = { workspace = true }

1
trailbase-schema/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
bindings/

View File

@@ -1,3 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Check = { name: string | null, expr: string, };

View File

@@ -1,5 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ColumnDataType } from "./ColumnDataType";
import type { ColumnOption } from "./ColumnOption";
export type Column = { name: string, data_type: ColumnDataType, options: Array<ColumnOption>, };

View File

@@ -1,3 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type ColumnDataType = "Null" | "Any" | "Blob" | "Text" | "Integer" | "Real" | "Numeric" | "JSON" | "JSONB" | "Int" | "TinyInt" | "SmallInt" | "MediumInt" | "BigInt" | "UnignedBigInt" | "Int2" | "Int4" | "Int8" | "Character" | "Varchar" | "VaryingCharacter" | "NChar" | "NativeCharacter" | "NVarChar" | "Clob" | "Double" | "DoublePrecision" | "Float" | "Boolean" | "Decimal" | "Date" | "DateTime";

View File

@@ -1,6 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ConflictResolution } from "./ConflictResolution";
import type { GeneratedExpressionMode } from "./GeneratedExpressionMode";
import type { ReferentialAction } from "./ReferentialAction";
export type ColumnOption = "Null" | "NotNull" | { "Default": string } | { "Unique": { is_primary: boolean, conflict_clause: ConflictResolution | null, } } | { "ForeignKey": { foreign_table: string, referred_columns: Array<string>, on_delete: ReferentialAction | null, on_update: ReferentialAction | null, } } | { "Check": string } | { "OnUpdate": string } | { "Generated": { expr: string, mode: GeneratedExpressionMode | null, } };

View File

@@ -1,6 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* Conflict resolution types
*/
export type ConflictResolution = "Rollback" | "Abort" | "Fail" | "Ignore" | "Replace";

View File

@@ -1,4 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ReferentialAction } from "./ReferentialAction";
export type ForeignKey = { name: string | null, columns: Array<string>, foreign_table: string, referred_columns: Array<string>, on_delete: ReferentialAction | null, on_update: ReferentialAction | null, };

View File

@@ -1,3 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type GeneratedExpressionMode = "Virtual" | "Stored";

View File

@@ -1,3 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type ReferentialAction = "Restrict" | "Cascade" | "SetNull" | "NoAction" | "SetDefault";

View File

@@ -1,7 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Check } from "./Check";
import type { Column } from "./Column";
import type { ForeignKey } from "./ForeignKey";
import type { UniqueConstraint } from "./UniqueConstraint";
export type Table = { name: string, strict: boolean, columns: Array<Column>, foreign_keys: Array<ForeignKey>, unique: Array<UniqueConstraint>, checks: Array<Check>, virtual_table: boolean, temporary: boolean, };

View File

@@ -1,11 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ConflictResolution } from "./ConflictResolution";
export type UniqueConstraint = { name: string | null,
/**
* Identifiers of the columns that are unique.
*
* TODO: Should be indexed/ordered column, e.g. ASC/DESC:
* https://www.sqlite.org/syntax/indexed-column.html
*/
columns: Array<string>, conflict_clause: ConflictResolution | null, };