diff --git a/.evergreen/build-static-test-tarball.sh b/.evergreen/build-static-test-tarball.sh index 8c923e062..6ce9c8db7 100644 --- a/.evergreen/build-static-test-tarball.sh +++ b/.evergreen/build-static-test-tarball.sh @@ -10,7 +10,7 @@ cp ${TEST_FILES}/* test_files export RUSTFLAGS="-C target-feature=+crt-static" cargo test ${BUILD_FEATURES} --target x86_64-unknown-linux-gnu get_exe_name -TEST_BINARY=$(cat exe_name.txt) +TEST_BINARY=$(cat driver/exe_name.txt) TEST_TARBALL="/tmp/mongo-rust-driver.tar.gz" tar czvf ${TEST_TARBALL} ${TEST_BINARY} ./.evergreen test_files diff --git a/.evergreen/check-rustdoc.sh b/.evergreen/check-rustdoc.sh index cebd17dbc..ff6d903c0 100755 --- a/.evergreen/check-rustdoc.sh +++ b/.evergreen/check-rustdoc.sh @@ -12,11 +12,11 @@ source ./.evergreen/env.sh # build process. # build with all available features to ensure all optional dependencies are brought in too. -cargo +nightly build --all-features +cargo +nightly build --package mongodb --all-features cargo clean chmod -R 555 ${CARGO_HOME}/registry/src # this invocation mirrors the way docs.rs builds our documentation (see the [package.metadata.docs.rs] section # in Cargo.toml). -cargo +nightly rustdoc --all-features -- -D warnings --cfg docsrs +cargo +nightly rustdoc --package mongodb --all-features -- -D warnings --cfg docsrs diff --git a/.evergreen/check-rustfmt.sh b/.evergreen/check-rustfmt.sh index c42ee9efb..c5bb8ed3f 100755 --- a/.evergreen/check-rustfmt.sh +++ b/.evergreen/check-rustfmt.sh @@ -3,5 +3,4 @@ set -o errexit source ./.evergreen/env.sh -rustfmt +nightly --unstable-features --check src/**/*.rs -rustfmt +nightly --unstable-features --check src/*.rs +cargo +nightly fmt --check -- --unstable-features diff --git a/.evergreen/compile-only.sh b/.evergreen/compile-only.sh index 3a1cd44b3..9f3a1076e 100755 --- a/.evergreen/compile-only.sh +++ b/.evergreen/compile-only.sh @@ -12,7 +12,7 @@ if [ "$RUST_VERSION" != "" ]; then # The MSRV resolver does not properly select an MSRV-compliant version # for this transient dependency. - cargo add aws-sdk-sts@1.73 + cargo add --package mongodb aws-sdk-sts@1.73 CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback cargo +nightly -Zmsrv-policy generate-lockfile fi @@ -21,7 +21,7 @@ fi cargo $TOOLCHAIN build # Test with all features. -cargo $TOOLCHAIN build --all-features +cargo $TOOLCHAIN build --package mongodb --all-features # Test with no default features. -cargo $TOOLCHAIN build --no-default-features --features compat-3-3-0,bson-3,rustls-tls +cargo $TOOLCHAIN build --package mongodb --no-default-features --features compat-3-3-0,bson-3,rustls-tls diff --git a/.evergreen/release-danger-do-not-run-manually.sh b/.evergreen/release-danger-do-not-run-manually.sh index 0f0534469..642850569 100755 --- a/.evergreen/release-danger-do-not-run-manually.sh +++ b/.evergreen/release-danger-do-not-run-manually.sh @@ -26,13 +26,9 @@ if [[ "${DRY_RUN}" == "yes" ]]; then fi if [[ "${PACKAGE_ONLY}" == "yes" ]]; then - pushd macros - cargo package --no-verify --allow-dirty - popd - cargo package --no-verify --allow-dirty + cargo package --package mongodb-internal-macros --no-verify --allow-dirty + cargo package --package mongodb --no-verify --allow-dirty else - pushd macros - cargo publish ${EXTRA} - popd - cargo publish ${EXTRA} + cargo publish --package mongodb-internal-macros ${EXTRA} + cargo publish --package mongodb ${EXTRA} fi diff --git a/.evergreen/release-sign.sh b/.evergreen/release-sign.sh index ef41532ac..b3df0b77c 100644 --- a/.evergreen/release-sign.sh +++ b/.evergreen/release-sign.sh @@ -22,4 +22,4 @@ docker run \ -v $(pwd):$(pwd) \ -w $(pwd) \ 901841024863.dkr.ecr.us-east-1.amazonaws.com/release-infrastructure/garasign-gpg \ - /bin/bash -c "gpgloader && gpg --yes -v --armor -o mongodb-internal-macros-${CRATE_VERSION}.sig --detach-sign macros/target/package/mongodb-internal-macros-${CRATE_VERSION}.crate" + /bin/bash -c "gpgloader && gpg --yes -v --armor -o mongodb-internal-macros-${CRATE_VERSION}.sig --detach-sign target/package/mongodb-internal-macros-${CRATE_VERSION}.crate" diff --git a/.evergreen/run-gssapi-tests.sh b/.evergreen/run-gssapi-tests.sh index 17c6e7a06..d16582f3d 100644 --- a/.evergreen/run-gssapi-tests.sh +++ b/.evergreen/run-gssapi-tests.sh @@ -21,6 +21,7 @@ set +o errexit # is similar to but distinct from (KRB5) GSSAPI. Therefore, we only # run the following steps if we are not on Windows. if [[ "cygwin" != "$OSTYPE" ]]; then + pushd driver # Create a krb5 config file with relevant touch krb5.conf echo "[realms] @@ -45,6 +46,7 @@ if [[ "cygwin" != "$OSTYPE" ]]; then echo "Authenticating $PRINCIPAL" echo "$SASL_PASS" | kinit -p $PRINCIPAL klist + popd fi # Run end-to-end auth tests for "$PRINCIPAL" user @@ -52,6 +54,7 @@ TEST_OPTIONS+=("--skip with_service_realm_and_host_options") cargo_test test::auth::gssapi_skip_local if [[ "cygwin" != "$OSTYPE" ]]; then + pushd driver # Unauthenticate echo "Unauthenticating $PRINCIPAL" kdestroy @@ -60,15 +63,18 @@ if [[ "cygwin" != "$OSTYPE" ]]; then echo "Authenticating $PRINCIPAL_CROSS" echo "$SASL_PASS_CROSS" | kinit -p $PRINCIPAL_CROSS klist + popd fi TEST_OPTIONS=() cargo_test test::auth::gssapi_skip_local::with_service_realm_and_host_options if [[ "cygwin" != "$OSTYPE" ]]; then + pushd driver # Unauthenticate echo "Unauthenticating $PRINCIPAL_CROSS" kdestroy + popd fi # Run remaining tests diff --git a/.semgrepignore b/.semgrepignore index e5a071c74..a15d00092 100644 --- a/.semgrepignore +++ b/.semgrepignore @@ -1,3 +1,3 @@ benchmarks/ -src/test/ +driver/src/test/ etc/ \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index bf39ef162..baf348a8b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,6 +50,56 @@ dependencies = [ "memchr", ] +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" +dependencies = [ + "windows-sys 0.60.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.60.2", +] + [[package]] name = "anyhow" version = "1.0.100" @@ -673,6 +723,33 @@ dependencies = [ "libloading", ] +[[package]] +name = "clap" +version = "4.5.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.5.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_lex" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" + [[package]] name = "cmake" version = "0.1.54" @@ -682,6 +759,25 @@ dependencies = [ "cc", ] +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "console" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b430743a6eb14e9764d4260d4c0d8123087d504eeb9c48f2b2a5e810dd369df4" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width", + "windows-sys 0.61.0", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -973,6 +1069,12 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -1083,7 +1185,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "569d2238870f92cff64fc810013b61edaf446ebcfba36b649b96bc5b4078328a" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 0.1.5", "quote", "syn 1.0.109", ] @@ -1502,7 +1604,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.5.10", + "socket2 0.6.1", "system-configuration", "tokio", "tower-service", @@ -1628,6 +1730,18 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "indicatif" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" +dependencies = [ + "console", + "lazy_static", + "number_prefix", + "regex", +] + [[package]] name = "inout" version = "0.1.4" @@ -1666,6 +1780,12 @@ dependencies = [ "serde", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "itertools" version = "0.13.0" @@ -2106,6 +2226,33 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "number_prefix" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" + [[package]] name = "object" version = "0.37.3" @@ -2125,6 +2272,12 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + [[package]] name = "openssl" version = "0.10.75" @@ -2381,6 +2534,16 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + [[package]] name = "proc-macro2" version = "1.0.103" @@ -2403,7 +2566,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.5.10", + "socket2 0.6.1", "thiserror", "tokio", "tracing", @@ -2440,7 +2603,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.5.10", + "socket2 0.6.1", "tracing", "windows-sys 0.60.2", ] @@ -2629,6 +2792,25 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rust-driver-bench" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "clap", + "futures", + "futures-util", + "indicatif", + "mongodb", + "num_enum", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tokio-util", +] + [[package]] name = "rustc-demangle" version = "0.1.26" @@ -3329,6 +3511,23 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -3480,6 +3679,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + [[package]] name = "unicode-xid" version = "0.2.6" @@ -3516,6 +3721,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.18.1" @@ -4026,6 +4237,15 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index d129d4225..de38bd180 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,8 @@ -[package] +[workspace] +resolver = "2" +members = ["driver", "macros", "benchmarks"] + +[workspace.package] authors = [ "Saghm Rossi ", "Patrick Freed ", @@ -7,257 +11,7 @@ authors = [ "Kaitlin Mahar ", "Patrick Meredith ", ] -description = "The official MongoDB driver for Rust" +license = "Apache-2.0" edition = "2021" -keywords = ["mongo", "mongodb", "database", "bson", "nosql"] -categories = ["asynchronous", "database", "web-programming"] repository = "https://github.com/mongodb/mongo-rust-driver" -homepage = "https://www.mongodb.com/docs/drivers/rust/" -license = "Apache-2.0" -readme = "README.md" -name = "mongodb" -version = "3.3.0" -rust-version = "1.83" - -exclude = [ - "etc/**", - "rustfmt.toml", - ".evergreen/**", - ".gitignore", - "src/test/**", - "tests/**", -] - -[features] -default = ["compat-3-0-0", "rustls-tls", "dns-resolver"] -compat-3-0-0 = ["compat-3-3-0", "bson-2"] -compat-3-3-0 = [] -bson-2 = ["dep:bson2", "mongocrypt?/bson-2"] -bson-3 = ["dep:bson3", "mongocrypt?/bson-3"] -sync = [] -rustls-tls = ["dep:rustls", "dep:tokio-rustls", "dep:webpki-roots"] -openssl-tls = ["dep:openssl", "dep:openssl-probe", "dep:tokio-openssl"] -dns-resolver = ["dep:hickory-resolver", "dep:hickory-proto"] -cert-key-password = ["dep:pem", "dep:pkcs8"] - -# Enable support for MONGODB-AWS authentication. -aws-auth = ["dep:aws-config", "dep:aws-credential-types", "dep:aws-sigv4", "dep:chrono", "dep:http"] - -# Enable support for on-demand Azure KMS credentials. -azure-kms = ["dep:reqwest"] - -# Enable support for azure OIDC authentication. -azure-oidc = ["dep:reqwest"] - -# Enable support for gcp OIDC authentication. -gcp-oidc = ["dep:reqwest"] - -# Enable support for on-demand GCP KMS credentials. -gcp-kms = ["dep:reqwest"] - -# Enable support for GSSAPI (Kerberos) authentication. -gssapi-auth = ["dep:cross-krb5", "dep:windows-sys", "dns-resolver"] - -zstd-compression = ["dep:zstd"] -zlib-compression = ["dep:flate2"] -snappy-compression = ["dep:snap"] - -# Enables support for client-side field level encryption and queryable encryption. -in-use-encryption = ["dep:mongocrypt", "dep:rayon", "dep:num_cpus"] -# The in-use encryption API is stable; this is for backwards compatibility. -in-use-encryption-unstable = ["in-use-encryption"] - -# Enables support for emitting tracing events. -# The tracing API is unstable and may have backwards-incompatible changes in minor version updates. -# TODO: pending https://github.com/tokio-rs/tracing/issues/2036 stop depending directly on log. -tracing-unstable = ["dep:tracing", "dep:log", "bson3?/serde_json-1"] - -# Enables support for text indexes in explicit encryption. This feature is in preview and should be -# used for experimental workloads only. This feature is unstable and its security is not guaranteed -# until released as Generally Available (GA). The GA version of this feature may not be backwards -# compatible with the preview version. -text-indexes-unstable = [] - -# Enable support for opentelemetry instrumentation -opentelemetry = ["dep:opentelemetry"] - -# Capture backtraces in errors. This can be slow, memory intensive, and very verbose. -error-backtrace = [] - -[dependencies] -base64 = "0.22" -bitflags = "2" -chrono = { version = "0.4.32", default-features = false, optional = true, features = [ - "now", - "std", -] } -derive_more = { version = "2", features = ["display", "from"] } -derive-where = "1.2.7" -flate2 = { version = "1.0", optional = true } -futures-io = "0.3.21" -futures-core = "0.3.14" -futures-util = { version = "0.3.14", features = ["io"] } -hex = "0.4.0" -hickory-proto = { version = "0.25", optional = true } -hickory-resolver = { version = "0.25", optional = true } -hmac = "0.12.1" -log = { version = "0.4.17", optional = true } -md-5 = "0.10.1" -mongodb-internal-macros = { path = "macros", version = "3.3.0" } -num_cpus = { version = "1.13.1", optional = true } -openssl = { version = "0.10.38", optional = true } -openssl-probe = { version = "0.1.5", optional = true } -opentelemetry = { version = "0.31.0", optional = true } -pem = { version = "3.0.4", optional = true } -percent-encoding = "2.0.0" -pkcs8 = { version = "0.10.2", features = ["encryption", "pkcs5"], optional = true } -rand = { version = "0.9", features = ["small_rng"] } -rayon = { version = "1.5.3", optional = true } -rustc_version_runtime = "0.3.0" -serde_with = { version = "3.8.1", default-features = false, features = ["macros"] } -sha1 = "0.10.0" -sha2 = "0.10.2" -snap = { version = "1.0.5", optional = true } -stringprep = "0.1.2" -strsim = "0.11.1" -take_mut = "0.2.2" -thiserror = "2" -tokio-openssl = { version = "0.6.3", optional = true } -tracing = { version = "0.1.36", optional = true } -typed-builder = "0.22.0" -webpki-roots = { version = "1", optional = true } -zstd = { version = "0.11.2", optional = true } -macro_magic = "0.5.1" -rustversion = "1.0.20" -tokio-util = { version = "0.7.0", features = ["compat"] } - -[dependencies.aws-config] -version = "1" -optional = true -default-features = false -features = ["default-https-client", "rt-tokio"] - - -[dependencies.aws-credential-types] -version = "1.2.4" -optional = true -default-features = false - -[dependencies.aws-sigv4] -version = "1.3.3" -optional = true -default-features = false -features = ["sign-http"] - -[dependencies.http] -version = "1.3" -optional = true -default-features = false - -[dependencies.bson2] -version = "2.15.0" -git = "https://github.com/mongodb/bson-rust" -branch = "2.15.x" -package = "bson" -optional = true - -[dependencies.bson3] -version = "3.0.0" -git = "https://github.com/mongodb/bson-rust" -branch = "main" -package = "bson" -optional = true -features = ["serde"] - -[dependencies.mongocrypt] -version = "0.3.1" -git = "https://github.com/mongodb/libmongocrypt-rust.git" -branch = "main" -default-features = false -optional = true - -[dependencies.pbkdf2] -version = "0.12.0" -default-features = false - -[dependencies.reqwest] -version = "0.12.12" -optional = true -default-features = false -features = ["json", "rustls-tls"] - -[dependencies.rustls] -version = "0.23.20" -optional = true -default-features = false -features = ["logging", "ring", "std", "tls12"] - -[dependencies.serde] -version = "1.0.125" -features = ["derive"] - -[dependencies.serde_bytes] -version = "0.11.5" - -[dependencies.tokio] -version = "1.17.0" -features = ["io-util", "sync", "macros", "net", "process", "rt", "time", "fs"] - -[dependencies.tokio-rustls] -version = "0.26" -optional = true -default-features = false -features = ["logging", "ring", "tls12"] - -[dependencies.uuid] -version = "1.1.2" -features = ["v4"] - -[dev-dependencies] -anyhow = { version = "1.0", features = ["backtrace"] } -approx = "0.5.1" -backtrace = { version = "0.3.68" } -chrono = { version = "0.4.32", default-features = false, features = ["std"] } -function_name = "0.2.1" -futures = "0.3" -hex = "0.4" -home = "0.5" -lambda_runtime = "0.6.0" -opentelemetry_sdk = { version = "0.31.0", features = ["testing"] } -pkcs8 = { version = "0.10.2", features = ["3des", "des-insecure", "sha1-insecure"] } -pretty_assertions = "1.3.0" -serde = { version = ">= 0.0.0", features = ["rc"] } -serde_json = "1.0.64" -semver = "1.0.0" -time = "0.3.9" -tokio = { version = ">= 0.0.0", features = ["fs", "parking_lot"] } -regex = "1.6.0" -reqwest = { version = "0.12.2", features = ["rustls-tls"] } -serde-hex = "0.1.0" -serde_path_to_error = "0.1" - -[dev-dependencies.bson3] -git = "https://github.com/mongodb/bson-rust" -branch = "main" -package = "bson" -version = "3.0.0" -features = ["serde", "serde_json-1"] - -[package.metadata.docs.rs] -rustdoc-args = ["--cfg", "docsrs"] -all-features = true - -[target.'cfg(not(wasi))'.dependencies] -socket2 = "0.6" - -# Target-specific dependencies for GSSAPI authentication -[target.'cfg(not(windows))'.dependencies] -cross-krb5 = { version = "0.4.2", optional = true, default-features = false } - -[target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.60", optional = true, features = ["Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Foundation", "Win32_System", "Win32_System_Rpc"] } - -[lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = [ - 'cfg(mongodb_internal_tracking_arc)', -] } +rust-version = "1.83" \ No newline at end of file diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 2cda221a4..354ca9763 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -1,13 +1,17 @@ [package] name = "rust-driver-bench" version = "0.1.0" -authors = ["benjirewis "] -edition = "2018" + +authors.workspace = true +license.workspace = true +edition.workspace = true +repository.workspace = true +rust-version.workspace = true [dependencies] -mongodb = { path = ".." } +mongodb = { path = "../driver" } serde_json = "1.0.59" -clap = "2.33.3" +clap = "4.5" indicatif = "0.15.0" async-trait = "0.1.41" tokio = { version = "1.6", features = ["sync", "fs"] } diff --git a/benchmarks/src/bench.rs b/benchmarks/src/bench.rs index b448254eb..fbdccb216 100644 --- a/benchmarks/src/bench.rs +++ b/benchmarks/src/bench.rs @@ -27,8 +27,8 @@ use mongodb::{ options::{Acknowledgment, ClientOptions, SelectionCriteria, WriteConcern}, Client, }; -use std::sync::LazyLock; use serde_json::Value; +use std::sync::LazyLock; use crate::fs::{BufReader, File}; @@ -39,19 +39,19 @@ static DATABASE_NAME: LazyLock = LazyLock::new(|| { }); static COLL_NAME: LazyLock = LazyLock::new(|| option_env!("COLL_NAME").unwrap_or("corpus").to_string()); - static MAX_EXECUTION_TIME: LazyLock = LazyLock::new(|| { +static MAX_EXECUTION_TIME: LazyLock = LazyLock::new(|| { option_env!("MAX_EXECUTION_TIME") .unwrap_or("300") .parse::() .expect("invalid MAX_EXECUTION_TIME") }); - static MIN_EXECUTION_TIME: LazyLock = LazyLock::new(|| { +static MIN_EXECUTION_TIME: LazyLock = LazyLock::new(|| { option_env!("MIN_EXECUTION_TIME") .unwrap_or("60") .parse::() .expect("invalid MIN_EXECUTION_TIME") }); - pub static TARGET_ITERATION_COUNT: LazyLock = LazyLock::new(|| { +pub static TARGET_ITERATION_COUNT: LazyLock = LazyLock::new(|| { option_env!("TARGET_ITERATION_COUNT") .unwrap_or("100") .parse::() diff --git a/benchmarks/src/main.rs b/benchmarks/src/main.rs index a0089d7e3..aa03ac6c7 100644 --- a/benchmarks/src/main.rs +++ b/benchmarks/src/main.rs @@ -15,7 +15,7 @@ mod score; use std::{collections::HashSet, convert::TryFrom, path::PathBuf}; use anyhow::Result; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgMatches, Command}; use futures::{Future, FutureExt}; use mongodb::options::ClientOptions; @@ -564,8 +564,8 @@ async fn run_benchmarks( } fn parse_ids(matches: ArgMatches) -> HashSet { - let mut ids: HashSet = match matches.value_of("ids") { - Some("all") => (1..=MAX_ID) + let mut ids: HashSet = match matches.get_one::("ids") { + Some(s) if s == "all" => (1..=MAX_ID) .map(|id| BenchmarkId::try_from(id).unwrap()) .collect(), Some(id_list) => id_list @@ -580,14 +580,14 @@ fn parse_ids(matches: ArgMatches) -> HashSet { None => HashSet::new(), }; - if matches.is_present("single") { + if matches.contains_id("single") { ids.insert(BenchmarkId::RunCommand); ids.insert(BenchmarkId::RunCommandColdStart); ids.insert(BenchmarkId::FindOneById); ids.insert(BenchmarkId::SmallDocInsertOne); ids.insert(BenchmarkId::LargeDocInsertOne); } - if matches.is_present("multi") { + if matches.contains_id("multi") { ids.insert(BenchmarkId::FindManyRawBson); ids.insert(BenchmarkId::SmallDocInsertMany); ids.insert(BenchmarkId::LargeDocInsertMany); @@ -597,14 +597,14 @@ fn parse_ids(matches: ArgMatches) -> HashSet { ids.insert(BenchmarkId::LargeDocInsertBulkWrite); ids.insert(BenchmarkId::MixedBulkWrite); } - if matches.is_present("parallel") { + if matches.contains_id("parallel") { ids.insert(BenchmarkId::LdJsonMultiFileImport); ids.insert(BenchmarkId::LdJsonMultiFileExport); ids.insert(BenchmarkId::GridFsMultiDownload); // TODO RUST-2010 Re-enable this benchmark //ids.insert(BenchmarkId::GridFsMultiUpload); } - if matches.is_present("bson") { + if matches.contains_id("bson") { ids.insert(BenchmarkId::BsonFlatDocumentDecode); ids.insert(BenchmarkId::BsonFlatDocumentEncode); ids.insert(BenchmarkId::BsonDeepDocumentDecode); @@ -612,7 +612,7 @@ fn parse_ids(matches: ArgMatches) -> HashSet { ids.insert(BenchmarkId::BsonFullDocumentDecode); ids.insert(BenchmarkId::BsonFullDocumentEncode); } - if matches.is_present("driver") { + if matches.contains_id("driver") { ids.insert(BenchmarkId::RunCommand); ids.insert(BenchmarkId::RunCommandColdStart); ids.insert(BenchmarkId::FindOneById); @@ -662,67 +662,69 @@ async fn main() { } id_help.push_str(" all: All benchmarks\n "); - let matches = App::new("RustDriverBenchmark") + let matches = Command::new("RustDriverBenchmark") .version(env!("CARGO_PKG_VERSION")) .about("Runs performance micro-bench") .author("benjirewis") .arg( - Arg::with_name("single") - .short("s") + Arg::new("single") + .short('s') .long("single") .help("Run single document benchmarks"), ) .arg( - Arg::with_name("multi") - .short("m") + Arg::new("multi") + .short('m') .long("multi") .help("Run multi document benchmarks"), ) .arg( - Arg::with_name("parallel") - .short("p") + Arg::new("parallel") + .short('p') .long("parallel") .help("Run parallel document benchmarks"), ) .arg( - Arg::with_name("bson") - .short("b") + Arg::new("bson") + .short('b') .long("bson") .help("Run BSON-only benchmarks"), ) .arg( - Arg::with_name("driver") - .short("d") + Arg::new("driver") + .short('d') .long("driver") .help("Run driver-only benchmarks"), ) .arg( - Arg::with_name("verbose") - .short("v") + Arg::new("verbose") + .short('v') .long("verbose") .help("Print test information verbosely"), ) .arg( - Arg::with_name("ids") - .short("i") + Arg::new("ids") + .short('i') .long("ids") - .takes_value(true) + .value_name("ID_LIST") .help("Run benchmarks by id number (comma-separated)") .long_help(&id_help), ) .arg( - Arg::with_name("output") - .short("o") + Arg::new("output") + .short('o') .long("output") - .takes_value(true) + .value_name("FILE") .help("Output file to contain the JSON data to be ingested by Evergreen"), ) .get_matches(); let uri = option_env!("MONGODB_URI").unwrap_or("mongodb://localhost:27017"); - let verbose = matches.is_present("verbose"); - let output_file = matches.value_of("output").map(|p| PathBuf::new().join(p)); + let verbose = matches.contains_id("verbose"); + let output_file = matches + .get_one::("output") + .map(|p| PathBuf::new().join(p)); println!( "Running tests{}...\n", diff --git a/driver/Cargo.toml b/driver/Cargo.toml new file mode 100644 index 000000000..bbc1ae70b --- /dev/null +++ b/driver/Cargo.toml @@ -0,0 +1,257 @@ +[package] +description = "The official MongoDB driver for Rust" +keywords = ["mongo", "mongodb", "database", "bson", "nosql"] +categories = ["asynchronous", "database", "web-programming"] +homepage = "https://www.mongodb.com/docs/drivers/rust/" +readme = "../README.md" +name = "mongodb" +version = "3.3.0" + +authors.workspace = true +license.workspace = true +edition.workspace = true +repository.workspace = true +rust-version.workspace = true + +exclude = [ + "etc/**", + "rustfmt.toml", + ".evergreen/**", + ".gitignore", + "src/test/**", + "tests/**", +] + +[features] +default = ["compat-3-0-0", "rustls-tls", "dns-resolver"] +compat-3-0-0 = ["compat-3-3-0", "bson-2"] +compat-3-3-0 = [] +bson-2 = ["dep:bson2", "mongocrypt?/bson-2"] +bson-3 = ["dep:bson3", "mongocrypt?/bson-3"] +sync = [] +rustls-tls = ["dep:rustls", "dep:tokio-rustls", "dep:webpki-roots"] +openssl-tls = ["dep:openssl", "dep:openssl-probe", "dep:tokio-openssl"] +dns-resolver = ["dep:hickory-resolver", "dep:hickory-proto"] +cert-key-password = ["dep:pem", "dep:pkcs8"] + +# Enable support for MONGODB-AWS authentication. +aws-auth = ["dep:aws-config", "dep:aws-credential-types", "dep:aws-sigv4", "dep:chrono", "dep:http"] + +# Enable support for on-demand Azure KMS credentials. +azure-kms = ["dep:reqwest"] + +# Enable support for azure OIDC authentication. +azure-oidc = ["dep:reqwest"] + +# Enable support for gcp OIDC authentication. +gcp-oidc = ["dep:reqwest"] + +# Enable support for on-demand GCP KMS credentials. +gcp-kms = ["dep:reqwest"] + +# Enable support for GSSAPI (Kerberos) authentication. +gssapi-auth = ["dep:cross-krb5", "dep:windows-sys", "dns-resolver"] + +zstd-compression = ["dep:zstd"] +zlib-compression = ["dep:flate2"] +snappy-compression = ["dep:snap"] + +# Enables support for client-side field level encryption and queryable encryption. +in-use-encryption = ["dep:mongocrypt", "dep:rayon", "dep:num_cpus"] +# The in-use encryption API is stable; this is for backwards compatibility. +in-use-encryption-unstable = ["in-use-encryption"] + +# Enables support for emitting tracing events. +# The tracing API is unstable and may have backwards-incompatible changes in minor version updates. +# TODO: pending https://github.com/tokio-rs/tracing/issues/2036 stop depending directly on log. +tracing-unstable = ["dep:tracing", "dep:log", "bson3?/serde_json-1"] + +# Enables support for text indexes in explicit encryption. This feature is in preview and should be +# used for experimental workloads only. This feature is unstable and its security is not guaranteed +# until released as Generally Available (GA). The GA version of this feature may not be backwards +# compatible with the preview version. +text-indexes-unstable = [] + +# Enable support for opentelemetry instrumentation +opentelemetry = ["dep:opentelemetry"] + +# Capture backtraces in errors. This can be slow, memory intensive, and very verbose. +error-backtrace = [] + +[dependencies] +base64 = "0.22" +bitflags = "2" +chrono = { version = "0.4.32", default-features = false, optional = true, features = [ + "now", + "std", +] } +derive_more = { version = "2", features = ["display", "from"] } +derive-where = "1.2.7" +flate2 = { version = "1.0", optional = true } +futures-io = "0.3.21" +futures-core = "0.3.14" +futures-util = { version = "0.3.14", features = ["io"] } +hex = "0.4.0" +hickory-proto = { version = "0.25", optional = true } +hickory-resolver = { version = "0.25", optional = true } +hmac = "0.12.1" +log = { version = "0.4.17", optional = true } +md-5 = "0.10.1" +mongodb-internal-macros = { path = "../macros", version = "3.3.0" } +num_cpus = { version = "1.13.1", optional = true } +openssl = { version = "0.10.38", optional = true } +openssl-probe = { version = "0.1.5", optional = true } +opentelemetry = { version = "0.31.0", optional = true } +pem = { version = "3.0.4", optional = true } +percent-encoding = "2.0.0" +pkcs8 = { version = "0.10.2", features = ["encryption", "pkcs5"], optional = true } +rand = { version = "0.9", features = ["small_rng"] } +rayon = { version = "1.5.3", optional = true } +rustc_version_runtime = "0.3.0" +serde_with = { version = "3.8.1", default-features = false, features = ["macros"] } +sha1 = "0.10.0" +sha2 = "0.10.2" +snap = { version = "1.0.5", optional = true } +stringprep = "0.1.2" +strsim = "0.11.1" +take_mut = "0.2.2" +thiserror = "2" +tokio-openssl = { version = "0.6.3", optional = true } +tracing = { version = "0.1.36", optional = true } +typed-builder = "0.22.0" +webpki-roots = { version = "1", optional = true } +zstd = { version = "0.11.2", optional = true } +macro_magic = "0.5.1" +rustversion = "1.0.20" +tokio-util = { version = "0.7.0", features = ["compat"] } + +[dependencies.aws-config] +version = "1" +optional = true +default-features = false +features = ["default-https-client", "rt-tokio"] + + +[dependencies.aws-credential-types] +version = "1.2.4" +optional = true +default-features = false + +[dependencies.aws-sigv4] +version = "1.3.3" +optional = true +default-features = false +features = ["sign-http"] + +[dependencies.http] +version = "1.3" +optional = true +default-features = false + +[dependencies.bson2] +version = "2.15.0" +git = "https://github.com/mongodb/bson-rust" +branch = "2.15.x" +package = "bson" +optional = true + +[dependencies.bson3] +version = "3.0.0" +git = "https://github.com/mongodb/bson-rust" +branch = "main" +package = "bson" +optional = true +features = ["serde"] + +[dependencies.mongocrypt] +version = "0.3.1" +git = "https://github.com/mongodb/libmongocrypt-rust.git" +branch = "main" +default-features = false +optional = true + +[dependencies.pbkdf2] +version = "0.12.0" +default-features = false + +[dependencies.reqwest] +version = "0.12.12" +optional = true +default-features = false +features = ["json", "rustls-tls"] + +[dependencies.rustls] +version = "0.23.20" +optional = true +default-features = false +features = ["logging", "ring", "std", "tls12"] + +[dependencies.serde] +version = "1.0.125" +features = ["derive"] + +[dependencies.serde_bytes] +version = "0.11.5" + +[dependencies.tokio] +version = "1.17.0" +features = ["io-util", "sync", "macros", "net", "process", "rt", "time", "fs"] + +[dependencies.tokio-rustls] +version = "0.26" +optional = true +default-features = false +features = ["logging", "ring", "tls12"] + +[dependencies.uuid] +version = "1.1.2" +features = ["v4"] + +[dev-dependencies] +anyhow = { version = "1.0", features = ["backtrace"] } +approx = "0.5.1" +backtrace = { version = "0.3.68" } +chrono = { version = "0.4.32", default-features = false, features = ["std"] } +function_name = "0.2.1" +futures = "0.3" +hex = "0.4" +home = "0.5" +lambda_runtime = "0.6.0" +opentelemetry_sdk = { version = "0.31.0", features = ["testing"] } +pkcs8 = { version = "0.10.2", features = ["3des", "des-insecure", "sha1-insecure"] } +pretty_assertions = "1.3.0" +serde = { version = ">= 0.0.0", features = ["rc"] } +serde_json = "1.0.64" +semver = "1.0.0" +time = "0.3.9" +tokio = { version = ">= 0.0.0", features = ["fs", "parking_lot"] } +regex = "1.6.0" +reqwest = { version = "0.12.2", features = ["rustls-tls"] } +serde-hex = "0.1.0" +serde_path_to_error = "0.1" + +[dev-dependencies.bson3] +git = "https://github.com/mongodb/bson-rust" +branch = "main" +package = "bson" +version = "3.0.0" +features = ["serde", "serde_json-1"] + +[package.metadata.docs.rs] +rustdoc-args = ["--cfg", "docsrs"] +all-features = true + +[target.'cfg(not(wasi))'.dependencies] +socket2 = "0.6" + +# Target-specific dependencies for GSSAPI authentication +[target.'cfg(not(windows))'.dependencies] +cross-krb5 = { version = "0.4.2", optional = true, default-features = false } + +[target.'cfg(windows)'.dependencies] +windows-sys = { version = "0.60", optional = true, features = ["Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Foundation", "Win32_System", "Win32_System_Rpc"] } + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(mongodb_internal_tracking_arc)', +] } diff --git a/src/action.rs b/driver/src/action.rs similarity index 100% rename from src/action.rs rename to driver/src/action.rs diff --git a/src/action/aggregate.rs b/driver/src/action/aggregate.rs similarity index 100% rename from src/action/aggregate.rs rename to driver/src/action/aggregate.rs diff --git a/src/action/bulk_write.rs b/driver/src/action/bulk_write.rs similarity index 100% rename from src/action/bulk_write.rs rename to driver/src/action/bulk_write.rs diff --git a/src/action/client_options.rs b/driver/src/action/client_options.rs similarity index 100% rename from src/action/client_options.rs rename to driver/src/action/client_options.rs diff --git a/src/action/count.rs b/driver/src/action/count.rs similarity index 100% rename from src/action/count.rs rename to driver/src/action/count.rs diff --git a/src/action/create_collection.rs b/driver/src/action/create_collection.rs similarity index 100% rename from src/action/create_collection.rs rename to driver/src/action/create_collection.rs diff --git a/src/action/create_index.rs b/driver/src/action/create_index.rs similarity index 100% rename from src/action/create_index.rs rename to driver/src/action/create_index.rs diff --git a/src/action/csfle.rs b/driver/src/action/csfle.rs similarity index 100% rename from src/action/csfle.rs rename to driver/src/action/csfle.rs diff --git a/src/action/csfle/create_data_key.rs b/driver/src/action/csfle/create_data_key.rs similarity index 100% rename from src/action/csfle/create_data_key.rs rename to driver/src/action/csfle/create_data_key.rs diff --git a/src/action/csfle/create_encrypted_collection.rs b/driver/src/action/csfle/create_encrypted_collection.rs similarity index 100% rename from src/action/csfle/create_encrypted_collection.rs rename to driver/src/action/csfle/create_encrypted_collection.rs diff --git a/src/action/csfle/encrypt.rs b/driver/src/action/csfle/encrypt.rs similarity index 100% rename from src/action/csfle/encrypt.rs rename to driver/src/action/csfle/encrypt.rs diff --git a/src/action/delete.rs b/driver/src/action/delete.rs similarity index 100% rename from src/action/delete.rs rename to driver/src/action/delete.rs diff --git a/src/action/distinct.rs b/driver/src/action/distinct.rs similarity index 100% rename from src/action/distinct.rs rename to driver/src/action/distinct.rs diff --git a/src/action/drop.rs b/driver/src/action/drop.rs similarity index 100% rename from src/action/drop.rs rename to driver/src/action/drop.rs diff --git a/src/action/drop_index.rs b/driver/src/action/drop_index.rs similarity index 100% rename from src/action/drop_index.rs rename to driver/src/action/drop_index.rs diff --git a/src/action/find.rs b/driver/src/action/find.rs similarity index 100% rename from src/action/find.rs rename to driver/src/action/find.rs diff --git a/src/action/find_and_modify.rs b/driver/src/action/find_and_modify.rs similarity index 100% rename from src/action/find_and_modify.rs rename to driver/src/action/find_and_modify.rs diff --git a/src/action/gridfs.rs b/driver/src/action/gridfs.rs similarity index 100% rename from src/action/gridfs.rs rename to driver/src/action/gridfs.rs diff --git a/src/action/gridfs/delete.rs b/driver/src/action/gridfs/delete.rs similarity index 100% rename from src/action/gridfs/delete.rs rename to driver/src/action/gridfs/delete.rs diff --git a/src/action/gridfs/download.rs b/driver/src/action/gridfs/download.rs similarity index 100% rename from src/action/gridfs/download.rs rename to driver/src/action/gridfs/download.rs diff --git a/src/action/gridfs/drop.rs b/driver/src/action/gridfs/drop.rs similarity index 100% rename from src/action/gridfs/drop.rs rename to driver/src/action/gridfs/drop.rs diff --git a/src/action/gridfs/find.rs b/driver/src/action/gridfs/find.rs similarity index 100% rename from src/action/gridfs/find.rs rename to driver/src/action/gridfs/find.rs diff --git a/src/action/gridfs/rename.rs b/driver/src/action/gridfs/rename.rs similarity index 100% rename from src/action/gridfs/rename.rs rename to driver/src/action/gridfs/rename.rs diff --git a/src/action/gridfs/upload.rs b/driver/src/action/gridfs/upload.rs similarity index 100% rename from src/action/gridfs/upload.rs rename to driver/src/action/gridfs/upload.rs diff --git a/src/action/insert_many.rs b/driver/src/action/insert_many.rs similarity index 100% rename from src/action/insert_many.rs rename to driver/src/action/insert_many.rs diff --git a/src/action/insert_one.rs b/driver/src/action/insert_one.rs similarity index 100% rename from src/action/insert_one.rs rename to driver/src/action/insert_one.rs diff --git a/src/action/list_collections.rs b/driver/src/action/list_collections.rs similarity index 100% rename from src/action/list_collections.rs rename to driver/src/action/list_collections.rs diff --git a/src/action/list_databases.rs b/driver/src/action/list_databases.rs similarity index 100% rename from src/action/list_databases.rs rename to driver/src/action/list_databases.rs diff --git a/src/action/list_indexes.rs b/driver/src/action/list_indexes.rs similarity index 100% rename from src/action/list_indexes.rs rename to driver/src/action/list_indexes.rs diff --git a/src/action/perf.rs b/driver/src/action/perf.rs similarity index 100% rename from src/action/perf.rs rename to driver/src/action/perf.rs diff --git a/src/action/replace_one.rs b/driver/src/action/replace_one.rs similarity index 100% rename from src/action/replace_one.rs rename to driver/src/action/replace_one.rs diff --git a/src/action/run_command.rs b/driver/src/action/run_command.rs similarity index 100% rename from src/action/run_command.rs rename to driver/src/action/run_command.rs diff --git a/src/action/search_index.rs b/driver/src/action/search_index.rs similarity index 100% rename from src/action/search_index.rs rename to driver/src/action/search_index.rs diff --git a/src/action/session.rs b/driver/src/action/session.rs similarity index 100% rename from src/action/session.rs rename to driver/src/action/session.rs diff --git a/src/action/shutdown.rs b/driver/src/action/shutdown.rs similarity index 100% rename from src/action/shutdown.rs rename to driver/src/action/shutdown.rs diff --git a/src/action/transaction.rs b/driver/src/action/transaction.rs similarity index 100% rename from src/action/transaction.rs rename to driver/src/action/transaction.rs diff --git a/src/action/update.rs b/driver/src/action/update.rs similarity index 100% rename from src/action/update.rs rename to driver/src/action/update.rs diff --git a/src/action/watch.rs b/driver/src/action/watch.rs similarity index 100% rename from src/action/watch.rs rename to driver/src/action/watch.rs diff --git a/src/atlas_search.rs b/driver/src/atlas_search.rs similarity index 100% rename from src/atlas_search.rs rename to driver/src/atlas_search.rs diff --git a/src/atlas_search/gen.rs b/driver/src/atlas_search/gen.rs similarity index 100% rename from src/atlas_search/gen.rs rename to driver/src/atlas_search/gen.rs diff --git a/src/base64.rs b/driver/src/base64.rs similarity index 100% rename from src/base64.rs rename to driver/src/base64.rs diff --git a/src/bson_compat.rs b/driver/src/bson_compat.rs similarity index 100% rename from src/bson_compat.rs rename to driver/src/bson_compat.rs diff --git a/src/bson_util.rs b/driver/src/bson_util.rs similarity index 100% rename from src/bson_util.rs rename to driver/src/bson_util.rs diff --git a/src/change_stream.rs b/driver/src/change_stream.rs similarity index 100% rename from src/change_stream.rs rename to driver/src/change_stream.rs diff --git a/src/change_stream/event.rs b/driver/src/change_stream/event.rs similarity index 100% rename from src/change_stream/event.rs rename to driver/src/change_stream/event.rs diff --git a/src/change_stream/options.rs b/driver/src/change_stream/options.rs similarity index 100% rename from src/change_stream/options.rs rename to driver/src/change_stream/options.rs diff --git a/src/change_stream/session.rs b/driver/src/change_stream/session.rs similarity index 100% rename from src/change_stream/session.rs rename to driver/src/change_stream/session.rs diff --git a/src/checked.rs b/driver/src/checked.rs similarity index 100% rename from src/checked.rs rename to driver/src/checked.rs diff --git a/src/client.rs b/driver/src/client.rs similarity index 100% rename from src/client.rs rename to driver/src/client.rs diff --git a/src/client/action.rs b/driver/src/client/action.rs similarity index 100% rename from src/client/action.rs rename to driver/src/client/action.rs diff --git a/src/client/action/perf.rs b/driver/src/client/action/perf.rs similarity index 100% rename from src/client/action/perf.rs rename to driver/src/client/action/perf.rs diff --git a/src/client/action/shutdown.rs b/driver/src/client/action/shutdown.rs similarity index 100% rename from src/client/action/shutdown.rs rename to driver/src/client/action/shutdown.rs diff --git a/src/client/auth.rs b/driver/src/client/auth.rs similarity index 100% rename from src/client/auth.rs rename to driver/src/client/auth.rs diff --git a/src/client/auth/aws.rs b/driver/src/client/auth/aws.rs similarity index 100% rename from src/client/auth/aws.rs rename to driver/src/client/auth/aws.rs diff --git a/src/client/auth/gssapi.rs b/driver/src/client/auth/gssapi.rs similarity index 100% rename from src/client/auth/gssapi.rs rename to driver/src/client/auth/gssapi.rs diff --git a/src/client/auth/gssapi/nix.rs b/driver/src/client/auth/gssapi/nix.rs similarity index 100% rename from src/client/auth/gssapi/nix.rs rename to driver/src/client/auth/gssapi/nix.rs diff --git a/src/client/auth/gssapi/windows.rs b/driver/src/client/auth/gssapi/windows.rs similarity index 100% rename from src/client/auth/gssapi/windows.rs rename to driver/src/client/auth/gssapi/windows.rs diff --git a/src/client/auth/oidc.rs b/driver/src/client/auth/oidc.rs similarity index 100% rename from src/client/auth/oidc.rs rename to driver/src/client/auth/oidc.rs diff --git a/src/client/auth/plain.rs b/driver/src/client/auth/plain.rs similarity index 100% rename from src/client/auth/plain.rs rename to driver/src/client/auth/plain.rs diff --git a/src/client/auth/sasl.rs b/driver/src/client/auth/sasl.rs similarity index 100% rename from src/client/auth/sasl.rs rename to driver/src/client/auth/sasl.rs diff --git a/src/client/auth/scram.rs b/driver/src/client/auth/scram.rs similarity index 100% rename from src/client/auth/scram.rs rename to driver/src/client/auth/scram.rs diff --git a/src/client/auth/test.rs b/driver/src/client/auth/test.rs similarity index 100% rename from src/client/auth/test.rs rename to driver/src/client/auth/test.rs diff --git a/src/client/auth/x509.rs b/driver/src/client/auth/x509.rs similarity index 100% rename from src/client/auth/x509.rs rename to driver/src/client/auth/x509.rs diff --git a/src/client/csfle.rs b/driver/src/client/csfle.rs similarity index 100% rename from src/client/csfle.rs rename to driver/src/client/csfle.rs diff --git a/src/client/csfle/client_builder.rs b/driver/src/client/csfle/client_builder.rs similarity index 100% rename from src/client/csfle/client_builder.rs rename to driver/src/client/csfle/client_builder.rs diff --git a/src/client/csfle/client_encryption.rs b/driver/src/client/csfle/client_encryption.rs similarity index 100% rename from src/client/csfle/client_encryption.rs rename to driver/src/client/csfle/client_encryption.rs diff --git a/src/client/csfle/client_encryption/create_data_key.rs b/driver/src/client/csfle/client_encryption/create_data_key.rs similarity index 100% rename from src/client/csfle/client_encryption/create_data_key.rs rename to driver/src/client/csfle/client_encryption/create_data_key.rs diff --git a/src/client/csfle/client_encryption/encrypt.rs b/driver/src/client/csfle/client_encryption/encrypt.rs similarity index 100% rename from src/client/csfle/client_encryption/encrypt.rs rename to driver/src/client/csfle/client_encryption/encrypt.rs diff --git a/src/client/csfle/options.rs b/driver/src/client/csfle/options.rs similarity index 100% rename from src/client/csfle/options.rs rename to driver/src/client/csfle/options.rs diff --git a/src/client/csfle/state_machine.rs b/driver/src/client/csfle/state_machine.rs similarity index 100% rename from src/client/csfle/state_machine.rs rename to driver/src/client/csfle/state_machine.rs diff --git a/src/client/executor.rs b/driver/src/client/executor.rs similarity index 100% rename from src/client/executor.rs rename to driver/src/client/executor.rs diff --git a/src/client/options.rs b/driver/src/client/options.rs similarity index 100% rename from src/client/options.rs rename to driver/src/client/options.rs diff --git a/src/client/options/bulk_write.rs b/driver/src/client/options/bulk_write.rs similarity index 100% rename from src/client/options/bulk_write.rs rename to driver/src/client/options/bulk_write.rs diff --git a/src/client/options/parse.rs b/driver/src/client/options/parse.rs similarity index 100% rename from src/client/options/parse.rs rename to driver/src/client/options/parse.rs diff --git a/src/client/options/resolver_config.rs b/driver/src/client/options/resolver_config.rs similarity index 100% rename from src/client/options/resolver_config.rs rename to driver/src/client/options/resolver_config.rs diff --git a/src/client/options/test.rs b/driver/src/client/options/test.rs similarity index 100% rename from src/client/options/test.rs rename to driver/src/client/options/test.rs diff --git a/src/client/session.rs b/driver/src/client/session.rs similarity index 100% rename from src/client/session.rs rename to driver/src/client/session.rs diff --git a/src/client/session/action.rs b/driver/src/client/session/action.rs similarity index 100% rename from src/client/session/action.rs rename to driver/src/client/session/action.rs diff --git a/src/client/session/cluster_time.rs b/driver/src/client/session/cluster_time.rs similarity index 100% rename from src/client/session/cluster_time.rs rename to driver/src/client/session/cluster_time.rs diff --git a/src/client/session/pool.rs b/driver/src/client/session/pool.rs similarity index 100% rename from src/client/session/pool.rs rename to driver/src/client/session/pool.rs diff --git a/src/client/session/test.rs b/driver/src/client/session/test.rs similarity index 100% rename from src/client/session/test.rs rename to driver/src/client/session/test.rs diff --git a/src/client/session/test/causal_consistency.rs b/driver/src/client/session/test/causal_consistency.rs similarity index 100% rename from src/client/session/test/causal_consistency.rs rename to driver/src/client/session/test/causal_consistency.rs diff --git a/src/cmap.rs b/driver/src/cmap.rs similarity index 100% rename from src/cmap.rs rename to driver/src/cmap.rs diff --git a/src/cmap/conn.rs b/driver/src/cmap/conn.rs similarity index 100% rename from src/cmap/conn.rs rename to driver/src/cmap/conn.rs diff --git a/src/cmap/conn/command.rs b/driver/src/cmap/conn/command.rs similarity index 100% rename from src/cmap/conn/command.rs rename to driver/src/cmap/conn/command.rs diff --git a/src/cmap/conn/pooled.rs b/driver/src/cmap/conn/pooled.rs similarity index 100% rename from src/cmap/conn/pooled.rs rename to driver/src/cmap/conn/pooled.rs diff --git a/src/cmap/conn/stream_description.rs b/driver/src/cmap/conn/stream_description.rs similarity index 100% rename from src/cmap/conn/stream_description.rs rename to driver/src/cmap/conn/stream_description.rs diff --git a/src/cmap/conn/wire.rs b/driver/src/cmap/conn/wire.rs similarity index 100% rename from src/cmap/conn/wire.rs rename to driver/src/cmap/conn/wire.rs diff --git a/src/cmap/conn/wire/header.rs b/driver/src/cmap/conn/wire/header.rs similarity index 100% rename from src/cmap/conn/wire/header.rs rename to driver/src/cmap/conn/wire/header.rs diff --git a/src/cmap/conn/wire/message.rs b/driver/src/cmap/conn/wire/message.rs similarity index 100% rename from src/cmap/conn/wire/message.rs rename to driver/src/cmap/conn/wire/message.rs diff --git a/src/cmap/conn/wire/util.rs b/driver/src/cmap/conn/wire/util.rs similarity index 100% rename from src/cmap/conn/wire/util.rs rename to driver/src/cmap/conn/wire/util.rs diff --git a/src/cmap/connection_requester.rs b/driver/src/cmap/connection_requester.rs similarity index 100% rename from src/cmap/connection_requester.rs rename to driver/src/cmap/connection_requester.rs diff --git a/src/cmap/establish.rs b/driver/src/cmap/establish.rs similarity index 100% rename from src/cmap/establish.rs rename to driver/src/cmap/establish.rs diff --git a/src/cmap/establish/handshake.rs b/driver/src/cmap/establish/handshake.rs similarity index 100% rename from src/cmap/establish/handshake.rs rename to driver/src/cmap/establish/handshake.rs diff --git a/src/cmap/manager.rs b/driver/src/cmap/manager.rs similarity index 100% rename from src/cmap/manager.rs rename to driver/src/cmap/manager.rs diff --git a/src/cmap/options.rs b/driver/src/cmap/options.rs similarity index 100% rename from src/cmap/options.rs rename to driver/src/cmap/options.rs diff --git a/src/cmap/status.rs b/driver/src/cmap/status.rs similarity index 100% rename from src/cmap/status.rs rename to driver/src/cmap/status.rs diff --git a/src/cmap/test.rs b/driver/src/cmap/test.rs similarity index 100% rename from src/cmap/test.rs rename to driver/src/cmap/test.rs diff --git a/src/cmap/test/event.rs b/driver/src/cmap/test/event.rs similarity index 100% rename from src/cmap/test/event.rs rename to driver/src/cmap/test/event.rs diff --git a/src/cmap/test/file.rs b/driver/src/cmap/test/file.rs similarity index 100% rename from src/cmap/test/file.rs rename to driver/src/cmap/test/file.rs diff --git a/src/cmap/test/integration.rs b/driver/src/cmap/test/integration.rs similarity index 100% rename from src/cmap/test/integration.rs rename to driver/src/cmap/test/integration.rs diff --git a/src/cmap/worker.rs b/driver/src/cmap/worker.rs similarity index 100% rename from src/cmap/worker.rs rename to driver/src/cmap/worker.rs diff --git a/src/coll.rs b/driver/src/coll.rs similarity index 100% rename from src/coll.rs rename to driver/src/coll.rs diff --git a/src/coll/action.rs b/driver/src/coll/action.rs similarity index 100% rename from src/coll/action.rs rename to driver/src/coll/action.rs diff --git a/src/coll/action/drop.rs b/driver/src/coll/action/drop.rs similarity index 100% rename from src/coll/action/drop.rs rename to driver/src/coll/action/drop.rs diff --git a/src/coll/options.rs b/driver/src/coll/options.rs similarity index 100% rename from src/coll/options.rs rename to driver/src/coll/options.rs diff --git a/src/collation.rs b/driver/src/collation.rs similarity index 100% rename from src/collation.rs rename to driver/src/collation.rs diff --git a/src/compression.rs b/driver/src/compression.rs similarity index 100% rename from src/compression.rs rename to driver/src/compression.rs diff --git a/src/compression/compress.rs b/driver/src/compression/compress.rs similarity index 100% rename from src/compression/compress.rs rename to driver/src/compression/compress.rs diff --git a/src/compression/compressors.rs b/driver/src/compression/compressors.rs similarity index 100% rename from src/compression/compressors.rs rename to driver/src/compression/compressors.rs diff --git a/src/compression/decompress.rs b/driver/src/compression/decompress.rs similarity index 100% rename from src/compression/decompress.rs rename to driver/src/compression/decompress.rs diff --git a/src/concern.rs b/driver/src/concern.rs similarity index 100% rename from src/concern.rs rename to driver/src/concern.rs diff --git a/src/concern/test.rs b/driver/src/concern/test.rs similarity index 100% rename from src/concern/test.rs rename to driver/src/concern/test.rs diff --git a/src/cursor.rs b/driver/src/cursor.rs similarity index 100% rename from src/cursor.rs rename to driver/src/cursor.rs diff --git a/src/cursor/common.rs b/driver/src/cursor/common.rs similarity index 100% rename from src/cursor/common.rs rename to driver/src/cursor/common.rs diff --git a/src/cursor/session.rs b/driver/src/cursor/session.rs similarity index 100% rename from src/cursor/session.rs rename to driver/src/cursor/session.rs diff --git a/src/db.rs b/driver/src/db.rs similarity index 100% rename from src/db.rs rename to driver/src/db.rs diff --git a/src/db/action.rs b/driver/src/db/action.rs similarity index 100% rename from src/db/action.rs rename to driver/src/db/action.rs diff --git a/src/db/action/create_collection.rs b/driver/src/db/action/create_collection.rs similarity index 100% rename from src/db/action/create_collection.rs rename to driver/src/db/action/create_collection.rs diff --git a/src/db/options.rs b/driver/src/db/options.rs similarity index 100% rename from src/db/options.rs rename to driver/src/db/options.rs diff --git a/src/error.rs b/driver/src/error.rs similarity index 100% rename from src/error.rs rename to driver/src/error.rs diff --git a/src/error/bulk_write.rs b/driver/src/error/bulk_write.rs similarity index 100% rename from src/error/bulk_write.rs rename to driver/src/error/bulk_write.rs diff --git a/src/event.rs b/driver/src/event.rs similarity index 100% rename from src/event.rs rename to driver/src/event.rs diff --git a/src/event/cmap.rs b/driver/src/event/cmap.rs similarity index 100% rename from src/event/cmap.rs rename to driver/src/event/cmap.rs diff --git a/src/event/command.rs b/driver/src/event/command.rs similarity index 100% rename from src/event/command.rs rename to driver/src/event/command.rs diff --git a/src/event/sdam.rs b/driver/src/event/sdam.rs similarity index 100% rename from src/event/sdam.rs rename to driver/src/event/sdam.rs diff --git a/src/event/sdam/topology_description.rs b/driver/src/event/sdam/topology_description.rs similarity index 100% rename from src/event/sdam/topology_description.rs rename to driver/src/event/sdam/topology_description.rs diff --git a/src/gridfs.rs b/driver/src/gridfs.rs similarity index 100% rename from src/gridfs.rs rename to driver/src/gridfs.rs diff --git a/src/gridfs/download.rs b/driver/src/gridfs/download.rs similarity index 100% rename from src/gridfs/download.rs rename to driver/src/gridfs/download.rs diff --git a/src/gridfs/options.rs b/driver/src/gridfs/options.rs similarity index 100% rename from src/gridfs/options.rs rename to driver/src/gridfs/options.rs diff --git a/src/gridfs/upload.rs b/driver/src/gridfs/upload.rs similarity index 100% rename from src/gridfs/upload.rs rename to driver/src/gridfs/upload.rs diff --git a/src/hello.rs b/driver/src/hello.rs similarity index 100% rename from src/hello.rs rename to driver/src/hello.rs diff --git a/src/id_set.rs b/driver/src/id_set.rs similarity index 100% rename from src/id_set.rs rename to driver/src/id_set.rs diff --git a/src/index.rs b/driver/src/index.rs similarity index 100% rename from src/index.rs rename to driver/src/index.rs diff --git a/src/index/options.rs b/driver/src/index/options.rs similarity index 100% rename from src/index/options.rs rename to driver/src/index/options.rs diff --git a/src/lib.rs b/driver/src/lib.rs similarity index 98% rename from src/lib.rs rename to driver/src/lib.rs index 75c1ccf05..3641682ab 100644 --- a/src/lib.rs +++ b/driver/src/lib.rs @@ -1,4 +1,4 @@ -#![doc = include_str!("../README.md")] +#![doc = include_str!("../../README.md")] #![warn( missing_docs, rustdoc::missing_crate_level_docs, diff --git a/src/operation.rs b/driver/src/operation.rs similarity index 100% rename from src/operation.rs rename to driver/src/operation.rs diff --git a/src/operation/abort_transaction.rs b/driver/src/operation/abort_transaction.rs similarity index 100% rename from src/operation/abort_transaction.rs rename to driver/src/operation/abort_transaction.rs diff --git a/src/operation/aggregate.rs b/driver/src/operation/aggregate.rs similarity index 100% rename from src/operation/aggregate.rs rename to driver/src/operation/aggregate.rs diff --git a/src/operation/aggregate/change_stream.rs b/driver/src/operation/aggregate/change_stream.rs similarity index 100% rename from src/operation/aggregate/change_stream.rs rename to driver/src/operation/aggregate/change_stream.rs diff --git a/src/operation/bulk_write.rs b/driver/src/operation/bulk_write.rs similarity index 100% rename from src/operation/bulk_write.rs rename to driver/src/operation/bulk_write.rs diff --git a/src/operation/bulk_write/server_responses.rs b/driver/src/operation/bulk_write/server_responses.rs similarity index 100% rename from src/operation/bulk_write/server_responses.rs rename to driver/src/operation/bulk_write/server_responses.rs diff --git a/src/operation/commit_transaction.rs b/driver/src/operation/commit_transaction.rs similarity index 100% rename from src/operation/commit_transaction.rs rename to driver/src/operation/commit_transaction.rs diff --git a/src/operation/count.rs b/driver/src/operation/count.rs similarity index 100% rename from src/operation/count.rs rename to driver/src/operation/count.rs diff --git a/src/operation/count_documents.rs b/driver/src/operation/count_documents.rs similarity index 100% rename from src/operation/count_documents.rs rename to driver/src/operation/count_documents.rs diff --git a/src/operation/create.rs b/driver/src/operation/create.rs similarity index 100% rename from src/operation/create.rs rename to driver/src/operation/create.rs diff --git a/src/operation/create_indexes.rs b/driver/src/operation/create_indexes.rs similarity index 100% rename from src/operation/create_indexes.rs rename to driver/src/operation/create_indexes.rs diff --git a/src/operation/delete.rs b/driver/src/operation/delete.rs similarity index 100% rename from src/operation/delete.rs rename to driver/src/operation/delete.rs diff --git a/src/operation/distinct.rs b/driver/src/operation/distinct.rs similarity index 100% rename from src/operation/distinct.rs rename to driver/src/operation/distinct.rs diff --git a/src/operation/drop_collection.rs b/driver/src/operation/drop_collection.rs similarity index 100% rename from src/operation/drop_collection.rs rename to driver/src/operation/drop_collection.rs diff --git a/src/operation/drop_database.rs b/driver/src/operation/drop_database.rs similarity index 100% rename from src/operation/drop_database.rs rename to driver/src/operation/drop_database.rs diff --git a/src/operation/drop_indexes.rs b/driver/src/operation/drop_indexes.rs similarity index 100% rename from src/operation/drop_indexes.rs rename to driver/src/operation/drop_indexes.rs diff --git a/src/operation/find.rs b/driver/src/operation/find.rs similarity index 100% rename from src/operation/find.rs rename to driver/src/operation/find.rs diff --git a/src/operation/find_and_modify.rs b/driver/src/operation/find_and_modify.rs similarity index 100% rename from src/operation/find_and_modify.rs rename to driver/src/operation/find_and_modify.rs diff --git a/src/operation/find_and_modify/options.rs b/driver/src/operation/find_and_modify/options.rs similarity index 100% rename from src/operation/find_and_modify/options.rs rename to driver/src/operation/find_and_modify/options.rs diff --git a/src/operation/get_more.rs b/driver/src/operation/get_more.rs similarity index 100% rename from src/operation/get_more.rs rename to driver/src/operation/get_more.rs diff --git a/src/operation/insert.rs b/driver/src/operation/insert.rs similarity index 100% rename from src/operation/insert.rs rename to driver/src/operation/insert.rs diff --git a/src/operation/list_collections.rs b/driver/src/operation/list_collections.rs similarity index 100% rename from src/operation/list_collections.rs rename to driver/src/operation/list_collections.rs diff --git a/src/operation/list_databases.rs b/driver/src/operation/list_databases.rs similarity index 100% rename from src/operation/list_databases.rs rename to driver/src/operation/list_databases.rs diff --git a/src/operation/list_indexes.rs b/driver/src/operation/list_indexes.rs similarity index 100% rename from src/operation/list_indexes.rs rename to driver/src/operation/list_indexes.rs diff --git a/src/operation/raw_output.rs b/driver/src/operation/raw_output.rs similarity index 100% rename from src/operation/raw_output.rs rename to driver/src/operation/raw_output.rs diff --git a/src/operation/run_command.rs b/driver/src/operation/run_command.rs similarity index 100% rename from src/operation/run_command.rs rename to driver/src/operation/run_command.rs diff --git a/src/operation/run_cursor_command.rs b/driver/src/operation/run_cursor_command.rs similarity index 100% rename from src/operation/run_cursor_command.rs rename to driver/src/operation/run_cursor_command.rs diff --git a/src/operation/search_index.rs b/driver/src/operation/search_index.rs similarity index 100% rename from src/operation/search_index.rs rename to driver/src/operation/search_index.rs diff --git a/src/operation/update.rs b/driver/src/operation/update.rs similarity index 100% rename from src/operation/update.rs rename to driver/src/operation/update.rs diff --git a/src/options.rs b/driver/src/options.rs similarity index 100% rename from src/options.rs rename to driver/src/options.rs diff --git a/src/otel.rs b/driver/src/otel.rs similarity index 100% rename from src/otel.rs rename to driver/src/otel.rs diff --git a/src/otel/testing.rs b/driver/src/otel/testing.rs similarity index 100% rename from src/otel/testing.rs rename to driver/src/otel/testing.rs diff --git a/src/results.rs b/driver/src/results.rs similarity index 100% rename from src/results.rs rename to driver/src/results.rs diff --git a/src/results/bulk_write.rs b/driver/src/results/bulk_write.rs similarity index 100% rename from src/results/bulk_write.rs rename to driver/src/results/bulk_write.rs diff --git a/src/runtime.rs b/driver/src/runtime.rs similarity index 100% rename from src/runtime.rs rename to driver/src/runtime.rs diff --git a/src/runtime/acknowledged_message.rs b/driver/src/runtime/acknowledged_message.rs similarity index 100% rename from src/runtime/acknowledged_message.rs rename to driver/src/runtime/acknowledged_message.rs diff --git a/src/runtime/http.rs b/driver/src/runtime/http.rs similarity index 100% rename from src/runtime/http.rs rename to driver/src/runtime/http.rs diff --git a/src/runtime/join_handle.rs b/driver/src/runtime/join_handle.rs similarity index 100% rename from src/runtime/join_handle.rs rename to driver/src/runtime/join_handle.rs diff --git a/src/runtime/pem.rs b/driver/src/runtime/pem.rs similarity index 100% rename from src/runtime/pem.rs rename to driver/src/runtime/pem.rs diff --git a/src/runtime/process.rs b/driver/src/runtime/process.rs similarity index 100% rename from src/runtime/process.rs rename to driver/src/runtime/process.rs diff --git a/src/runtime/resolver.rs b/driver/src/runtime/resolver.rs similarity index 100% rename from src/runtime/resolver.rs rename to driver/src/runtime/resolver.rs diff --git a/src/runtime/stream.rs b/driver/src/runtime/stream.rs similarity index 100% rename from src/runtime/stream.rs rename to driver/src/runtime/stream.rs diff --git a/src/runtime/sync_read_ext.rs b/driver/src/runtime/sync_read_ext.rs similarity index 100% rename from src/runtime/sync_read_ext.rs rename to driver/src/runtime/sync_read_ext.rs diff --git a/src/runtime/tls_openssl.rs b/driver/src/runtime/tls_openssl.rs similarity index 100% rename from src/runtime/tls_openssl.rs rename to driver/src/runtime/tls_openssl.rs diff --git a/src/runtime/tls_rustls.rs b/driver/src/runtime/tls_rustls.rs similarity index 100% rename from src/runtime/tls_rustls.rs rename to driver/src/runtime/tls_rustls.rs diff --git a/src/runtime/worker_handle.rs b/driver/src/runtime/worker_handle.rs similarity index 100% rename from src/runtime/worker_handle.rs rename to driver/src/runtime/worker_handle.rs diff --git a/src/sdam.rs b/driver/src/sdam.rs similarity index 100% rename from src/sdam.rs rename to driver/src/sdam.rs diff --git a/src/sdam/description.rs b/driver/src/sdam/description.rs similarity index 100% rename from src/sdam/description.rs rename to driver/src/sdam/description.rs diff --git a/src/sdam/description/server.rs b/driver/src/sdam/description/server.rs similarity index 100% rename from src/sdam/description/server.rs rename to driver/src/sdam/description/server.rs diff --git a/src/sdam/description/topology.rs b/driver/src/sdam/description/topology.rs similarity index 100% rename from src/sdam/description/topology.rs rename to driver/src/sdam/description/topology.rs diff --git a/src/sdam/description/topology/server_selection.rs b/driver/src/sdam/description/topology/server_selection.rs similarity index 100% rename from src/sdam/description/topology/server_selection.rs rename to driver/src/sdam/description/topology/server_selection.rs diff --git a/src/sdam/description/topology/server_selection/test.rs b/driver/src/sdam/description/topology/server_selection/test.rs similarity index 100% rename from src/sdam/description/topology/server_selection/test.rs rename to driver/src/sdam/description/topology/server_selection/test.rs diff --git a/src/sdam/description/topology/server_selection/test/in_window.rs b/driver/src/sdam/description/topology/server_selection/test/in_window.rs similarity index 100% rename from src/sdam/description/topology/server_selection/test/in_window.rs rename to driver/src/sdam/description/topology/server_selection/test/in_window.rs diff --git a/src/sdam/description/topology/server_selection/test/logic.rs b/driver/src/sdam/description/topology/server_selection/test/logic.rs similarity index 100% rename from src/sdam/description/topology/server_selection/test/logic.rs rename to driver/src/sdam/description/topology/server_selection/test/logic.rs diff --git a/src/sdam/description/topology/test.rs b/driver/src/sdam/description/topology/test.rs similarity index 100% rename from src/sdam/description/topology/test.rs rename to driver/src/sdam/description/topology/test.rs diff --git a/src/sdam/description/topology/test/event.rs b/driver/src/sdam/description/topology/test/event.rs similarity index 100% rename from src/sdam/description/topology/test/event.rs rename to driver/src/sdam/description/topology/test/event.rs diff --git a/src/sdam/description/topology/test/rtt.rs b/driver/src/sdam/description/topology/test/rtt.rs similarity index 100% rename from src/sdam/description/topology/test/rtt.rs rename to driver/src/sdam/description/topology/test/rtt.rs diff --git a/src/sdam/description/topology/test/sdam.rs b/driver/src/sdam/description/topology/test/sdam.rs similarity index 100% rename from src/sdam/description/topology/test/sdam.rs rename to driver/src/sdam/description/topology/test/sdam.rs diff --git a/src/sdam/monitor.rs b/driver/src/sdam/monitor.rs similarity index 100% rename from src/sdam/monitor.rs rename to driver/src/sdam/monitor.rs diff --git a/src/sdam/public.rs b/driver/src/sdam/public.rs similarity index 100% rename from src/sdam/public.rs rename to driver/src/sdam/public.rs diff --git a/src/sdam/server.rs b/driver/src/sdam/server.rs similarity index 100% rename from src/sdam/server.rs rename to driver/src/sdam/server.rs diff --git a/src/sdam/srv_polling.rs b/driver/src/sdam/srv_polling.rs similarity index 100% rename from src/sdam/srv_polling.rs rename to driver/src/sdam/srv_polling.rs diff --git a/src/sdam/srv_polling/test.rs b/driver/src/sdam/srv_polling/test.rs similarity index 100% rename from src/sdam/srv_polling/test.rs rename to driver/src/sdam/srv_polling/test.rs diff --git a/src/sdam/test.rs b/driver/src/sdam/test.rs similarity index 100% rename from src/sdam/test.rs rename to driver/src/sdam/test.rs diff --git a/src/sdam/topology.rs b/driver/src/sdam/topology.rs similarity index 100% rename from src/sdam/topology.rs rename to driver/src/sdam/topology.rs diff --git a/src/search_index.rs b/driver/src/search_index.rs similarity index 100% rename from src/search_index.rs rename to driver/src/search_index.rs diff --git a/src/selection_criteria.rs b/driver/src/selection_criteria.rs similarity index 100% rename from src/selection_criteria.rs rename to driver/src/selection_criteria.rs diff --git a/src/serde_util.rs b/driver/src/serde_util.rs similarity index 100% rename from src/serde_util.rs rename to driver/src/serde_util.rs diff --git a/src/srv.rs b/driver/src/srv.rs similarity index 100% rename from src/srv.rs rename to driver/src/srv.rs diff --git a/src/sync.rs b/driver/src/sync.rs similarity index 100% rename from src/sync.rs rename to driver/src/sync.rs diff --git a/src/sync/change_stream.rs b/driver/src/sync/change_stream.rs similarity index 100% rename from src/sync/change_stream.rs rename to driver/src/sync/change_stream.rs diff --git a/src/sync/client.rs b/driver/src/sync/client.rs similarity index 100% rename from src/sync/client.rs rename to driver/src/sync/client.rs diff --git a/src/sync/client/session.rs b/driver/src/sync/client/session.rs similarity index 100% rename from src/sync/client/session.rs rename to driver/src/sync/client/session.rs diff --git a/src/sync/coll.rs b/driver/src/sync/coll.rs similarity index 100% rename from src/sync/coll.rs rename to driver/src/sync/coll.rs diff --git a/src/sync/cursor.rs b/driver/src/sync/cursor.rs similarity index 100% rename from src/sync/cursor.rs rename to driver/src/sync/cursor.rs diff --git a/src/sync/db.rs b/driver/src/sync/db.rs similarity index 100% rename from src/sync/db.rs rename to driver/src/sync/db.rs diff --git a/src/sync/gridfs.rs b/driver/src/sync/gridfs.rs similarity index 100% rename from src/sync/gridfs.rs rename to driver/src/sync/gridfs.rs diff --git a/src/sync/test.rs b/driver/src/sync/test.rs similarity index 100% rename from src/sync/test.rs rename to driver/src/sync/test.rs diff --git a/src/test.rs b/driver/src/test.rs similarity index 100% rename from src/test.rs rename to driver/src/test.rs diff --git a/src/test/README.md b/driver/src/test/README.md similarity index 100% rename from src/test/README.md rename to driver/src/test/README.md diff --git a/src/test/atlas_connectivity.rs b/driver/src/test/atlas_connectivity.rs similarity index 100% rename from src/test/atlas_connectivity.rs rename to driver/src/test/atlas_connectivity.rs diff --git a/src/test/atlas_search.rs b/driver/src/test/atlas_search.rs similarity index 100% rename from src/test/atlas_search.rs rename to driver/src/test/atlas_search.rs diff --git a/src/test/auth.rs b/driver/src/test/auth.rs similarity index 100% rename from src/test/auth.rs rename to driver/src/test/auth.rs diff --git a/src/test/auth/aws.rs b/driver/src/test/auth/aws.rs similarity index 100% rename from src/test/auth/aws.rs rename to driver/src/test/auth/aws.rs diff --git a/src/test/auth/gssapi.rs b/driver/src/test/auth/gssapi.rs similarity index 100% rename from src/test/auth/gssapi.rs rename to driver/src/test/auth/gssapi.rs diff --git a/src/test/bulk_write.rs b/driver/src/test/bulk_write.rs similarity index 100% rename from src/test/bulk_write.rs rename to driver/src/test/bulk_write.rs diff --git a/src/test/change_stream.rs b/driver/src/test/change_stream.rs similarity index 100% rename from src/test/change_stream.rs rename to driver/src/test/change_stream.rs diff --git a/src/test/client.rs b/driver/src/test/client.rs similarity index 100% rename from src/test/client.rs rename to driver/src/test/client.rs diff --git a/src/test/coll.rs b/driver/src/test/coll.rs similarity index 100% rename from src/test/coll.rs rename to driver/src/test/coll.rs diff --git a/src/test/compression.rs b/driver/src/test/compression.rs similarity index 100% rename from src/test/compression.rs rename to driver/src/test/compression.rs diff --git a/src/test/csfle.rs b/driver/src/test/csfle.rs similarity index 99% rename from src/test/csfle.rs rename to driver/src/test/csfle.rs index b0b0ead8e..c8db7be9f 100644 --- a/src/test/csfle.rs +++ b/driver/src/test/csfle.rs @@ -302,7 +302,7 @@ async fn validate_roundtrip( fn load_testdata_raw(name: &str) -> Result { let path: PathBuf = [ env!("CARGO_MANIFEST_DIR"), - "spec/testdata/client-side-encryption", + "../spec/testdata/client-side-encryption", name, ] .iter() diff --git a/src/test/csfle/azure_imds.rs b/driver/src/test/csfle/azure_imds.rs similarity index 100% rename from src/test/csfle/azure_imds.rs rename to driver/src/test/csfle/azure_imds.rs diff --git a/src/test/csfle/kmip.rs b/driver/src/test/csfle/kmip.rs similarity index 100% rename from src/test/csfle/kmip.rs rename to driver/src/test/csfle/kmip.rs diff --git a/src/test/csfle/kms_retry.rs b/driver/src/test/csfle/kms_retry.rs similarity index 100% rename from src/test/csfle/kms_retry.rs rename to driver/src/test/csfle/kms_retry.rs diff --git a/src/test/csfle/on_demand_aws.rs b/driver/src/test/csfle/on_demand_aws.rs similarity index 100% rename from src/test/csfle/on_demand_aws.rs rename to driver/src/test/csfle/on_demand_aws.rs diff --git a/src/test/csfle/on_demand_gcp.rs b/driver/src/test/csfle/on_demand_gcp.rs similarity index 100% rename from src/test/csfle/on_demand_gcp.rs rename to driver/src/test/csfle/on_demand_gcp.rs diff --git a/src/test/csfle/prose.rs b/driver/src/test/csfle/prose.rs similarity index 100% rename from src/test/csfle/prose.rs rename to driver/src/test/csfle/prose.rs diff --git a/src/test/csfle/spec.rs b/driver/src/test/csfle/spec.rs similarity index 100% rename from src/test/csfle/spec.rs rename to driver/src/test/csfle/spec.rs diff --git a/src/test/cursor.rs b/driver/src/test/cursor.rs similarity index 100% rename from src/test/cursor.rs rename to driver/src/test/cursor.rs diff --git a/src/test/db.rs b/driver/src/test/db.rs similarity index 100% rename from src/test/db.rs rename to driver/src/test/db.rs diff --git a/src/test/documentation_examples.rs b/driver/src/test/documentation_examples.rs similarity index 100% rename from src/test/documentation_examples.rs rename to driver/src/test/documentation_examples.rs diff --git a/src/test/documentation_examples/aggregation_data.rs b/driver/src/test/documentation_examples/aggregation_data.rs similarity index 100% rename from src/test/documentation_examples/aggregation_data.rs rename to driver/src/test/documentation_examples/aggregation_data.rs diff --git a/src/test/happy_eyeballs.rs b/driver/src/test/happy_eyeballs.rs similarity index 100% rename from src/test/happy_eyeballs.rs rename to driver/src/test/happy_eyeballs.rs diff --git a/src/test/index_management.rs b/driver/src/test/index_management.rs similarity index 100% rename from src/test/index_management.rs rename to driver/src/test/index_management.rs diff --git a/src/test/index_management/search_index.rs b/driver/src/test/index_management/search_index.rs similarity index 100% rename from src/test/index_management/search_index.rs rename to driver/src/test/index_management/search_index.rs diff --git a/src/test/lambda_examples.rs b/driver/src/test/lambda_examples.rs similarity index 100% rename from src/test/lambda_examples.rs rename to driver/src/test/lambda_examples.rs diff --git a/src/test/lambda_examples/auth.rs b/driver/src/test/lambda_examples/auth.rs similarity index 100% rename from src/test/lambda_examples/auth.rs rename to driver/src/test/lambda_examples/auth.rs diff --git a/src/test/lambda_examples/no_auth.rs b/driver/src/test/lambda_examples/no_auth.rs similarity index 100% rename from src/test/lambda_examples/no_auth.rs rename to driver/src/test/lambda_examples/no_auth.rs diff --git a/src/test/spec.rs b/driver/src/test/spec.rs similarity index 97% rename from src/test/spec.rs rename to driver/src/test/spec.rs index 437057236..da398e6f0 100644 --- a/src/test/spec.rs +++ b/driver/src/test/spec.rs @@ -32,7 +32,7 @@ use std::{ ffi::OsStr, fs::{read_dir, File}, future::Future, - path::{Path, PathBuf}, + path::PathBuf, }; use serde::{de::DeserializeOwned, Deserialize}; @@ -56,7 +56,7 @@ pub(crate) fn deserialize_spec_tests( spec: &[&str], skipped_files: Option<&[&str]>, ) -> Vec<(T, PathBuf)> { - let mut path = Path::new(env!("CARGO_MANIFEST_DIR")).join("spec"); + let mut path: PathBuf = [env!("CARGO_MANIFEST_DIR"), "..", "spec"].iter().collect(); path.extend(spec); deserialize_spec_tests_common(path, skipped_files) } diff --git a/src/test/spec/auth.rs b/driver/src/test/spec/auth.rs similarity index 100% rename from src/test/spec/auth.rs rename to driver/src/test/spec/auth.rs diff --git a/src/test/spec/change_streams.rs b/driver/src/test/spec/change_streams.rs similarity index 100% rename from src/test/spec/change_streams.rs rename to driver/src/test/spec/change_streams.rs diff --git a/src/test/spec/collection_management.rs b/driver/src/test/spec/collection_management.rs similarity index 100% rename from src/test/spec/collection_management.rs rename to driver/src/test/spec/collection_management.rs diff --git a/src/test/spec/command_monitoring.rs b/driver/src/test/spec/command_monitoring.rs similarity index 100% rename from src/test/spec/command_monitoring.rs rename to driver/src/test/spec/command_monitoring.rs diff --git a/src/test/spec/connection_stepdown.rs b/driver/src/test/spec/connection_stepdown.rs similarity index 100% rename from src/test/spec/connection_stepdown.rs rename to driver/src/test/spec/connection_stepdown.rs diff --git a/src/test/spec/crud.rs b/driver/src/test/spec/crud.rs similarity index 100% rename from src/test/spec/crud.rs rename to driver/src/test/spec/crud.rs diff --git a/src/test/spec/faas.rs b/driver/src/test/spec/faas.rs similarity index 100% rename from src/test/spec/faas.rs rename to driver/src/test/spec/faas.rs diff --git a/src/test/spec/gridfs.rs b/driver/src/test/spec/gridfs.rs similarity index 100% rename from src/test/spec/gridfs.rs rename to driver/src/test/spec/gridfs.rs diff --git a/src/test/spec/handshake.rs b/driver/src/test/spec/handshake.rs similarity index 100% rename from src/test/spec/handshake.rs rename to driver/src/test/spec/handshake.rs diff --git a/src/test/spec/initial_dns_seedlist_discovery.rs b/driver/src/test/spec/initial_dns_seedlist_discovery.rs similarity index 100% rename from src/test/spec/initial_dns_seedlist_discovery.rs rename to driver/src/test/spec/initial_dns_seedlist_discovery.rs diff --git a/src/test/spec/load_balancers.rs b/driver/src/test/spec/load_balancers.rs similarity index 100% rename from src/test/spec/load_balancers.rs rename to driver/src/test/spec/load_balancers.rs diff --git a/src/test/spec/oidc.rs b/driver/src/test/spec/oidc.rs similarity index 100% rename from src/test/spec/oidc.rs rename to driver/src/test/spec/oidc.rs diff --git a/src/test/spec/open_telemetry.rs b/driver/src/test/spec/open_telemetry.rs similarity index 100% rename from src/test/spec/open_telemetry.rs rename to driver/src/test/spec/open_telemetry.rs diff --git a/src/test/spec/read_write_concern.rs b/driver/src/test/spec/read_write_concern.rs similarity index 100% rename from src/test/spec/read_write_concern.rs rename to driver/src/test/spec/read_write_concern.rs diff --git a/src/test/spec/read_write_concern/connection_string.rs b/driver/src/test/spec/read_write_concern/connection_string.rs similarity index 100% rename from src/test/spec/read_write_concern/connection_string.rs rename to driver/src/test/spec/read_write_concern/connection_string.rs diff --git a/src/test/spec/read_write_concern/document.rs b/driver/src/test/spec/read_write_concern/document.rs similarity index 100% rename from src/test/spec/read_write_concern/document.rs rename to driver/src/test/spec/read_write_concern/document.rs diff --git a/src/test/spec/retryable_reads.rs b/driver/src/test/spec/retryable_reads.rs similarity index 100% rename from src/test/spec/retryable_reads.rs rename to driver/src/test/spec/retryable_reads.rs diff --git a/src/test/spec/retryable_writes.rs b/driver/src/test/spec/retryable_writes.rs similarity index 100% rename from src/test/spec/retryable_writes.rs rename to driver/src/test/spec/retryable_writes.rs diff --git a/src/test/spec/run_command.rs b/driver/src/test/spec/run_command.rs similarity index 100% rename from src/test/spec/run_command.rs rename to driver/src/test/spec/run_command.rs diff --git a/src/test/spec/sdam.rs b/driver/src/test/spec/sdam.rs similarity index 100% rename from src/test/spec/sdam.rs rename to driver/src/test/spec/sdam.rs diff --git a/src/test/spec/sessions.rs b/driver/src/test/spec/sessions.rs similarity index 100% rename from src/test/spec/sessions.rs rename to driver/src/test/spec/sessions.rs diff --git a/src/test/spec/sessions/sessions_not_supported.rs b/driver/src/test/spec/sessions/sessions_not_supported.rs similarity index 100% rename from src/test/spec/sessions/sessions_not_supported.rs rename to driver/src/test/spec/sessions/sessions_not_supported.rs diff --git a/src/test/spec/trace.rs b/driver/src/test/spec/trace.rs similarity index 100% rename from src/test/spec/trace.rs rename to driver/src/test/spec/trace.rs diff --git a/src/test/spec/transactions.rs b/driver/src/test/spec/transactions.rs similarity index 100% rename from src/test/spec/transactions.rs rename to driver/src/test/spec/transactions.rs diff --git a/src/test/spec/unified_runner.rs b/driver/src/test/spec/unified_runner.rs similarity index 100% rename from src/test/spec/unified_runner.rs rename to driver/src/test/spec/unified_runner.rs diff --git a/src/test/spec/unified_runner/entity.rs b/driver/src/test/spec/unified_runner/entity.rs similarity index 100% rename from src/test/spec/unified_runner/entity.rs rename to driver/src/test/spec/unified_runner/entity.rs diff --git a/src/test/spec/unified_runner/matcher.rs b/driver/src/test/spec/unified_runner/matcher.rs similarity index 100% rename from src/test/spec/unified_runner/matcher.rs rename to driver/src/test/spec/unified_runner/matcher.rs diff --git a/src/test/spec/unified_runner/operation.rs b/driver/src/test/spec/unified_runner/operation.rs similarity index 100% rename from src/test/spec/unified_runner/operation.rs rename to driver/src/test/spec/unified_runner/operation.rs diff --git a/src/test/spec/unified_runner/operation/append_metadata.rs b/driver/src/test/spec/unified_runner/operation/append_metadata.rs similarity index 100% rename from src/test/spec/unified_runner/operation/append_metadata.rs rename to driver/src/test/spec/unified_runner/operation/append_metadata.rs diff --git a/src/test/spec/unified_runner/operation/bulk_write.rs b/driver/src/test/spec/unified_runner/operation/bulk_write.rs similarity index 100% rename from src/test/spec/unified_runner/operation/bulk_write.rs rename to driver/src/test/spec/unified_runner/operation/bulk_write.rs diff --git a/src/test/spec/unified_runner/operation/collection.rs b/driver/src/test/spec/unified_runner/operation/collection.rs similarity index 100% rename from src/test/spec/unified_runner/operation/collection.rs rename to driver/src/test/spec/unified_runner/operation/collection.rs diff --git a/src/test/spec/unified_runner/operation/command.rs b/driver/src/test/spec/unified_runner/operation/command.rs similarity index 100% rename from src/test/spec/unified_runner/operation/command.rs rename to driver/src/test/spec/unified_runner/operation/command.rs diff --git a/src/test/spec/unified_runner/operation/connection.rs b/driver/src/test/spec/unified_runner/operation/connection.rs similarity index 100% rename from src/test/spec/unified_runner/operation/connection.rs rename to driver/src/test/spec/unified_runner/operation/connection.rs diff --git a/src/test/spec/unified_runner/operation/count.rs b/driver/src/test/spec/unified_runner/operation/count.rs similarity index 100% rename from src/test/spec/unified_runner/operation/count.rs rename to driver/src/test/spec/unified_runner/operation/count.rs diff --git a/src/test/spec/unified_runner/operation/csfle.rs b/driver/src/test/spec/unified_runner/operation/csfle.rs similarity index 100% rename from src/test/spec/unified_runner/operation/csfle.rs rename to driver/src/test/spec/unified_runner/operation/csfle.rs diff --git a/src/test/spec/unified_runner/operation/delete.rs b/driver/src/test/spec/unified_runner/operation/delete.rs similarity index 100% rename from src/test/spec/unified_runner/operation/delete.rs rename to driver/src/test/spec/unified_runner/operation/delete.rs diff --git a/src/test/spec/unified_runner/operation/failpoint.rs b/driver/src/test/spec/unified_runner/operation/failpoint.rs similarity index 100% rename from src/test/spec/unified_runner/operation/failpoint.rs rename to driver/src/test/spec/unified_runner/operation/failpoint.rs diff --git a/src/test/spec/unified_runner/operation/find.rs b/driver/src/test/spec/unified_runner/operation/find.rs similarity index 100% rename from src/test/spec/unified_runner/operation/find.rs rename to driver/src/test/spec/unified_runner/operation/find.rs diff --git a/src/test/spec/unified_runner/operation/gridfs.rs b/driver/src/test/spec/unified_runner/operation/gridfs.rs similarity index 100% rename from src/test/spec/unified_runner/operation/gridfs.rs rename to driver/src/test/spec/unified_runner/operation/gridfs.rs diff --git a/src/test/spec/unified_runner/operation/index.rs b/driver/src/test/spec/unified_runner/operation/index.rs similarity index 100% rename from src/test/spec/unified_runner/operation/index.rs rename to driver/src/test/spec/unified_runner/operation/index.rs diff --git a/src/test/spec/unified_runner/operation/insert.rs b/driver/src/test/spec/unified_runner/operation/insert.rs similarity index 100% rename from src/test/spec/unified_runner/operation/insert.rs rename to driver/src/test/spec/unified_runner/operation/insert.rs diff --git a/src/test/spec/unified_runner/operation/iteration.rs b/driver/src/test/spec/unified_runner/operation/iteration.rs similarity index 100% rename from src/test/spec/unified_runner/operation/iteration.rs rename to driver/src/test/spec/unified_runner/operation/iteration.rs diff --git a/src/test/spec/unified_runner/operation/list.rs b/driver/src/test/spec/unified_runner/operation/list.rs similarity index 100% rename from src/test/spec/unified_runner/operation/list.rs rename to driver/src/test/spec/unified_runner/operation/list.rs diff --git a/src/test/spec/unified_runner/operation/rename.rs b/driver/src/test/spec/unified_runner/operation/rename.rs similarity index 100% rename from src/test/spec/unified_runner/operation/rename.rs rename to driver/src/test/spec/unified_runner/operation/rename.rs diff --git a/src/test/spec/unified_runner/operation/search_index.rs b/driver/src/test/spec/unified_runner/operation/search_index.rs similarity index 100% rename from src/test/spec/unified_runner/operation/search_index.rs rename to driver/src/test/spec/unified_runner/operation/search_index.rs diff --git a/src/test/spec/unified_runner/operation/session.rs b/driver/src/test/spec/unified_runner/operation/session.rs similarity index 100% rename from src/test/spec/unified_runner/operation/session.rs rename to driver/src/test/spec/unified_runner/operation/session.rs diff --git a/src/test/spec/unified_runner/operation/thread.rs b/driver/src/test/spec/unified_runner/operation/thread.rs similarity index 100% rename from src/test/spec/unified_runner/operation/thread.rs rename to driver/src/test/spec/unified_runner/operation/thread.rs diff --git a/src/test/spec/unified_runner/operation/topology.rs b/driver/src/test/spec/unified_runner/operation/topology.rs similarity index 100% rename from src/test/spec/unified_runner/operation/topology.rs rename to driver/src/test/spec/unified_runner/operation/topology.rs diff --git a/src/test/spec/unified_runner/operation/transaction.rs b/driver/src/test/spec/unified_runner/operation/transaction.rs similarity index 100% rename from src/test/spec/unified_runner/operation/transaction.rs rename to driver/src/test/spec/unified_runner/operation/transaction.rs diff --git a/src/test/spec/unified_runner/operation/update.rs b/driver/src/test/spec/unified_runner/operation/update.rs similarity index 100% rename from src/test/spec/unified_runner/operation/update.rs rename to driver/src/test/spec/unified_runner/operation/update.rs diff --git a/src/test/spec/unified_runner/operation/wait.rs b/driver/src/test/spec/unified_runner/operation/wait.rs similarity index 100% rename from src/test/spec/unified_runner/operation/wait.rs rename to driver/src/test/spec/unified_runner/operation/wait.rs diff --git a/src/test/spec/unified_runner/test_event.rs b/driver/src/test/spec/unified_runner/test_event.rs similarity index 100% rename from src/test/spec/unified_runner/test_event.rs rename to driver/src/test/spec/unified_runner/test_event.rs diff --git a/src/test/spec/unified_runner/test_file.rs b/driver/src/test/spec/unified_runner/test_file.rs similarity index 100% rename from src/test/spec/unified_runner/test_file.rs rename to driver/src/test/spec/unified_runner/test_file.rs diff --git a/src/test/spec/unified_runner/test_runner.rs b/driver/src/test/spec/unified_runner/test_runner.rs similarity index 100% rename from src/test/spec/unified_runner/test_runner.rs rename to driver/src/test/spec/unified_runner/test_runner.rs diff --git a/src/test/spec/versioned_api.rs b/driver/src/test/spec/versioned_api.rs similarity index 100% rename from src/test/spec/versioned_api.rs rename to driver/src/test/spec/versioned_api.rs diff --git a/src/test/spec/write_error.rs b/driver/src/test/spec/write_error.rs similarity index 100% rename from src/test/spec/write_error.rs rename to driver/src/test/spec/write_error.rs diff --git a/src/test/timeseries.rs b/driver/src/test/timeseries.rs similarity index 100% rename from src/test/timeseries.rs rename to driver/src/test/timeseries.rs diff --git a/src/test/util.rs b/driver/src/test/util.rs similarity index 100% rename from src/test/util.rs rename to driver/src/test/util.rs diff --git a/src/test/util/event.rs b/driver/src/test/util/event.rs similarity index 100% rename from src/test/util/event.rs rename to driver/src/test/util/event.rs diff --git a/src/test/util/event_buffer.rs b/driver/src/test/util/event_buffer.rs similarity index 100% rename from src/test/util/event_buffer.rs rename to driver/src/test/util/event_buffer.rs diff --git a/src/test/util/fail_point.rs b/driver/src/test/util/fail_point.rs similarity index 100% rename from src/test/util/fail_point.rs rename to driver/src/test/util/fail_point.rs diff --git a/src/test/util/matchable.rs b/driver/src/test/util/matchable.rs similarity index 100% rename from src/test/util/matchable.rs rename to driver/src/test/util/matchable.rs diff --git a/src/test/util/trace.rs b/driver/src/test/util/trace.rs similarity index 100% rename from src/test/util/trace.rs rename to driver/src/test/util/trace.rs diff --git a/src/trace.rs b/driver/src/trace.rs similarity index 100% rename from src/trace.rs rename to driver/src/trace.rs diff --git a/src/trace/command.rs b/driver/src/trace/command.rs similarity index 100% rename from src/trace/command.rs rename to driver/src/trace/command.rs diff --git a/src/trace/connection.rs b/driver/src/trace/connection.rs similarity index 100% rename from src/trace/connection.rs rename to driver/src/trace/connection.rs diff --git a/src/trace/server_selection.rs b/driver/src/trace/server_selection.rs similarity index 100% rename from src/trace/server_selection.rs rename to driver/src/trace/server_selection.rs diff --git a/src/trace/topology.rs b/driver/src/trace/topology.rs similarity index 100% rename from src/trace/topology.rs rename to driver/src/trace/topology.rs diff --git a/src/tracking_arc.rs b/driver/src/tracking_arc.rs similarity index 100% rename from src/tracking_arc.rs rename to driver/src/tracking_arc.rs diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 2b767fc4e..2b8810aa0 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -2,8 +2,12 @@ name = "mongodb-internal-macros" version = "3.3.0" description = "Internal macros for the mongodb crate" -edition = "2021" -license = "Apache-2.0" + +authors.workspace = true +license.workspace = true +edition.workspace = true +repository.workspace = true +rust-version.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 293ffa510..8a590888d 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -72,7 +72,7 @@ pub fn options_doc( /// Parse an identifier with a specific expected value. fn parse_name(input: ParseStream, name: &str) -> syn::Result { let ident = input.parse::()?; - if ident.to_string() != name { + if ident != name { return Err(Error::new( ident.span(), format!("expected '{}', got '{}'", name, ident), diff --git a/macros/src/option.rs b/macros/src/option.rs index 01b39d7e0..0579635e5 100644 --- a/macros/src/option.rs +++ b/macros/src/option.rs @@ -191,7 +191,7 @@ fn path_eq(path: &Path, segments: &[&str]) -> bool { if path.segments.len() != segments.len() { return false; } - for (actual, expected) in path.segments.iter().zip(segments.into_iter()) { + for (actual, expected) in path.segments.iter().zip(segments.iter()) { if actual.ident != expected { return false; } diff --git a/macros/src/rustdoc.rs b/macros/src/rustdoc.rs index 7f87e2ff0..b4eb65615 100644 --- a/macros/src/rustdoc.rs +++ b/macros/src/rustdoc.rs @@ -87,7 +87,7 @@ fn text_link(text: &str) -> String { .flat_map(|s| { if s == "<" || s == ">" { vec![s] - } else if let Some(sub) = s.strip_suffix(&['<', '>']) { + } else if let Some(sub) = s.strip_suffix(['<', '>']) { vec![sub, &s[sub.len()..]] } else { vec![s]