Rename lib to sdk (#4561)

This commit is contained in:
Rushmore Mushambi 2024-08-22 11:26:03 +01:00 committed by GitHub
parent b23b25b7d1
commit 898d75b744
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
198 changed files with 17 additions and 14 deletions

4
.github/CODEOWNERS vendored
View file

@ -20,13 +20,13 @@ Makefile.* @surrealdb/ci
Cargo.lock @surrealdb/security Cargo.lock @surrealdb/security
Cargo.toml @surrealdb/security Cargo.toml @surrealdb/security
core/Cargo.toml @surrealdb/security core/Cargo.toml @surrealdb/security
lib/Cargo.toml @surrealdb/security sdk/Cargo.toml @surrealdb/security
cackle.toml @surrealdb/security cackle.toml @surrealdb/security
supply-chain/* @surrealdb/security supply-chain/* @surrealdb/security
deny.toml @surrealdb/security deny.toml @surrealdb/security
# Code for fuzzing configuration # Code for fuzzing configuration
/lib/fuzz/ @surrealdb/security /sdk/fuzz/ @surrealdb/security
SECURITY.md @surrealdb/security SECURITY.md @surrealdb/security
# Code and tests for indexing # Code and tests for indexing

View file

@ -85,7 +85,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }} save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Check fuzzers - name: Check fuzzers
run: cargo build --manifest-path lib/fuzz/Cargo.toml run: cargo build --manifest-path sdk/fuzz/Cargo.toml
- name: Check OSS-Fuzz - name: Check OSS-Fuzz
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master

View file

@ -33,10 +33,10 @@ storage-fdb-7_3 = ["surrealdb-core/kv-fdb-7_3"]
[workspace] [workspace]
members = [ members = [
"core", "core",
"lib", "sdk",
"lib/examples/actix", "sdk/examples/actix",
"lib/examples/axum", "sdk/examples/axum",
"lib/examples/rocket", "sdk/examples/rocket",
] ]
[profile.release] [profile.release]
@ -118,7 +118,7 @@ semver = "1.0.20"
serde = { version = "1.0.193", features = ["derive"] } serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108" serde_json = "1.0.108"
serde_pack = { version = "1.1.2", package = "rmp-serde" } serde_pack = { version = "1.1.2", package = "rmp-serde" }
surrealdb = { version = "2", path = "lib", features = [ surrealdb = { version = "2", path = "sdk", features = [
"protocol-http", "protocol-http",
"protocol-ws", "protocol-ws",
"rustls", "rustls",

View file

@ -6,7 +6,7 @@ const BUILD_METADATA: &str = "SURREAL_BUILD_METADATA";
fn main() { fn main() {
println!("cargo:rerun-if-env-changed={BUILD_METADATA}"); println!("cargo:rerun-if-env-changed={BUILD_METADATA}");
println!("cargo:rerun-if-changed=lib"); println!("cargo:rerun-if-changed=sdk");
println!("cargo:rerun-if-changed=src"); println!("cargo:rerun-if-changed=src");
println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=Cargo.toml"); println!("cargo:rerun-if-changed=Cargo.toml");

View file

@ -4,7 +4,7 @@ publish = true
edition = "2021" edition = "2021"
version = "2.0.0" version = "2.0.0"
rust-version = "1.77.0" rust-version = "1.77.0"
readme = "../lib/CARGO.md" readme = "../sdk/CARGO.md"
authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"] authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"]
description = "A scalable, distributed, collaborative, document-graph database, for the realtime web" description = "A scalable, distributed, collaborative, document-graph database, for the realtime web"
repository = "https://github.com/surrealdb/surrealdb" repository = "https://github.com/surrealdb/surrealdb"

View file

@ -878,7 +878,7 @@ mod tests {
for problem in problems { for problem in problems {
eprintln!(" - {problem}"); eprintln!(" - {problem}");
} }
panic!("ensure functions can be parsed in lib/src/sql/function.rs and are exported to JS in lib/src/fnc/script/modules/surrealdb"); panic!("ensure functions can be parsed in core/src/sql/function.rs and are exported to JS in core/src/fnc/script/modules/surrealdb");
} }
} }
} }

View file

@ -608,6 +608,7 @@ fn kind_to_type(kind: Kind, types: &mut Vec<Type>) -> Result<TypeRef, GqlError>
Kind::Array(k, _) => TypeRef::List(Box::new(kind_to_type(*k, types)?)), Kind::Array(k, _) => TypeRef::List(Box::new(kind_to_type(*k, types)?)),
Kind::Function(_, _) => return Err(schema_error("Kind::Function is not yet supported")), Kind::Function(_, _) => return Err(schema_error("Kind::Function is not yet supported")),
Kind::Range => return Err(schema_error("Kind::Range is not yet supported")), Kind::Range => return Err(schema_error("Kind::Range is not yet supported")),
Kind::Literal(_) => return Err(schema_error("Kind::Literal is not yet supported")),
}; };
let out = match optional { let out = match optional {
@ -672,6 +673,7 @@ fn filter_from_type(
Kind::Array(_, _) => {} Kind::Array(_, _) => {}
Kind::Function(_, _) => {} Kind::Function(_, _) => {}
Kind::Range => {} Kind::Range => {}
Kind::Literal(_) => {}
}; };
Ok(filter) Ok(filter)
} }
@ -1113,5 +1115,6 @@ fn gql_to_sql_kind(val: &GqlValue, kind: Kind) -> Result<SqlValue, GqlError> {
}, },
Kind::Function(_, _) => Err(resolver_error("Sets are not yet supported")), Kind::Function(_, _) => Err(resolver_error("Sets are not yet supported")),
Kind::Range => Err(resolver_error("Ranges are not yet supported")), Kind::Range => Err(resolver_error("Ranges are not yet supported")),
Kind::Literal(_) => Err(resolver_error("Literals are not yet supported")),
} }
} }

Some files were not shown because too many files have changed in this diff Show more