Skip to content

Commit

Permalink
Rename lib to sdk (surrealdb#4561)
Browse files Browse the repository at this point in the history
  • Loading branch information
rushmorem authored Aug 22, 2024
1 parent b23b25b commit 898d75b
Show file tree
Hide file tree
Showing 198 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Makefile.* @surrealdb/ci
Cargo.lock @surrealdb/security
Cargo.toml @surrealdb/security
core/Cargo.toml @surrealdb/security
lib/Cargo.toml @surrealdb/security
sdk/Cargo.toml @surrealdb/security
cackle.toml @surrealdb/security
supply-chain/* @surrealdb/security
deny.toml @surrealdb/security

# Code for fuzzing configuration
/lib/fuzz/ @surrealdb/security
/sdk/fuzz/ @surrealdb/security
SECURITY.md @surrealdb/security

# Code and tests for indexing
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}

- 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
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ storage-fdb-7_3 = ["surrealdb-core/kv-fdb-7_3"]
[workspace]
members = [
"core",
"lib",
"lib/examples/actix",
"lib/examples/axum",
"lib/examples/rocket",
"sdk",
"sdk/examples/actix",
"sdk/examples/axum",
"sdk/examples/rocket",
]

[profile.release]
Expand Down Expand Up @@ -118,7 +118,7 @@ semver = "1.0.20"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
serde_pack = { version = "1.1.2", package = "rmp-serde" }
surrealdb = { version = "2", path = "lib", features = [
surrealdb = { version = "2", path = "sdk", features = [
"protocol-http",
"protocol-ws",
"rustls",
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const BUILD_METADATA: &str = "SURREAL_BUILD_METADATA";

fn main() {
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=build.rs");
println!("cargo:rerun-if-changed=Cargo.toml");
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish = true
edition = "2021"
version = "2.0.0"
rust-version = "1.77.0"
readme = "../lib/CARGO.md"
readme = "../sdk/CARGO.md"
authors = ["Tobie Morgan Hitchcock <[email protected]>"]
description = "A scalable, distributed, collaborative, document-graph database, for the realtime web"
repository = "https://github.com/surrealdb/surrealdb"
Expand Down
2 changes: 1 addition & 1 deletion core/src/fnc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ mod tests {
for problem in problems {
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");
}
}
}
3 changes: 3 additions & 0 deletions core/src/gql/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::Function(_, _) => return Err(schema_error("Kind::Function 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 {
Expand Down Expand Up @@ -672,6 +673,7 @@ fn filter_from_type(
Kind::Array(_, _) => {}
Kind::Function(_, _) => {}
Kind::Range => {}
Kind::Literal(_) => {}
};
Ok(filter)
}
Expand Down Expand Up @@ -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::Range => Err(resolver_error("Ranges are not yet supported")),
Kind::Literal(_) => Err(resolver_error("Literals are not yet supported")),
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This folder contains integration tests for the `surreal` CLI binary.

See [`lib/tests`](../lib/tests/) for `surrealdb` library integration tests.
See [`sdk/tests`](../sdk/tests/) for `surrealdb` library integration tests.

To read server log output from these tests, you need to find the file containing the output.
You can find this file by setting `RUST_LOG=debug`.
2 changes: 1 addition & 1 deletion tests/sdk/local/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021"

[dependencies]
surrealdb = { path = "../../../lib", features = ["kv-mem"] }
surrealdb = { path = "../../../sdk", features = ["kv-mem"] }
tokio = { version = "1", features = ["full"] }

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion tests/sdk/remote/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021"

[dependencies]
surrealdb = { path = "../../../lib" }
surrealdb = { path = "../../../sdk" }
tokio = { version = "1", features = ["full"] }

[workspace]
Expand Down

0 comments on commit 898d75b

Please sign in to comment.