diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d1fcb1bc..42dbae54 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,7 +53,7 @@ jobs: - run: cargo clippy --all-targets -- -D warnings -D clippy::all working-directory: ./lib/sparopt - run: cargo clippy --all-targets -- -D warnings -D clippy::all - working-directory: ./lib + working-directory: ./lib/oxigraph - run: cargo clippy --all-targets -- -D warnings -D clippy::all working-directory: ./python - run: cargo clippy --all-targets -- -D warnings -D clippy::all @@ -87,7 +87,7 @@ jobs: target: wasm32-wasi component: clippy - run: cargo clippy --lib --tests --target wasm32-wasi -- -D warnings -D clippy::all - working-directory: ./lib + working-directory: ./lib/oxigraph - run: cargo clippy --target wasm32-wasi --features abi3 --no-default-features -- -D warnings -D clippy::all working-directory: ./python @@ -103,7 +103,7 @@ jobs: target: wasm32-unknown-emscripten component: clippy - run: cargo clippy --lib --tests --target wasm32-unknown-emscripten -- -D warnings -D clippy::all - working-directory: ./lib + working-directory: ./lib/oxigraph - run: cargo clippy --target wasm32-unknown-emscripten --features abi3 -- -D warnings -D clippy::all working-directory: ./python @@ -119,7 +119,7 @@ jobs: target: wasm32-unknown-unknown component: clippy - run: cargo clippy --lib --tests --target wasm32-unknown-unknown --features getrandom/custom --features oxsdatatypes/custom-now -- -D warnings -D clippy::all - working-directory: ./lib + working-directory: ./lib/oxigraph deny: runs-on: ubuntu-latest @@ -164,7 +164,7 @@ jobs: target: i686-unknown-linux-gnu - run: sudo apt-get update && sudo apt-get install -y g++-multilib - run: cargo test --target i686-unknown-linux-gnu --no-default-features --features http-client-rustls-native - working-directory: ./lib + working-directory: ./lib/oxigraph test_linux_msv: runs-on: ubuntu-latest @@ -250,7 +250,6 @@ jobs: with: version: 1.74.1 - run: cargo doc - working-directory: ./lib env: RUSTDOCFLAGS: -D warnings diff --git a/Cargo.lock b/Cargo.lock index b63ea4a0..e33d7c52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1018,7 +1018,7 @@ dependencies = [ [[package]] name = "oxigraph" -version = "0.4.0-alpha.3" +version = "0.4.0-alpha.3-dev" dependencies = [ "codspeed-criterion-compat", "digest", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "oxigraph-cli" -version = "0.4.0-alpha.3" +version = "0.4.0-alpha.3-dev" dependencies = [ "anyhow", "assert_cmd", @@ -1067,7 +1067,7 @@ dependencies = [ [[package]] name = "oxigraph-js" -version = "0.4.0-alpha.3" +version = "0.4.0-alpha.3-dev" dependencies = [ "console_error_panic_hook", "js-sys", @@ -1135,7 +1135,7 @@ dependencies = [ [[package]] name = "oxrocksdb-sys" -version = "0.4.0-alpha.3" +version = "0.4.0-alpha.3-dev" dependencies = [ "bindgen", "cc", @@ -1387,7 +1387,7 @@ dependencies = [ [[package]] name = "pyoxigraph" -version = "0.4.0-alpha.3" +version = "0.4.0-alpha.3-dev" dependencies = [ "oxigraph", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index 507f5023..91b1b7ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,24 +1,81 @@ [workspace] members = [ + "cli", "js", - "lib", + "lib/oxigraph", "lib/oxrdf", "lib/oxrdfio", "lib/oxrdfxml", "lib/oxsdatatypes", "lib/oxttl", - "lib/spargebra", "lib/sparesults", + "lib/spargebra", "lib/sparopt", "lib/sparql-smith", "oxrocksdb-sys", "python", - "cli", "testsuite" ] resolver = "2" -# TODO: use workspace.package shared metadata when https://github.com/obi1kenobi/cargo-semver-checks/issues/462 will be fixed +[workspace.package] +version = "0.4.0-alpha.3-dev" +authors = ["Tpt "] +license = "MIT OR Apache-2.0" +edition = "2021" +rust-version = "1.70" + +[workspace.dependencies] +anyhow = "1.0.72" +arbitrary = "1.3" +assert_cmd = "2.0" +assert_fs = "1.0" +bindgen = ">=0.60, <0.70" +cc = "1.0.73" +clap = "4.0" +codspeed-criterion-compat = "2.3.3" +console_error_panic_hook = "0.1.7" +digest = "0.10" +escargot = "0.5" +flate2 = "1.0" +getrandom = "0.2.8" +hex = "0.4" +js-sys = "0.3.60" +json-event-parser = "0.2.0-alpha.2" +libc = "0.2.147" +md-5 = "0.10" +memchr = "2.5" +oxhttp = "0.2.0-alpha.3" +oxigraph = { version = "0.4.0-alpha.3-dev", path = "./lib/oxigraph" } +oxilangtag = "0.1" +oxiri = "0.2.3-alpha.1" +oxrdf = { version = "0.2.0-alpha.2", path = "lib/oxrdf" } +oxrdfdatatypes = { version = "0.2.0-alpha.1", path = "lib/oxsdatatypes" } +oxrdfio = { version = "0.1.0-alpha.2", path = "lib/oxrdfio" } +oxrdfxml = { version = "0.1.0-alpha.2", path = "lib/oxrdfxml" } +oxrocksdb-sys = { version = "0.4.0-alpha.3-dev", path = "./oxrocksdb-sys" } +oxsdatatypes = { version = "0.2.0-alpha.1", path = "lib/oxsdatatypes" } +oxttl = { version = "0.1.0-alpha.2", path = "lib/oxttl" } +peg = "0.8" +pkg-config = "0.3.25" +predicates = ">=2.0, <4.0" +pyo3 = "0.20.1" +quick-xml = ">=0.29, <0.32" +rand = "0.8" +rayon-core = "1.11" +regex = "1.7" +sha1 = "0.10" +sha2 = "0.10" +siphasher = ">=0.3, <2.0" +sparesults = { version = "0.2.0-alpha.2", path = "lib/sparesults" } +spargebra = { version = "0.3.0-alpha.2", path = "lib/spargebra" } +sparopt = { version = "0.1.0-alpha.2", path = "lib/sparopt"} +text-diff = "0.4" +time = "0.3" +tokio = "1.29" +url = "2.4" +wasm-bindgen = "0.2.83" +zstd = ">=0.12, <0.14" [workspace.lints.rust] absolute_paths_not_starting_with_crate = "warn" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 0c00e383..88cef55c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "oxigraph-cli" -version = "0.4.0-alpha.3" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +version.workspace = true +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["RDF", "SPARQL", "graph-database", "database"] categories = ["command-line-utilities", "database"] @@ -11,12 +11,13 @@ homepage = "https://oxigraph.org/cli/" description = """ Oxigraph command line toolkit and SPARQL HTTP server """ -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [[bin]] name = "oxigraph" path = "src/main.rs" +doc = false [features] default = ["native-tls"] @@ -26,21 +27,21 @@ rustls-native = ["oxigraph/http-client-rustls-native"] rustls-webpki = ["oxigraph/http-client-rustls-webpki"] [dependencies] -anyhow = "1.0.72" -oxhttp = { version = "0.2.0-alpha.3", features = ["flate2"] } -clap = { version = "4.0", features = ["derive"] } -oxigraph = { version = "0.4.0-alpha.3", path = "../lib" } -rand = "0.8" -url = "2.4" -oxiri = "0.2.3-alpha.1" -flate2 = "1.0" -rayon-core = "1.11" +anyhow.workspace = true +clap = { workspace = true, features = ["derive"] } +flate2.workspace = true +oxhttp = { workspace = true, features = ["flate2"] } +oxigraph.workspace = true +oxiri.workspace = true +rand.workspace = true +rayon-core.workspace = true +url.workspace = true [dev-dependencies] -assert_cmd = "2.0" -assert_fs = "1.0" -escargot = "0.5" -predicates = ">=2.0, <4.0" +assert_cmd.workspace = true +assert_fs.workspace = true +escargot.workspace = true +predicates.workspace = true [lints] workspace = true diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index de97438f..8ce8daf3 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -10,13 +10,13 @@ cargo-fuzz = true [dependencies] anyhow = "1.0.72" libfuzzer-sys = "0.4" +oxigraph = { path = "../lib/oxigraph" } oxrdf = { path = "../lib/oxrdf", features = ["rdf-star"] } -oxttl = { path = "../lib/oxttl", features = ["rdf-star"] } oxrdfxml = { path = "../lib/oxrdfxml" } -spargebra = { path = "../lib/spargebra", features = ["rdf-star", "sep-0006"] } +oxttl = { path = "../lib/oxttl", features = ["rdf-star"] } sparesults = { path = "../lib/sparesults", features = ["rdf-star"] } +spargebra = { path = "../lib/spargebra", features = ["rdf-star", "sep-0006"] } sparql-smith = { path = "../lib/sparql-smith", features = ["sep-0006"] } -oxigraph = { path = "../lib" } [profile.release] codegen-units = 1 diff --git a/js/Cargo.toml b/js/Cargo.toml index 16764596..0b5156b3 100644 --- a/js/Cargo.toml +++ b/js/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "oxigraph-js" -version = "0.4.0-alpha.3" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +version.workspace = true +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["RDF", "N-Triples", "Turtle", "RDF/XML", "SPARQL"] repository = "https://github.com/oxigraph/oxigraph/tree/main/js" description = "JavaScript bindings of Oxigraph" -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true publish = false [lib] crate-type = ["cdylib"] name = "oxigraph" +doc = false [dependencies] -oxigraph = { path = "../lib", features = ["js"] } -wasm-bindgen = "0.2.83" -js-sys = "0.3.60" -console_error_panic_hook = "0.1.7" +console_error_panic_hook.workspace = true +js-sys.workspace = true +oxigraph = { workspace = true, features = ["js"] } +wasm-bindgen.workspace = true [lints] workspace = true diff --git a/lib/Cargo.toml b/lib/Cargo.toml deleted file mode 100644 index 12a62f22..00000000 --- a/lib/Cargo.toml +++ /dev/null @@ -1,69 +0,0 @@ -[package] -name = "oxigraph" -version = "0.4.0-alpha.3" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" -readme = "README.md" -keywords = ["RDF", "SPARQL", "graph-database", "database"] -categories = ["database-implementations"] -repository = "https://github.com/oxigraph/oxigraph/tree/main/lib" -homepage = "https://oxigraph.org/" -documentation = "https://docs.rs/oxigraph" -description = """ -a SPARQL database and RDF toolkit -""" -edition = "2021" -rust-version = "1.70" - -[features] -default = [] -js = ["getrandom/js", "oxsdatatypes/js", "js-sys"] -http-client = ["oxhttp"] -http-client-native-tls = ["http-client", "oxhttp/native-tls"] -http-client-rustls-webpki = ["http-client", "oxhttp/rustls-webpki"] -http-client-rustls-native = ["http-client", "oxhttp/rustls-native"] -rocksdb-pkg-config = ["oxrocksdb-sys/pkg-config"] -rocksdb-debug = [] - -[dependencies] -digest = "0.10" -hex = "0.4" -json-event-parser = "0.2.0-alpha.2" -md-5 = "0.10" -oxilangtag = "0.1" -oxiri = "0.2.3-alpha.1" -oxrdf = { version = "0.2.0-alpha.2", path = "oxrdf", features = ["rdf-star", "oxsdatatypes"] } -oxrdfio = { version = "0.1.0-alpha.2", path = "oxrdfio", features = ["rdf-star"] } -oxsdatatypes = { version = "0.2.0-alpha.1", path = "oxsdatatypes" } -rand = "0.8" -regex = "1.7" -sha1 = "0.10" -sha2 = "0.10" -siphasher = ">=0.3, <2.0" -sparesults = { version = "0.2.0-alpha.2", path = "sparesults", features = ["rdf-star"] } -spargebra = { version = "0.3.0-alpha.2", path = "spargebra", features = ["rdf-star", "sep-0002", "sep-0006"] } -sparopt = { version = "0.1.0-alpha.2", path = "sparopt", features = ["rdf-star", "sep-0002", "sep-0006"] } - -[target.'cfg(not(target_family = "wasm"))'.dependencies] -libc = "0.2.147" -oxrocksdb-sys = { version = "0.4.0-alpha.3", path = "../oxrocksdb-sys" } -oxhttp = { version = "0.2.0-alpha.3", optional = true } - -[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] -getrandom = "0.2.8" -js-sys = { version = "0.3.60", optional = true } - -[target.'cfg(not(target_family = "wasm"))'.dev-dependencies] -codspeed-criterion-compat = "2.3.3" -oxhttp = "0.2.0-alpha.3" -zstd = ">=0.12, <0.14" - -[lints] -workspace = true - -[package.metadata.docs.rs] -rustdoc-args = ["--cfg", "docsrs"] - -[[bench]] -name = "store" -harness = false diff --git a/lib/README.md b/lib/README.md index 4e4f72df..47d5eb4c 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,77 +1,13 @@ -Oxigraph -======== - -[![Latest Version](https://img.shields.io/crates/v/oxigraph.svg)](https://crates.io/crates/oxigraph) -[![Released API docs](https://docs.rs/oxigraph/badge.svg)](https://docs.rs/oxigraph) -[![Crates.io downloads](https://img.shields.io/crates/d/oxigraph)](https://crates.io/crates/oxigraph) -[![actions status](https://github.com/oxigraph/oxigraph/workflows/build/badge.svg)](https://github.com/oxigraph/oxigraph/actions) -[![Gitter](https://badges.gitter.im/oxigraph/community.svg)](https://gitter.im/oxigraph/community) - -Oxigraph is a graph database library implementing the [SPARQL](https://www.w3.org/TR/sparql11-overview/) standard. - -Its goal is to provide a compliant, safe and fast on-disk graph database. -It also provides a set of utility functions for reading, writing, and processing RDF files. - -Oxigraph is in heavy development and SPARQL query evaluation has not been optimized yet. - -Oxigraph also provides [a CLI tool](https://crates.io/crates/oxigraph-cli) and [a Python library](https://pyoxigraph.readthedocs.io/) based on this library. - - -Oxigraph implements the following specifications: -* [SPARQL 1.1 Query](https://www.w3.org/TR/sparql11-query/), [SPARQL 1.1 Update](https://www.w3.org/TR/sparql11-update/), and [SPARQL 1.1 Federated Query](https://www.w3.org/TR/sparql11-federated-query/). -* [Turtle](https://www.w3.org/TR/turtle/), [TriG](https://www.w3.org/TR/trig/), [N-Triples](https://www.w3.org/TR/n-triples/), [N-Quads](https://www.w3.org/TR/n-quads/), and [RDF XML](https://www.w3.org/TR/rdf-syntax-grammar/) RDF serialization formats for both data ingestion and retrieval using the [Rio library](https://github.com/oxigraph/rio). -* [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/), [SPARQL 1.1 Query Results JSON Format](https://www.w3.org/TR/sparql11-results-json/) and [SPARQL 1.1 Query Results CSV and TSV Formats](https://www.w3.org/TR/sparql11-results-csv-tsv/). - -A preliminary benchmark [is provided](../bench/README.md). Oxigraph internal design [is described on the wiki](https://github.com/oxigraph/oxigraph/wiki/Architecture). - -The main entry point of Oxigraph is the [`Store`](store::Store) struct: -```rust -use oxigraph::store::Store; -use oxigraph::model::*; -use oxigraph::sparql::QueryResults; - -let store = Store::new().unwrap(); - -// insertion -let ex = NamedNode::new("http://example.com").unwrap(); -let quad = Quad::new(ex.clone(), ex.clone(), ex.clone(), GraphName::DefaultGraph); -store.insert(&quad).unwrap(); - -// quad filter -let results = store.quads_for_pattern(Some(ex.as_ref().into()), None, None, None).collect::,_>>().unwrap(); -assert_eq!(vec![quad], results); - -// SPARQL query -if let QueryResults::Solutions(mut solutions) = store.query("SELECT ?s WHERE { ?s ?p ?o }").unwrap() { - assert_eq!(solutions.next().unwrap().unwrap().get("s"), Some(&ex.into())); -} -``` - -Some parts of this library are available as standalone crates: -* [`oxrdf`](https://crates.io/crates/oxrdf), datastructures encoding RDF basic concepts (the [`oxigraph::model`](crate::model) module). -* [`oxrdfio`](https://crates.io/crates/oxrdfio), a unified parser and serializer API for RDF formats (the [`oxigraph::io`](crate::io) module). It itself relies on: - * [`oxttl`](https://crates.io/crates/oxttl), N-Triple, N-Quad, Turtle, TriG and N3 parsing and serialization. - * [`oxrdfxml`](https://crates.io/crates/oxrdfxml), RDF/XML parsing and serialization. -* [`spargebra`](https://crates.io/crates/spargebra), a SPARQL parser. -* [`sparesults`](https://crates.io/crates/sparesults), parsers and serializers for SPARQL result formats. -* [`sparopt`](https://crates.io/crates/sparesults), a SPARQL optimizer. -* [`oxsdatatypes`](https://crates.io/crates/oxsdatatypes), an implementation of some XML Schema datatypes. - -To build the library locally, don't forget to clone the submodules using `git clone --recursive https://github.com/oxigraph/oxigraph.git` to clone the repository including submodules or `git submodule update --init` to add submodules to the already cloned repository. - - -## License - -This project is licensed under either of - -* Apache License, Version 2.0, ([LICENSE-APACHE](../LICENSE-APACHE) or - ``) -* MIT license ([LICENSE-MIT](../LICENSE-MIT) or - ``) - -at your option. - - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Oxigraph by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. +Oxigraph Rust crates +==================== + +Oxigraph is implemented in Rust. +It is composed on a main library, [`oxigraph`](./oxigraph) and a set of smaller crates used by the `oxigraph` crate: +* [`oxrdf`](./oxrdf), datastructures encoding RDF basic concepts (the `model` module of the `oxigraph` crate). +* [`oxrdfio`](./oxrdfio), a unified parser and serializer API for RDF formats (the `io` module of the `oxigraph` crate). It itself relies on: + * [`oxttl`](./oxttl), N-Triple, N-Quad, Turtle, TriG and N3 parsing and serialization. + * [`oxrdfxml`](./oxrdfxml), RDF/XML parsing and serialization. +* [`spargebra`](./spargebra), a SPARQL parser. +* [`sparesults`](./sparesults), parsers and serializers for SPARQL result formats (the `sparql::results` module of the `oxigraph` crate). +* [`sparopt`](./sparesults), a SPARQL optimizer. +* [`oxsdatatypes`](./oxsdatatypes), an implementation of some XML Schema datatypes. diff --git a/lib/oxigraph/Cargo.toml b/lib/oxigraph/Cargo.toml new file mode 100644 index 00000000..13f14476 --- /dev/null +++ b/lib/oxigraph/Cargo.toml @@ -0,0 +1,69 @@ +[package] +name = "oxigraph" +version.workspace = true +authors.workspace = true +license.workspace = true +readme = "README.md" +keywords = ["RDF", "SPARQL", "graph-database", "database"] +categories = ["database-implementations"] +repository = "https://github.com/oxigraph/oxigraph/tree/main/lib/oxigraph" +homepage = "https://oxigraph.org/" +documentation = "https://docs.rs/oxigraph" +description = """ +a SPARQL database and RDF toolkit +""" +edition.workspace = true +rust-version.workspace = true + +[features] +default = [] +js = ["getrandom/js", "oxsdatatypes/js", "js-sys"] +http-client = ["oxhttp"] +http-client-native-tls = ["http-client", "oxhttp/native-tls"] +http-client-rustls-webpki = ["http-client", "oxhttp/rustls-webpki"] +http-client-rustls-native = ["http-client", "oxhttp/rustls-native"] +rocksdb-pkg-config = ["oxrocksdb-sys/pkg-config"] +rocksdb-debug = [] + +[dependencies] +digest.workspace = true +hex.workspace = true +json-event-parser.workspace = true +md-5.workspace = true +oxilangtag.workspace = true +oxiri.workspace = true +oxrdf = { workspace = true, features = ["rdf-star", "oxsdatatypes"] } +oxrdfio = { workspace = true, features = ["rdf-star"] } +oxsdatatypes.workspace = true +rand.workspace = true +regex.workspace = true +sha1.workspace = true +sha2.workspace = true +siphasher.workspace = true +sparesults = { workspace = true, features = ["rdf-star"] } +spargebra = { workspace = true, features = ["rdf-star", "sep-0002", "sep-0006"] } +sparopt = { workspace = true, features = ["rdf-star", "sep-0002", "sep-0006"] } + +[target.'cfg(not(target_family = "wasm"))'.dependencies] +libc.workspace = true +oxhttp = { workspace = true, optional = true } +oxrocksdb-sys.workspace = true + +[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] +getrandom.workspace = true +js-sys = { workspace = true, optional = true } + +[target.'cfg(not(target_family = "wasm"))'.dev-dependencies] +codspeed-criterion-compat.workspace = true +oxhttp.workspace = true +zstd.workspace = true + +[lints] +workspace = true + +[package.metadata.docs.rs] +rustdoc-args = ["--cfg", "docsrs"] + +[[bench]] +name = "store" +harness = false diff --git a/lib/oxigraph/README.md b/lib/oxigraph/README.md new file mode 100644 index 00000000..98cd1c8b --- /dev/null +++ b/lib/oxigraph/README.md @@ -0,0 +1,77 @@ +Oxigraph +======== + +[![Latest Version](https://img.shields.io/crates/v/oxigraph.svg)](https://crates.io/crates/oxigraph) +[![Released API docs](https://docs.rs/oxigraph/badge.svg)](https://docs.rs/oxigraph) +[![Crates.io downloads](https://img.shields.io/crates/d/oxigraph)](https://crates.io/crates/oxigraph) +[![actions status](https://github.com/oxigraph/oxigraph/workflows/build/badge.svg)](https://github.com/oxigraph/oxigraph/actions) +[![Gitter](https://badges.gitter.im/oxigraph/community.svg)](https://gitter.im/oxigraph/community) + +Oxigraph is a graph database library implementing the [SPARQL](https://www.w3.org/TR/sparql11-overview/) standard. + +Its goal is to provide a compliant, safe and fast on-disk graph database. +It also provides a set of utility functions for reading, writing, and processing RDF files. + +Oxigraph is in heavy development and SPARQL query evaluation has not been optimized yet. + +Oxigraph also provides [a CLI tool](https://crates.io/crates/oxigraph-cli) and [a Python library](https://pyoxigraph.readthedocs.io/) based on this library. + + +Oxigraph implements the following specifications: +* [SPARQL 1.1 Query](https://www.w3.org/TR/sparql11-query/), [SPARQL 1.1 Update](https://www.w3.org/TR/sparql11-update/), and [SPARQL 1.1 Federated Query](https://www.w3.org/TR/sparql11-federated-query/). +* [Turtle](https://www.w3.org/TR/turtle/), [TriG](https://www.w3.org/TR/trig/), [N-Triples](https://www.w3.org/TR/n-triples/), [N-Quads](https://www.w3.org/TR/n-quads/), and [RDF XML](https://www.w3.org/TR/rdf-syntax-grammar/) RDF serialization formats for both data ingestion and retrieval using the [Rio library](https://github.com/oxigraph/rio). +* [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/), [SPARQL 1.1 Query Results JSON Format](https://www.w3.org/TR/sparql11-results-json/) and [SPARQL 1.1 Query Results CSV and TSV Formats](https://www.w3.org/TR/sparql11-results-csv-tsv/). + +A preliminary benchmark [is provided](../bench/README.md). Oxigraph internal design [is described on the wiki](https://github.com/oxigraph/oxigraph/wiki/Architecture). + +The main entry point of Oxigraph is the [`Store`](store::Store) struct: +```rust +use oxigraph::store::Store; +use oxigraph::model::*; +use oxigraph::sparql::QueryResults; + +let store = Store::new().unwrap(); + +// insertion +let ex = NamedNode::new("http://example.com").unwrap(); +let quad = Quad::new(ex.clone(), ex.clone(), ex.clone(), GraphName::DefaultGraph); +store.insert(&quad).unwrap(); + +// quad filter +let results = store.quads_for_pattern(Some(ex.as_ref().into()), None, None, None).collect::,_>>().unwrap(); +assert_eq!(vec![quad], results); + +// SPARQL query +if let QueryResults::Solutions(mut solutions) = store.query("SELECT ?s WHERE { ?s ?p ?o }").unwrap() { + assert_eq!(solutions.next().unwrap().unwrap().get("s"), Some(&ex.into())); +} +``` + +It is based on these crates that can be used separately: +* [`oxrdf`](https://crates.io/crates/oxrdf), datastructures encoding RDF basic concepts (the [`oxigraph::model`](crate::model) module). +* [`oxrdfio`](https://crates.io/crates/oxrdfio), a unified parser and serializer API for RDF formats (the [`oxigraph::io`](crate::io) module). It itself relies on: + * [`oxttl`](https://crates.io/crates/oxttl), N-Triple, N-Quad, Turtle, TriG and N3 parsing and serialization. + * [`oxrdfxml`](https://crates.io/crates/oxrdfxml), RDF/XML parsing and serialization. +* [`spargebra`](https://crates.io/crates/spargebra), a SPARQL parser. +* [`sparesults`](https://crates.io/crates/sparesults), parsers and serializers for SPARQL result formats (the [`oxigraph::sparql::results`](crate::sparql::results) module). +* [`sparopt`](https://crates.io/crates/sparesults), a SPARQL optimizer. +* [`oxsdatatypes`](https://crates.io/crates/oxsdatatypes), an implementation of some XML Schema datatypes. + +To build the library locally, don't forget to clone the submodules using `git clone --recursive https://github.com/oxigraph/oxigraph.git` to clone the repository including submodules or `git submodule update --init` to add submodules to the already cloned repository. + + +## License + +This project is licensed under either of + +* Apache License, Version 2.0, ([LICENSE-APACHE](../LICENSE-APACHE) or + ``) +* MIT license ([LICENSE-MIT](../LICENSE-MIT) or + ``) + +at your option. + + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Oxigraph by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. diff --git a/lib/benches/store.rs b/lib/oxigraph/benches/store.rs similarity index 100% rename from lib/benches/store.rs rename to lib/oxigraph/benches/store.rs diff --git a/lib/src/io/format.rs b/lib/oxigraph/src/io/format.rs similarity index 100% rename from lib/src/io/format.rs rename to lib/oxigraph/src/io/format.rs diff --git a/lib/src/io/mod.rs b/lib/oxigraph/src/io/mod.rs similarity index 100% rename from lib/src/io/mod.rs rename to lib/oxigraph/src/io/mod.rs diff --git a/lib/src/io/read.rs b/lib/oxigraph/src/io/read.rs similarity index 100% rename from lib/src/io/read.rs rename to lib/oxigraph/src/io/read.rs diff --git a/lib/src/io/write.rs b/lib/oxigraph/src/io/write.rs similarity index 100% rename from lib/src/io/write.rs rename to lib/oxigraph/src/io/write.rs diff --git a/lib/src/lib.rs b/lib/oxigraph/src/lib.rs similarity index 100% rename from lib/src/lib.rs rename to lib/oxigraph/src/lib.rs diff --git a/lib/src/model.rs b/lib/oxigraph/src/model.rs similarity index 100% rename from lib/src/model.rs rename to lib/oxigraph/src/model.rs diff --git a/lib/src/sparql/algebra.rs b/lib/oxigraph/src/sparql/algebra.rs similarity index 100% rename from lib/src/sparql/algebra.rs rename to lib/oxigraph/src/sparql/algebra.rs diff --git a/lib/src/sparql/dataset.rs b/lib/oxigraph/src/sparql/dataset.rs similarity index 100% rename from lib/src/sparql/dataset.rs rename to lib/oxigraph/src/sparql/dataset.rs diff --git a/lib/src/sparql/error.rs b/lib/oxigraph/src/sparql/error.rs similarity index 100% rename from lib/src/sparql/error.rs rename to lib/oxigraph/src/sparql/error.rs diff --git a/lib/src/sparql/eval.rs b/lib/oxigraph/src/sparql/eval.rs similarity index 100% rename from lib/src/sparql/eval.rs rename to lib/oxigraph/src/sparql/eval.rs diff --git a/lib/src/sparql/http/dummy.rs b/lib/oxigraph/src/sparql/http/dummy.rs similarity index 100% rename from lib/src/sparql/http/dummy.rs rename to lib/oxigraph/src/sparql/http/dummy.rs diff --git a/lib/src/sparql/http/mod.rs b/lib/oxigraph/src/sparql/http/mod.rs similarity index 100% rename from lib/src/sparql/http/mod.rs rename to lib/oxigraph/src/sparql/http/mod.rs diff --git a/lib/src/sparql/http/simple.rs b/lib/oxigraph/src/sparql/http/simple.rs similarity index 100% rename from lib/src/sparql/http/simple.rs rename to lib/oxigraph/src/sparql/http/simple.rs diff --git a/lib/src/sparql/mod.rs b/lib/oxigraph/src/sparql/mod.rs similarity index 100% rename from lib/src/sparql/mod.rs rename to lib/oxigraph/src/sparql/mod.rs diff --git a/lib/src/sparql/model.rs b/lib/oxigraph/src/sparql/model.rs similarity index 100% rename from lib/src/sparql/model.rs rename to lib/oxigraph/src/sparql/model.rs diff --git a/lib/src/sparql/results.rs b/lib/oxigraph/src/sparql/results.rs similarity index 100% rename from lib/src/sparql/results.rs rename to lib/oxigraph/src/sparql/results.rs diff --git a/lib/src/sparql/service.rs b/lib/oxigraph/src/sparql/service.rs similarity index 100% rename from lib/src/sparql/service.rs rename to lib/oxigraph/src/sparql/service.rs diff --git a/lib/src/sparql/update.rs b/lib/oxigraph/src/sparql/update.rs similarity index 100% rename from lib/src/sparql/update.rs rename to lib/oxigraph/src/sparql/update.rs diff --git a/lib/src/storage/backend/fallback.rs b/lib/oxigraph/src/storage/backend/fallback.rs similarity index 100% rename from lib/src/storage/backend/fallback.rs rename to lib/oxigraph/src/storage/backend/fallback.rs diff --git a/lib/src/storage/backend/mod.rs b/lib/oxigraph/src/storage/backend/mod.rs similarity index 100% rename from lib/src/storage/backend/mod.rs rename to lib/oxigraph/src/storage/backend/mod.rs diff --git a/lib/src/storage/backend/rocksdb.rs b/lib/oxigraph/src/storage/backend/rocksdb.rs similarity index 100% rename from lib/src/storage/backend/rocksdb.rs rename to lib/oxigraph/src/storage/backend/rocksdb.rs diff --git a/lib/src/storage/binary_encoder.rs b/lib/oxigraph/src/storage/binary_encoder.rs similarity index 100% rename from lib/src/storage/binary_encoder.rs rename to lib/oxigraph/src/storage/binary_encoder.rs diff --git a/lib/src/storage/error.rs b/lib/oxigraph/src/storage/error.rs similarity index 100% rename from lib/src/storage/error.rs rename to lib/oxigraph/src/storage/error.rs diff --git a/lib/src/storage/mod.rs b/lib/oxigraph/src/storage/mod.rs similarity index 100% rename from lib/src/storage/mod.rs rename to lib/oxigraph/src/storage/mod.rs diff --git a/lib/src/storage/numeric_encoder.rs b/lib/oxigraph/src/storage/numeric_encoder.rs similarity index 100% rename from lib/src/storage/numeric_encoder.rs rename to lib/oxigraph/src/storage/numeric_encoder.rs diff --git a/lib/src/storage/small_string.rs b/lib/oxigraph/src/storage/small_string.rs similarity index 100% rename from lib/src/storage/small_string.rs rename to lib/oxigraph/src/storage/small_string.rs diff --git a/lib/src/store.rs b/lib/oxigraph/src/store.rs similarity index 100% rename from lib/src/store.rs rename to lib/oxigraph/src/store.rs diff --git a/lib/tests/rocksdb_bc_data/000003.log b/lib/oxigraph/tests/rocksdb_bc_data/000003.log similarity index 100% rename from lib/tests/rocksdb_bc_data/000003.log rename to lib/oxigraph/tests/rocksdb_bc_data/000003.log diff --git a/lib/tests/rocksdb_bc_data/CURRENT b/lib/oxigraph/tests/rocksdb_bc_data/CURRENT similarity index 100% rename from lib/tests/rocksdb_bc_data/CURRENT rename to lib/oxigraph/tests/rocksdb_bc_data/CURRENT diff --git a/lib/tests/rocksdb_bc_data/IDENTITY b/lib/oxigraph/tests/rocksdb_bc_data/IDENTITY similarity index 100% rename from lib/tests/rocksdb_bc_data/IDENTITY rename to lib/oxigraph/tests/rocksdb_bc_data/IDENTITY diff --git a/lib/tests/rocksdb_bc_data/LOCK b/lib/oxigraph/tests/rocksdb_bc_data/LOCK similarity index 100% rename from lib/tests/rocksdb_bc_data/LOCK rename to lib/oxigraph/tests/rocksdb_bc_data/LOCK diff --git a/lib/tests/rocksdb_bc_data/MANIFEST-000004 b/lib/oxigraph/tests/rocksdb_bc_data/MANIFEST-000004 similarity index 100% rename from lib/tests/rocksdb_bc_data/MANIFEST-000004 rename to lib/oxigraph/tests/rocksdb_bc_data/MANIFEST-000004 diff --git a/lib/tests/rocksdb_bc_data/OPTIONS-000026 b/lib/oxigraph/tests/rocksdb_bc_data/OPTIONS-000026 similarity index 100% rename from lib/tests/rocksdb_bc_data/OPTIONS-000026 rename to lib/oxigraph/tests/rocksdb_bc_data/OPTIONS-000026 diff --git a/lib/tests/store.rs b/lib/oxigraph/tests/store.rs similarity index 100% rename from lib/tests/store.rs rename to lib/oxigraph/tests/store.rs diff --git a/lib/oxrdf/Cargo.toml b/lib/oxrdf/Cargo.toml index 93fbf18d..5acda6b6 100644 --- a/lib/oxrdf/Cargo.toml +++ b/lib/oxrdf/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "oxrdf" version = "0.2.0-alpha.2" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["RDF"] repository = "https://github.com/oxigraph/oxigraph/tree/main/lib/oxrdf" @@ -10,18 +10,18 @@ description = """ A library providing basic data structures related to RDF """ documentation = "https://docs.rs/oxrdf" -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [features] default = [] rdf-star = [] [dependencies] -rand = "0.8" -oxilangtag = "0.1" -oxiri = "0.2.3-alpha.1" -oxsdatatypes = { version = "0.2.0-alpha.1", path = "../oxsdatatypes", optional = true } +oxilangtag.workspace = true +oxiri.workspace = true +oxsdatatypes = { workspace = true, optional = true } +rand.workspace = true [lints] workspace = true diff --git a/lib/oxrdfio/Cargo.toml b/lib/oxrdfio/Cargo.toml index 1d10c046..84e398f1 100644 --- a/lib/oxrdfio/Cargo.toml +++ b/lib/oxrdfio/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "oxrdfio" version = "0.1.0-alpha.2" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["RDF"] repository = "https://github.com/oxigraph/oxigraph/tree/master/lib/oxrdfxml" @@ -10,8 +10,8 @@ documentation = "https://docs.rs/oxrdfio" description = """ Parser and serializer for various RDF formats """ -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [features] default = [] @@ -19,13 +19,13 @@ async-tokio = ["dep:tokio", "oxrdfxml/async-tokio", "oxttl/async-tokio"] rdf-star = ["oxrdf/rdf-star", "oxttl/rdf-star"] [dependencies] -oxrdf = { version = "0.2.0-alpha.2", path = "../oxrdf" } -oxrdfxml = { version = "0.1.0-alpha.2", path = "../oxrdfxml" } -oxttl = { version = "0.1.0-alpha.2", path = "../oxttl" } -tokio = { version = "1.29", optional = true, features = ["io-util"] } +oxrdf.workspace = true +oxrdfxml.workspace = true +oxttl.workspace = true +tokio = { workspace = true, optional = true, features = ["io-util"] } [dev-dependencies] -tokio = { version = "1.29", features = ["rt", "macros"] } +tokio = { workspace = true, features = ["rt", "macros"] } [lints] workspace = true diff --git a/lib/oxrdfxml/Cargo.toml b/lib/oxrdfxml/Cargo.toml index c1a6e18f..2ed9b248 100644 --- a/lib/oxrdfxml/Cargo.toml +++ b/lib/oxrdfxml/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "oxrdfxml" version = "0.1.0-alpha.2" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["RDFXML", "XML", "RDF"] repository = "https://github.com/oxigraph/oxigraph/tree/master/lib/oxrdfxml" @@ -10,22 +10,22 @@ description = """ Parser and serializer for the RDF/XML format """ documentation = "https://docs.rs/oxrdfxml" -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [features] default = [] async-tokio = ["dep:tokio", "quick-xml/async-tokio"] [dependencies] -oxrdf = { version = "0.2.0-alpha.2", path = "../oxrdf" } -oxilangtag = "0.1" -oxiri = "0.2.3-alpha.1" -quick-xml = ">=0.29, <0.32" -tokio = { version = "1.29", optional = true, features = ["io-util"] } +oxilangtag.workspace = true +oxiri.workspace = true +oxrdf.workspace = true +quick-xml.workspace = true +tokio = { workspace = true, optional = true, features = ["io-util"] } [dev-dependencies] -tokio = { version = "1.29", features = ["rt", "macros"] } +tokio = { workspace = true, features = ["rt", "macros"] } [lints] workspace = true diff --git a/lib/oxsdatatypes/Cargo.toml b/lib/oxsdatatypes/Cargo.toml index f7bc1f31..fb63c125 100644 --- a/lib/oxsdatatypes/Cargo.toml +++ b/lib/oxsdatatypes/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "oxsdatatypes" version = "0.2.0-alpha.1" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["XSD"] repository = "https://github.com/oxigraph/oxigraph/tree/main/lib/oxsdatatypes" @@ -10,15 +10,15 @@ description = """ An implementation of some XSD datatypes for SPARQL implementations """ documentation = "https://docs.rs/oxsdatatypes" -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [features] js = ["js-sys"] custom-now = [] [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] -js-sys = { version = "0.3.60", optional = true } +js-sys = { workspace = true, optional = true } [lints] workspace = true diff --git a/lib/oxttl/Cargo.toml b/lib/oxttl/Cargo.toml index d18cb7e0..6f4f48ff 100644 --- a/lib/oxttl/Cargo.toml +++ b/lib/oxttl/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "oxttl" version = "0.1.0-alpha.2" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["N-Triples", "N-Quads", "Turtle", "TriG", "N3"] repository = "https://github.com/oxigraph/oxigraph/tree/master/lib/oxttl" @@ -10,8 +10,8 @@ description = """ Parser and serializer for languages related to RDF Turtle (N-Triples, N-Quads, Turtle, TriG and N3) """ documentation = "https://docs.rs/oxttl" -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [features] default = [] @@ -19,14 +19,14 @@ rdf-star = ["oxrdf/rdf-star"] async-tokio = ["dep:tokio"] [dependencies] -memchr = "2.5" -oxrdf = { version = "0.2.0-alpha.2", path = "../oxrdf" } -oxiri = "0.2.3-alpha.1" -oxilangtag = "0.1" -tokio = { version = "1.29", optional = true, features = ["io-util"] } +memchr.workspace = true +oxrdf.workspace = true +oxiri.workspace = true +oxilangtag.workspace = true +tokio = { workspace = true, optional = true, features = ["io-util"] } [dev-dependencies] -tokio = { version = "1.29", features = ["rt", "macros"] } +tokio = { workspace = true, features = ["rt", "macros"] } [lints] workspace = true diff --git a/lib/sparesults/Cargo.toml b/lib/sparesults/Cargo.toml index 35d03deb..75c5a0bb 100644 --- a/lib/sparesults/Cargo.toml +++ b/lib/sparesults/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "sparesults" version = "0.2.0-alpha.2" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["SPARQL"] repository = "https://github.com/oxigraph/oxigraph/tree/main/lib/sparesults" @@ -10,8 +10,8 @@ description = """ SPARQL query results formats parsers and serializers """ documentation = "https://docs.rs/sparesults" -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [features] default = [] @@ -19,14 +19,14 @@ rdf-star = ["oxrdf/rdf-star"] async-tokio = ["dep:tokio", "quick-xml/async-tokio", "json-event-parser/async-tokio"] [dependencies] -json-event-parser = "0.2.0-alpha.2" -memchr = "2.5" -oxrdf = { version = "0.2.0-alpha.2", path = "../oxrdf" } -quick-xml = ">=0.29, <0.32" -tokio = { version = "1.29", optional = true, features = ["io-util"] } +json-event-parser.workspace = true +memchr.workspace = true +oxrdf.workspace = true +quick-xml.workspace = true +tokio = { workspace = true, optional = true, features = ["io-util"] } [dev-dependencies] -tokio = { version = "1.29", features = ["rt", "macros"] } +tokio = { workspace = true, features = ["rt", "macros"] } [lints] workspace = true diff --git a/lib/spargebra/Cargo.toml b/lib/spargebra/Cargo.toml index ac6c049b..24acb482 100644 --- a/lib/spargebra/Cargo.toml +++ b/lib/spargebra/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "spargebra" version = "0.3.0-alpha.2" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["SPARQL"] repository = "https://github.com/oxigraph/oxigraph/tree/main/lib/spargebra" @@ -10,8 +10,8 @@ documentation = "https://docs.rs/spargebra" description = """ A SPARQL parser """ -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [features] default = [] @@ -20,11 +20,11 @@ sep-0002 = [] sep-0006 = [] [dependencies] -peg = "0.8" -rand = "0.8" -oxiri = "0.2.3-alpha.1" -oxilangtag = "0.1" -oxrdf = { version = "0.2.0-alpha.2", path = "../oxrdf" } +oxilangtag.workspace = true +oxiri.workspace = true +oxrdf.workspace = true +peg.workspace = true +rand.workspace = true [lints] workspace = true diff --git a/lib/sparopt/Cargo.toml b/lib/sparopt/Cargo.toml index c0f397ab..541e2ea3 100644 --- a/lib/sparopt/Cargo.toml +++ b/lib/sparopt/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "sparopt" version = "0.1.0-alpha.2" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["SPARQL"] repository = "https://github.com/oxigraph/oxigraph/tree/main/lib/sparopt" @@ -10,8 +10,8 @@ documentation = "https://docs.rs/sparopt" description = """ A SPARQL optimizer """ -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [features] default = [] @@ -20,9 +20,9 @@ sep-0002 = ["spargebra/sep-0002"] sep-0006 = ["spargebra/sep-0006"] [dependencies] -oxrdf = { version = "0.2.0-alpha.2", path = "../oxrdf" } -rand = "0.8" -spargebra = { version = "0.3.0-alpha.2", path = "../spargebra" } +oxrdf.workspace = true +rand.workspace = true +spargebra.workspace = true [lints] workspace = true diff --git a/lib/sparql-smith/Cargo.toml b/lib/sparql-smith/Cargo.toml index b18b94df..5d0a5680 100644 --- a/lib/sparql-smith/Cargo.toml +++ b/lib/sparql-smith/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "sparql-smith" version = "0.1.0-alpha.5" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["SPARQL"] repository = "https://github.com/oxigraph/oxigraph/tree/main/lib/sparql-smith" @@ -10,8 +10,8 @@ documentation = "https://docs.rs/sparql-smith" description = """ A SPARQL test cases generator """ -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true [features] default = [] @@ -23,4 +23,4 @@ sep-0006 = [] workspace = true [dependencies] -arbitrary = { version = "1.3", features = ["derive"] } +arbitrary = { workspace = true, features = ["derive"] } diff --git a/oxrocksdb-sys/Cargo.toml b/oxrocksdb-sys/Cargo.toml index 3af73776..1c99afd2 100644 --- a/oxrocksdb-sys/Cargo.toml +++ b/oxrocksdb-sys/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "oxrocksdb-sys" -version = "0.4.0-alpha.3" -authors = ["Tpt "] +version.workspace = true +authors.workspace = true license = "GPL-2.0 OR Apache-2.0" repository = "https://github.com/oxigraph/oxigraph/tree/main/oxrocksdb-sys" readme = "README.md" @@ -9,8 +9,8 @@ description = """ Rust bindings for RocksDB for Oxigraph usage. """ documentation = "https://docs.rs/oxrocksdb-sys" -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true build = "build.rs" links = "rocksdb" @@ -18,9 +18,9 @@ links = "rocksdb" pkg-config = ["dep:pkg-config"] [dependencies] -libc = "0.2.147" +libc.workspace = true [build-dependencies] -pkg-config = { version = "0.3.25", optional = true } -bindgen = ">=0.60, <0.70" -cc = { version = "1.0.73", features = ["parallel"] } +bindgen.workspace = true +cc = { workspace = true, features = ["parallel"] } +pkg-config = { workspace = true, optional = true } diff --git a/python/Cargo.lock b/python/Cargo.lock deleted file mode 120000 index 09fdd3b6..00000000 --- a/python/Cargo.lock +++ /dev/null @@ -1 +0,0 @@ -../Cargo.lock \ No newline at end of file diff --git a/python/Cargo.toml b/python/Cargo.toml index 31d1f812..e1abf1be 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -1,37 +1,38 @@ [package] name = "pyoxigraph" -version = "0.4.0-alpha.3" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +version.workspace = true +authors.workspace = true +license.workspace = true readme = "README.md" keywords = ["RDF", "SPARQL", "graph-database", "database"] repository = "https://github.com/oxigraph/oxigraph/tree/main/python" homepage = "https://pyoxigraph.readthedocs.io/" description = "Python bindings of Oxigraph, a SPARQL database and RDF toolkit" -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true publish = false [lib] crate-type = ["cdylib"] name = "pyoxigraph" doctest = false +doc = false [features] abi3 = ["pyo3/abi3-py38"] rocksdb-pkg-config = ["oxigraph/rocksdb-pkg-config"] [dependencies] -pyo3 = { version = "0.20.1", features = ["extension-module"] } +pyo3 = { workspace = true, features = ["extension-module"] } [target.'cfg(any(target_family = "windows", target_os = "macos", target_os = "ios"))'.dependencies] -oxigraph = { path = "../lib", features = ["http-client-native-tls"] } +oxigraph = { workspace = true, features = ["http-client-native-tls"] } [target.'cfg(target_family = "wasm")'.dependencies] -oxigraph.path = "../lib" +oxigraph.workspace = true [target.'cfg(not(any(target_family = "windows", target_os = "macos", target_os = "ios", target_family = "wasm")))'.dependencies] -oxigraph = { path = "../lib", features = ["http-client-rustls-native"] } +oxigraph = { workspace = true, features = ["http-client-rustls-native"] } [lints] workspace = true diff --git a/testsuite/Cargo.toml b/testsuite/Cargo.toml index 1ddccd11..6218880d 100644 --- a/testsuite/Cargo.toml +++ b/testsuite/Cargo.toml @@ -1,27 +1,27 @@ [package] name = "oxigraph-testsuite" version = "0.0.0" -authors = ["Tpt "] -license = "MIT OR Apache-2.0" +authors.workspace = true +license.workspace = true description = """ Implementation of W3C testsuites for Oxigraph """ -edition = "2021" -rust-version = "1.70" +edition.workspace = true +rust-version.workspace = true publish = false [dependencies] -anyhow = "1.0.72" -clap = { version = "4.0", features = ["derive"] } -oxigraph.path = "../lib" -oxttl.path = "../lib/oxttl" -sparopt.path = "../lib/sparopt" -spargebra.path = "../lib/spargebra" -text-diff = "0.4" -time = { version = "0.3", features = ["formatting"] } +anyhow.workspace = true +clap = { workspace = true, features = ["derive"] } +oxigraph.workspace = true +oxttl.workspace = true +spargebra.workspace = true +sparopt.workspace = true +text-diff.workspace = true +time = { workspace = true, features = ["formatting"] } [dev-dependencies] -codspeed-criterion-compat = "2.3.3" +codspeed-criterion-compat.workspace = true [lints] workspace = true