diff --git a/Cargo.lock b/Cargo.lock index 4073e51fd3..19d21e3bd5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5580,6 +5580,19 @@ dependencies = [ "webpki-roots 0.22.6", ] +[[package]] +name = "job-runner" +version = "0.0.1" +dependencies = [ + "anyhow", + "portpicker", + "serde", + "serde_json", + "signal-hook", + "tempfile", + "uuid", +] + [[package]] name = "jobserver" version = "0.1.32" @@ -7276,6 +7289,15 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +[[package]] +name = "portpicker" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" +dependencies = [ + "rand", +] + [[package]] name = "posthog-core" version = "0.1.0" @@ -9194,6 +9216,16 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + [[package]] name = "signal-hook-registry" version = "1.4.2" diff --git a/Cargo.toml b/Cargo.toml index ea514a7621..af00c60df5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,300 +1,8 @@ + [workspace] resolver = "2" -# Find all packages with: find . -name Cargo.toml | grep -v resources | grep -v externals | grep -v "sdks/runtime" | grep -v "sdks/full/rust-cli" | grep -v "infra/client/" | grep -v "infra/legacy/job-runner" | sed -E 's|^./(.*)Cargo\.toml$|"\1",|' -members = [ -"sdks/full/rust/", -"packages/infra/server/", -"packages/common/operation/core/", -"packages/common/operation/macros/", -"packages/common/metrics/", -"packages/common/pools/", -"packages/common/s3-util/", -"packages/common/cache/result/", -"packages/common/cache/build/", -"packages/common/test/", -"packages/common/connection/", -"packages/common/util/core/", -"packages/common/util/search/", -"packages/common/util/macros/", -"packages/common/config/", -"packages/common/nomad-util/", -"packages/common/health-checks/", -"packages/common/chirp/metrics/", -"packages/common/chirp/types/", -"packages/common/chirp/worker/", -"packages/common/chirp/perf/", -"packages/common/chirp/worker-attributes/", -"packages/common/chirp/client/", -"packages/common/runtime/", -"packages/common/service-manager/", -"packages/common/redis-util/", -"packages/common/env/", -"packages/common/types-proto/core/", -"packages/common/types-proto/build/", -"packages/common/smithy-output/api-status/rust-server/", -"packages/common/smithy-output/api-status/rust/", -"packages/common/smithy-output/api-matchmaker/rust-server/", -"packages/common/smithy-output/api-matchmaker/rust/", -"packages/common/smithy-output/api-cloud/rust-server/", -"packages/common/smithy-output/api-cloud/rust/", -"packages/common/smithy-output/api-portal/rust-server/", -"packages/common/smithy-output/api-portal/rust/", -"packages/common/smithy-output/api-cf-verification/rust-server/", -"packages/common/smithy-output/api-cf-verification/rust/", -"packages/common/smithy-output/api-party/rust-server/", -"packages/common/smithy-output/api-party/rust/", -"packages/common/smithy-output/api-traefik-provider/rust-server/", -"packages/common/smithy-output/api-traefik-provider/rust/", -"packages/common/smithy-output/api-group/rust-server/", -"packages/common/smithy-output/api-group/rust/", -"packages/common/smithy-output/api-identity/rust-server/", -"packages/common/smithy-output/api-identity/rust/", -"packages/common/smithy-output/api-job/rust-server/", -"packages/common/smithy-output/api-job/rust/", -"packages/common/smithy-output/api-auth/rust-server/", -"packages/common/smithy-output/api-auth/rust/", -"packages/common/smithy-output/api-kv/rust-server/", -"packages/common/smithy-output/api-kv/rust/", -"packages/common/migrate/", -"packages/common/api-helper/macros/", -"packages/common/api-helper/build/", -"packages/common/global-error/", -"packages/common/formatted-error/", -"packages/common/test-images/", -"packages/common/hub-embed/", -"packages/common/schemac/", -"packages/common/convert/", -"packages/common/chirp-workflow/core/", -"packages/common/chirp-workflow/macros/", -"packages/common/claims/", -"packages/api/provision/", -"packages/api/ui/", -"packages/api/matchmaker/", -"packages/api/portal/", -"packages/api/traefik-provider/", -"packages/api/identity/", -"packages/api/auth/", -"packages/api/group/", -"packages/api/monolith-edge/", -"packages/api/cf-verification/", -"packages/api/status/", -"packages/api/cloud/", -"packages/api/job/", -"packages/api/games/", -"packages/api/actor/", -"packages/api/monolith-public/", -"packages/services/token/ops/exchange/", -"packages/services/token/ops/revoke/", -"packages/services/token/ops/get/", -"packages/services/token/ops/create/", -"packages/services/cluster/", -"packages/services/cluster/standalone/datacenter-tls-renew/", -"packages/services/cluster/standalone/default-update/", -"packages/services/cluster/standalone/gc/", -"packages/services/cluster/standalone/metrics-publish/", -"packages/services/email-verification/ops/complete/", -"packages/services/email-verification/ops/create/", -"packages/services/user-identity/ops/delete/", -"packages/services/user-identity/ops/get/", -"packages/services/user-identity/ops/create/", -"packages/services/pegboard/", -"packages/services/pegboard/standalone/dc-init/", -"packages/services/pegboard/standalone/gc/", -"packages/services/pegboard/standalone/ws/", -"packages/services/monolith/standalone/workflow-worker/", -"packages/services/monolith/standalone/worker/", -"packages/services/ds/", -"packages/services/linode/", -"packages/services/linode/standalone/gc/", -"packages/services/load-test/standalone/api-cloud/", -"packages/services/load-test/standalone/watch-requests/", -"packages/services/load-test/standalone/sqlx/", -"packages/services/load-test/standalone/mm/", -"packages/services/load-test/standalone/mm-sustain/", -"packages/services/faker/ops/job-template/", -"packages/services/faker/ops/mm-player/", -"packages/services/faker/ops/user/", -"packages/services/faker/ops/game/", -"packages/services/faker/ops/game-version/", -"packages/services/faker/ops/region/", -"packages/services/faker/ops/team/", -"packages/services/faker/ops/job-run/", -"packages/services/faker/ops/game-namespace/", -"packages/services/faker/ops/mm-lobby-row/", -"packages/services/faker/ops/build/", -"packages/services/faker/ops/mm-lobby/", -"packages/services/faker/ops/cdn-site/", -"packages/services/user/standalone/delete-pending/", -"packages/services/user/ops/resolve-email/", -"packages/services/user/ops/get/", -"packages/services/user/ops/profile-validate/", -"packages/services/user/ops/pending-delete-toggle/", -"packages/services/user/ops/token-create/", -"packages/services/user/ops/team-list/", -"packages/services/user/ops/avatar-upload-complete/", -"packages/services/user/worker/", -"packages/services/game/ops/namespace-version-set/", -"packages/services/game/ops/version-validate/", -"packages/services/game/ops/validate/", -"packages/services/game/ops/resolve-namespace-id/", -"packages/services/game/ops/namespace-version-history-list/", -"packages/services/game/ops/namespace-resolve-name-id/", -"packages/services/game/ops/recommend/", -"packages/services/game/ops/version-list/", -"packages/services/game/ops/namespace-validate/", -"packages/services/game/ops/list-for-team/", -"packages/services/game/ops/namespace-get/", -"packages/services/game/ops/get/", -"packages/services/game/ops/version-get/", -"packages/services/game/ops/list-all/", -"packages/services/game/ops/logo-upload-complete/", -"packages/services/game/ops/namespace-list/", -"packages/services/game/ops/namespace-create/", -"packages/services/game/ops/resolve-name-id/", -"packages/services/game/ops/namespace-resolve-url/", -"packages/services/game/ops/create/", -"packages/services/game/ops/version-create/", -"packages/services/game/ops/banner-upload-complete/", -"packages/services/game/ops/token-development-validate/", -"packages/services/team-invite/ops/get/", -"packages/services/team-invite/worker/", -"packages/services/captcha/util/", -"packages/services/captcha/ops/hcaptcha-config-get/", -"packages/services/captcha/ops/verify/", -"packages/services/captcha/ops/turnstile-verify/", -"packages/services/captcha/ops/turnstile-config-get/", -"packages/services/captcha/ops/request/", -"packages/services/captcha/ops/hcaptcha-verify/", -"packages/services/mm-config/ops/namespace-config-validate/", -"packages/services/mm-config/ops/version-publish/", -"packages/services/mm-config/ops/lobby-group-get/", -"packages/services/mm-config/ops/namespace-get/", -"packages/services/mm-config/ops/lobby-group-resolve-version/", -"packages/services/mm-config/ops/version-get/", -"packages/services/mm-config/ops/version-prepare/", -"packages/services/mm-config/ops/lobby-group-resolve-name-id/", -"packages/services/mm-config/ops/namespace-create/", -"packages/services/mm-config/ops/game-upsert/", -"packages/services/mm-config/ops/game-get/", -"packages/services/mm-config/ops/namespace-config-set/", -"packages/services/region/ops/resolve/", -"packages/services/region/ops/recommend/", -"packages/services/region/ops/get/", -"packages/services/region/ops/resolve-for-game/", -"packages/services/region/ops/list-for-game/", -"packages/services/region/ops/list/", -"packages/services/nomad/standalone/monitor/", -"packages/services/cdn/util/", -"packages/services/cdn/ops/site-get/", -"packages/services/cdn/ops/site-list-for-game/", -"packages/services/cdn/ops/namespace-resolve-domain/", -"packages/services/cdn/ops/version-publish/", -"packages/services/cdn/ops/namespace-domain-create/", -"packages/services/cdn/ops/namespace-auth-user-remove/", -"packages/services/cdn/ops/namespace-get/", -"packages/services/cdn/ops/ns-enable-domain-public-auth-set/", -"packages/services/cdn/ops/ns-auth-type-set/", -"packages/services/cdn/ops/site-create/", -"packages/services/cdn/ops/version-get/", -"packages/services/cdn/ops/namespace-auth-user-update/", -"packages/services/cdn/ops/version-prepare/", -"packages/services/cdn/ops/namespace-domain-remove/", -"packages/services/cdn/ops/namespace-create/", -"packages/services/cdn/worker/", -"packages/services/team/util/", -"packages/services/team/ops/validate/", -"packages/services/team/ops/user-ban-list/", -"packages/services/team/ops/recommend/", -"packages/services/team/ops/resolve-display-name/", -"packages/services/team/ops/member-list/", -"packages/services/team/ops/get/", -"packages/services/team/ops/member-count/", -"packages/services/team/ops/member-relationship-get/", -"packages/services/team/ops/member-get/", -"packages/services/team/ops/profile-validate/", -"packages/services/team/ops/user-ban-get/", -"packages/services/team/ops/join-request-list/", -"packages/services/team/ops/avatar-upload-complete/", -"packages/services/team/worker/", -"packages/services/ds-log/ops/read/", -"packages/services/ds-log/ops/export/", -"packages/services/job-run/", -"packages/services/workflow/standalone/gc/", -"packages/services/workflow/standalone/metrics-publish/", -"packages/services/cloud/ops/version-publish/", -"packages/services/cloud/ops/game-config-get/", -"packages/services/cloud/ops/namespace-token-public-create/", -"packages/services/cloud/ops/game-config-create/", -"packages/services/cloud/ops/namespace-get/", -"packages/services/cloud/ops/version-get/", -"packages/services/cloud/ops/game-token-create/", -"packages/services/cloud/ops/device-link-create/", -"packages/services/cloud/ops/namespace-create/", -"packages/services/cloud/ops/namespace-token-development-create/", -"packages/services/cloud/worker/", -"packages/services/job/util/", -"packages/services/job/standalone/gc/", -"packages/services/mm/util/", -"packages/services/mm/standalone/gc/", -"packages/services/mm/ops/player-get/", -"packages/services/mm/ops/dev-player-token-create/", -"packages/services/mm/ops/lobby-idle-update/", -"packages/services/mm/ops/lobby-find-lobby-query-list/", -"packages/services/mm/ops/lobby-find-fail/", -"packages/services/mm/ops/lobby-list-for-user-id/", -"packages/services/mm/ops/lobby-history/", -"packages/services/mm/ops/lobby-list-for-namespace/", -"packages/services/mm/ops/lobby-state-get/", -"packages/services/mm/ops/lobby-player-count/", -"packages/services/mm/ops/lobby-find-try-complete/", -"packages/services/mm/ops/lobby-for-run-id/", -"packages/services/mm/ops/player-count-for-namespace/", -"packages/services/mm/ops/lobby-runtime-aggregate/", -"packages/services/mm/ops/lobby-get/", -"packages/services/mm/worker/", -"packages/services/telemetry/standalone/beacon/", -"packages/services/external/ops/request-validate/", -"packages/services/external/worker/", -"packages/services/build/", -"packages/services/build/util/", -"packages/services/build/standalone/default-create/", -"packages/services/build/ops/get/", -"packages/services/build/ops/list-for-game/", -"packages/services/build/ops/list-for-env/", -"packages/services/build/ops/create/", -"packages/services/server-spec/", -"packages/services/cf-custom-hostname/ops/get/", -"packages/services/cf-custom-hostname/ops/resolve-hostname/", -"packages/services/cf-custom-hostname/ops/list-for-namespace-id/", -"packages/services/cf-custom-hostname/worker/", -"packages/services/ip/ops/info/", -"packages/services/dynamic-config/", -"packages/services/email/ops/send/", -"packages/services/job-log/ops/read/", -"packages/services/job-log/worker/", -"packages/services/upload/ops/prepare/", -"packages/services/upload/ops/complete/", -"packages/services/upload/ops/get/", -"packages/services/upload/ops/file-list/", -"packages/services/upload/ops/list-for-user/", -"packages/services/upload/worker/", -"packages/services/custom-user-avatar/ops/list-for-game/", -"packages/services/custom-user-avatar/ops/upload-complete/", -"packages/services/debug/ops/email-res/", -"packages/services/tier/", -"packages/services/cloud/standalone/default-create", -"packages/services/user", -] -exclude = [ -"externals/cloudflare-rs", -"externals/deno", -"externals/nomad-client", -"externals/posthog-rs", -"externals/redis-rs", -"externals/rivet-term", -"externals/serde_array_query", -"externals/sqlx", -] +members = ["packages/infra/legacy/job-runner","packages/infra/server","packages/common/operation/core","packages/common/operation/macros","packages/common/metrics","packages/common/pools","packages/common/s3-util","packages/common/cache/result","packages/common/cache/build","packages/common/test","packages/common/connection","packages/common/util/core","packages/common/util/search","packages/common/util/macros","packages/common/config","packages/common/nomad-util","packages/common/health-checks","packages/common/chirp/metrics","packages/common/chirp/types","packages/common/chirp/worker","packages/common/chirp/perf","packages/common/chirp/worker-attributes","packages/common/chirp/client","packages/common/runtime","packages/common/redis-util","packages/common/env","packages/common/types-proto/core","packages/common/types-proto/build","packages/common/smithy-output/api-status/rust-server","packages/common/smithy-output/api-status/rust","packages/common/smithy-output/api-matchmaker/rust-server","packages/common/smithy-output/api-matchmaker/rust","packages/common/smithy-output/api-cloud/rust-server","packages/common/smithy-output/api-cloud/rust","packages/common/smithy-output/api-portal/rust-server","packages/common/smithy-output/api-portal/rust","packages/common/smithy-output/api-cf-verification/rust-server","packages/common/smithy-output/api-cf-verification/rust","packages/common/smithy-output/api-party/rust-server","packages/common/smithy-output/api-party/rust","packages/common/smithy-output/api-traefik-provider/rust-server","packages/common/smithy-output/api-traefik-provider/rust","packages/common/smithy-output/api-group/rust-server","packages/common/smithy-output/api-group/rust","packages/common/smithy-output/api-identity/rust-server","packages/common/smithy-output/api-identity/rust","packages/common/smithy-output/api-job/rust-server","packages/common/smithy-output/api-job/rust","packages/common/smithy-output/api-auth/rust-server","packages/common/smithy-output/api-auth/rust","packages/common/smithy-output/api-kv/rust-server","packages/common/smithy-output/api-kv/rust","packages/common/migrate","packages/common/api-helper/macros","packages/common/api-helper/build","packages/common/global-error","packages/common/formatted-error","packages/common/test-images","packages/common/hub-embed","packages/common/service-manager","packages/common/schemac","packages/common/convert","packages/common/chirp-workflow/core","packages/common/chirp-workflow/macros","packages/common/claims","packages/api/provision","packages/api/ui","packages/api/matchmaker","packages/api/portal","packages/api/traefik-provider","packages/api/identity","packages/api/auth","packages/api/group","packages/api/monolith-edge","packages/api/cf-verification","packages/api/status","packages/api/cloud","packages/api/job","packages/api/games","packages/api/actor","packages/api/monolith-public","packages/services/token/ops/exchange","packages/services/token/ops/revoke","packages/services/token/ops/get","packages/services/token/ops/create","packages/services/cluster","packages/services/cluster/standalone/datacenter-tls-renew","packages/services/cluster/standalone/default-update","packages/services/cluster/standalone/gc","packages/services/cluster/standalone/metrics-publish","packages/services/email-verification/ops/complete","packages/services/email-verification/ops/create","packages/services/user-identity/ops/delete","packages/services/user-identity/ops/get","packages/services/user-identity/ops/create","packages/services/pegboard","packages/services/pegboard/standalone/dc-init","packages/services/pegboard/standalone/gc","packages/services/pegboard/standalone/ws","packages/services/monolith/standalone/workflow-worker","packages/services/monolith/standalone/worker","packages/services/ds","packages/services/linode","packages/services/linode/standalone/gc","packages/services/load-test/standalone/api-cloud","packages/services/load-test/standalone/watch-requests","packages/services/load-test/standalone/sqlx","packages/services/load-test/standalone/mm","packages/services/load-test/standalone/mm-sustain","packages/services/faker/ops/job-template","packages/services/faker/ops/mm-player","packages/services/faker/ops/user","packages/services/faker/ops/game","packages/services/faker/ops/game-version","packages/services/faker/ops/region","packages/services/faker/ops/team","packages/services/faker/ops/job-run","packages/services/faker/ops/game-namespace","packages/services/faker/ops/mm-lobby-row","packages/services/faker/ops/build","packages/services/faker/ops/mm-lobby","packages/services/faker/ops/cdn-site","packages/services/user","packages/services/user/standalone/delete-pending","packages/services/user/ops/resolve-email","packages/services/user/ops/get","packages/services/user/ops/profile-validate","packages/services/user/ops/pending-delete-toggle","packages/services/user/ops/token-create","packages/services/user/ops/team-list","packages/services/user/ops/avatar-upload-complete","packages/services/user/worker","packages/services/game/ops/namespace-version-set","packages/services/game/ops/version-validate","packages/services/game/ops/validate","packages/services/game/ops/resolve-namespace-id","packages/services/game/ops/namespace-version-history-list","packages/services/game/ops/namespace-resolve-name-id","packages/services/game/ops/recommend","packages/services/game/ops/version-list","packages/services/game/ops/namespace-validate","packages/services/game/ops/list-for-team","packages/services/game/ops/namespace-get","packages/services/game/ops/get","packages/services/game/ops/version-get","packages/services/game/ops/list-all","packages/services/game/ops/logo-upload-complete","packages/services/game/ops/namespace-list","packages/services/game/ops/namespace-create","packages/services/game/ops/resolve-name-id","packages/services/game/ops/namespace-resolve-url","packages/services/game/ops/create","packages/services/game/ops/version-create","packages/services/game/ops/banner-upload-complete","packages/services/game/ops/token-development-validate","packages/services/team-invite/ops/get","packages/services/team-invite/worker","packages/services/captcha/util","packages/services/captcha/ops/hcaptcha-config-get","packages/services/captcha/ops/verify","packages/services/captcha/ops/turnstile-verify","packages/services/captcha/ops/turnstile-config-get","packages/services/captcha/ops/request","packages/services/captcha/ops/hcaptcha-verify","packages/services/mm-config/ops/namespace-config-validate","packages/services/mm-config/ops/version-publish","packages/services/mm-config/ops/lobby-group-get","packages/services/mm-config/ops/namespace-get","packages/services/mm-config/ops/lobby-group-resolve-version","packages/services/mm-config/ops/version-get","packages/services/mm-config/ops/version-prepare","packages/services/mm-config/ops/lobby-group-resolve-name-id","packages/services/mm-config/ops/namespace-create","packages/services/mm-config/ops/game-upsert","packages/services/mm-config/ops/game-get","packages/services/mm-config/ops/namespace-config-set","packages/services/region/ops/resolve","packages/services/region/ops/recommend","packages/services/region/ops/get","packages/services/region/ops/resolve-for-game","packages/services/region/ops/list-for-game","packages/services/region/ops/list","packages/services/nomad/standalone/monitor","packages/services/cdn/util","packages/services/cdn/ops/site-get","packages/services/cdn/ops/site-list-for-game","packages/services/cdn/ops/namespace-resolve-domain","packages/services/cdn/ops/version-publish","packages/services/cdn/ops/namespace-domain-create","packages/services/cdn/ops/namespace-auth-user-remove","packages/services/cdn/ops/namespace-get","packages/services/cdn/ops/ns-enable-domain-public-auth-set","packages/services/cdn/ops/ns-auth-type-set","packages/services/cdn/ops/site-create","packages/services/cdn/ops/version-get","packages/services/cdn/ops/namespace-auth-user-update","packages/services/cdn/ops/version-prepare","packages/services/cdn/ops/namespace-domain-remove","packages/services/cdn/ops/namespace-create","packages/services/cdn/worker","packages/services/team/util","packages/services/team/ops/validate","packages/services/team/ops/user-ban-list","packages/services/team/ops/recommend","packages/services/team/ops/resolve-display-name","packages/services/team/ops/member-list","packages/services/team/ops/get","packages/services/team/ops/member-count","packages/services/team/ops/member-relationship-get","packages/services/team/ops/member-get","packages/services/team/ops/profile-validate","packages/services/team/ops/user-ban-get","packages/services/team/ops/join-request-list","packages/services/team/ops/avatar-upload-complete","packages/services/team/worker","packages/services/ds-log/ops/read","packages/services/ds-log/ops/export","packages/services/job-run","packages/services/workflow/standalone/gc","packages/services/workflow/standalone/metrics-publish","packages/services/cloud/standalone/default-create","packages/services/cloud/ops/version-publish","packages/services/cloud/ops/game-config-get","packages/services/cloud/ops/namespace-token-public-create","packages/services/cloud/ops/game-config-create","packages/services/cloud/ops/namespace-get","packages/services/cloud/ops/version-get","packages/services/cloud/ops/game-token-create","packages/services/cloud/ops/device-link-create","packages/services/cloud/ops/namespace-create","packages/services/cloud/ops/namespace-token-development-create","packages/services/cloud/worker","packages/services/job/util","packages/services/job/standalone/gc","packages/services/mm/util","packages/services/mm/standalone/gc","packages/services/mm/ops/player-get","packages/services/mm/ops/dev-player-token-create","packages/services/mm/ops/lobby-idle-update","packages/services/mm/ops/lobby-find-lobby-query-list","packages/services/mm/ops/lobby-find-fail","packages/services/mm/ops/lobby-list-for-user-id","packages/services/mm/ops/lobby-history","packages/services/mm/ops/lobby-list-for-namespace","packages/services/mm/ops/lobby-state-get","packages/services/mm/ops/lobby-player-count","packages/services/mm/ops/lobby-find-try-complete","packages/services/mm/ops/lobby-for-run-id","packages/services/mm/ops/player-count-for-namespace","packages/services/mm/ops/lobby-runtime-aggregate","packages/services/mm/ops/lobby-get","packages/services/mm/worker","packages/services/telemetry/standalone/beacon","packages/services/external/ops/request-validate","packages/services/external/worker","packages/services/build","packages/services/build/util","packages/services/build/standalone/default-create","packages/services/build/ops/get","packages/services/build/ops/list-for-game","packages/services/build/ops/list-for-env","packages/services/build/ops/create","packages/services/server-spec","packages/services/cf-custom-hostname/ops/get","packages/services/cf-custom-hostname/ops/resolve-hostname","packages/services/cf-custom-hostname/ops/list-for-namespace-id","packages/services/cf-custom-hostname/worker","packages/services/ip/ops/info","packages/services/dynamic-config","packages/services/email/ops/send","packages/services/job-log/ops/read","packages/services/job-log/worker","packages/services/upload/ops/prepare","packages/services/upload/ops/complete","packages/services/upload/ops/get","packages/services/upload/ops/file-list","packages/services/upload/ops/list-for-user","packages/services/upload/worker","packages/services/custom-user-avatar/ops/list-for-game","packages/services/custom-user-avatar/ops/upload-complete","packages/services/debug/ops/email-res","packages/services/tier","sdks/full/rust"] +exclude = ["externals/cloudflare-rs","externals/deno","externals/nomad-client","externals/posthog-rs","externals/redis-rs","externals/rivet-term","externals/serde_array_query","externals/sqlx"] [workspace.package] version = "0.0.1" @@ -302,15 +10,860 @@ edition = "2021" authors = ["Rivet Gaming, LLC "] license = "Apache-2.0" -# Speed up compilation +[workspace.dependencies.job-runner] +path = "packages/infra/legacy/job-runner" + +[workspace.dependencies.rivet-server] +path = "packages/infra/server" + +[workspace.dependencies.rivet-operation] +path = "packages/common/operation/core" + +[workspace.dependencies.rivet-operation-macros] +path = "packages/common/operation/macros" + +[workspace.dependencies.rivet-metrics] +path = "packages/common/metrics" + +[workspace.dependencies.rivet-pools] +path = "packages/common/pools" + +[workspace.dependencies.s3-util] +path = "packages/common/s3-util" + +[workspace.dependencies.rivet-cache-result] +path = "packages/common/cache/result" + +[workspace.dependencies.rivet-cache] +path = "packages/common/cache/build" + +[workspace.dependencies.rivet-test] +path = "packages/common/test" + +[workspace.dependencies.rivet-connection] +path = "packages/common/connection" + +[workspace.dependencies.rivet-util] +path = "packages/common/util/core" + +[workspace.dependencies.rivet-util-search] +path = "packages/common/util/search" + +[workspace.dependencies.rivet-util-macros] +path = "packages/common/util/macros" + +[workspace.dependencies.rivet-config] +path = "packages/common/config" + +[workspace.dependencies.nomad-util] +path = "packages/common/nomad-util" + +[workspace.dependencies.rivet-health-checks] +path = "packages/common/health-checks" + +[workspace.dependencies.chirp-metrics] +path = "packages/common/chirp/metrics" + +[workspace.dependencies.chirp-types] +path = "packages/common/chirp/types" + +[workspace.dependencies.chirp-worker] +path = "packages/common/chirp/worker" + +[workspace.dependencies.chirp-perf] +path = "packages/common/chirp/perf" + +[workspace.dependencies.chirp-worker-attributes] +path = "packages/common/chirp/worker-attributes" + +[workspace.dependencies.chirp-client] +path = "packages/common/chirp/client" + +[workspace.dependencies.rivet-runtime] +path = "packages/common/runtime" + +[workspace.dependencies.redis-util] +path = "packages/common/redis-util" + +[workspace.dependencies.rivet-env] +path = "packages/common/env" + +[workspace.dependencies.types-proto] +path = "packages/common/types-proto/core" + +[workspace.dependencies.types-proto-build] +path = "packages/common/types-proto/build" + +[workspace.dependencies.rivet-status-server] +path = "packages/common/smithy-output/api-status/rust-server" + +[workspace.dependencies.rivet-status] +path = "packages/common/smithy-output/api-status/rust" + +[workspace.dependencies.rivet-matchmaker-server] +path = "packages/common/smithy-output/api-matchmaker/rust-server" + +[workspace.dependencies.rivet-matchmaker] +path = "packages/common/smithy-output/api-matchmaker/rust" + +[workspace.dependencies.rivet-cloud-server] +path = "packages/common/smithy-output/api-cloud/rust-server" + +[workspace.dependencies.rivet-cloud] +path = "packages/common/smithy-output/api-cloud/rust" + +[workspace.dependencies.rivet-portal-server] +path = "packages/common/smithy-output/api-portal/rust-server" + +[workspace.dependencies.rivet-portal] +path = "packages/common/smithy-output/api-portal/rust" + +[workspace.dependencies.rivet-cf-verification-server] +path = "packages/common/smithy-output/api-cf-verification/rust-server" + +[workspace.dependencies.rivet-cf-verification] +path = "packages/common/smithy-output/api-cf-verification/rust" + +[workspace.dependencies.rivet-party-server] +path = "packages/common/smithy-output/api-party/rust-server" + +[workspace.dependencies.rivet-party] +path = "packages/common/smithy-output/api-party/rust" + +[workspace.dependencies.rivet-traefik-provider-server] +path = "packages/common/smithy-output/api-traefik-provider/rust-server" + +[workspace.dependencies.rivet-route] +path = "packages/common/smithy-output/api-traefik-provider/rust" + +[workspace.dependencies.rivet-group-server] +path = "packages/common/smithy-output/api-group/rust-server" + +[workspace.dependencies.rivet-group] +path = "packages/common/smithy-output/api-group/rust" + +[workspace.dependencies.rivet-identity-server] +path = "packages/common/smithy-output/api-identity/rust-server" + +[workspace.dependencies.rivet-identity] +path = "packages/common/smithy-output/api-identity/rust" + +[workspace.dependencies.rivet-job-server] +path = "packages/common/smithy-output/api-job/rust-server" + +[workspace.dependencies.rivet-job] +path = "packages/common/smithy-output/api-job/rust" + +[workspace.dependencies.rivet-auth-server] +path = "packages/common/smithy-output/api-auth/rust-server" + +[workspace.dependencies.rivet-auth] +path = "packages/common/smithy-output/api-auth/rust" + +[workspace.dependencies.rivet-kv-server] +path = "packages/common/smithy-output/api-kv/rust-server" + +[workspace.dependencies.rivet-kv] +path = "packages/common/smithy-output/api-kv/rust" + +[workspace.dependencies.rivet-migrate] +path = "packages/common/migrate" + +[workspace.dependencies.api-helper-macros] +path = "packages/common/api-helper/macros" + +[workspace.dependencies.api-helper] +path = "packages/common/api-helper/build" + +[workspace.dependencies.global-error] +path = "packages/common/global-error" + +[workspace.dependencies.formatted-error] +path = "packages/common/formatted-error" + +[workspace.dependencies.rivet-test-images] +path = "packages/common/test-images" + +[workspace.dependencies.rivet-hub-embed] +path = "packages/common/hub-embed" + +[workspace.dependencies.rivet-service-manager] +path = "packages/common/service-manager" + +[workspace.dependencies.schemac] +path = "packages/common/schemac" + +[workspace.dependencies.rivet-convert] +path = "packages/common/convert" + +[workspace.dependencies.chirp-workflow] +path = "packages/common/chirp-workflow/core" + +[workspace.dependencies.chirp-workflow-macros] +path = "packages/common/chirp-workflow/macros" + +[workspace.dependencies.rivet-claims] +path = "packages/common/claims" + +[workspace.dependencies.api-provision] +path = "packages/api/provision" + +[workspace.dependencies.api-ui] +path = "packages/api/ui" + +[workspace.dependencies.api-matchmaker] +path = "packages/api/matchmaker" + +[workspace.dependencies.api-portal] +path = "packages/api/portal" + +[workspace.dependencies.api-traefik-provider] +path = "packages/api/traefik-provider" + +[workspace.dependencies.api-identity] +path = "packages/api/identity" + +[workspace.dependencies.api-auth] +path = "packages/api/auth" + +[workspace.dependencies.api-group] +path = "packages/api/group" + +[workspace.dependencies.api-monolith-edge] +path = "packages/api/monolith-edge" + +[workspace.dependencies.api-cf-verification] +path = "packages/api/cf-verification" + +[workspace.dependencies.api-status] +path = "packages/api/status" + +[workspace.dependencies.api-cloud] +path = "packages/api/cloud" + +[workspace.dependencies.api-job] +path = "packages/api/job" + +[workspace.dependencies.api-games] +path = "packages/api/games" + +[workspace.dependencies.api-actor] +path = "packages/api/actor" + +[workspace.dependencies.api-monolith-public] +path = "packages/api/monolith-public" + +[workspace.dependencies.token-exchange] +path = "packages/services/token/ops/exchange" + +[workspace.dependencies.token-revoke] +path = "packages/services/token/ops/revoke" + +[workspace.dependencies.token-get] +path = "packages/services/token/ops/get" + +[workspace.dependencies.token-create] +path = "packages/services/token/ops/create" + +[workspace.dependencies.cluster] +path = "packages/services/cluster" + +[workspace.dependencies.cluster-datacenter-tls-renew] +path = "packages/services/cluster/standalone/datacenter-tls-renew" + +[workspace.dependencies.cluster-default-update] +path = "packages/services/cluster/standalone/default-update" + +[workspace.dependencies.cluster-gc] +path = "packages/services/cluster/standalone/gc" + +[workspace.dependencies.cluster-metrics-publish] +path = "packages/services/cluster/standalone/metrics-publish" + +[workspace.dependencies.email-verification-complete] +path = "packages/services/email-verification/ops/complete" + +[workspace.dependencies.email-verification-create] +path = "packages/services/email-verification/ops/create" + +[workspace.dependencies.user-identity-delete] +path = "packages/services/user-identity/ops/delete" + +[workspace.dependencies.user-identity-get] +path = "packages/services/user-identity/ops/get" + +[workspace.dependencies.user-identity-create] +path = "packages/services/user-identity/ops/create" + +[workspace.dependencies.pegboard] +path = "packages/services/pegboard" + +[workspace.dependencies.pegboard-dc-init] +path = "packages/services/pegboard/standalone/dc-init" + +[workspace.dependencies.pegboard-gc] +path = "packages/services/pegboard/standalone/gc" + +[workspace.dependencies.pegboard-ws] +path = "packages/services/pegboard/standalone/ws" + +[workspace.dependencies.monolith-workflow-worker] +path = "packages/services/monolith/standalone/workflow-worker" + +[workspace.dependencies.monolith-worker] +path = "packages/services/monolith/standalone/worker" + +[workspace.dependencies.ds] +path = "packages/services/ds" + +[workspace.dependencies.linode] +path = "packages/services/linode" + +[workspace.dependencies.linode-gc] +path = "packages/services/linode/standalone/gc" + +[workspace.dependencies.load-test-api-cloud] +path = "packages/services/load-test/standalone/api-cloud" + +[workspace.dependencies.load-test-watch-requests] +path = "packages/services/load-test/standalone/watch-requests" + +[workspace.dependencies.load-test-sqlx] +path = "packages/services/load-test/standalone/sqlx" + +[workspace.dependencies.load-test-mm] +path = "packages/services/load-test/standalone/mm" + +[workspace.dependencies.load-test-mm-sustain] +path = "packages/services/load-test/standalone/mm-sustain" + +[workspace.dependencies.faker-job-template] +path = "packages/services/faker/ops/job-template" + +[workspace.dependencies.faker-mm-player] +path = "packages/services/faker/ops/mm-player" + +[workspace.dependencies.faker-user] +path = "packages/services/faker/ops/user" + +[workspace.dependencies.faker-game] +path = "packages/services/faker/ops/game" + +[workspace.dependencies.faker-game-version] +path = "packages/services/faker/ops/game-version" + +[workspace.dependencies.faker-region] +path = "packages/services/faker/ops/region" + +[workspace.dependencies.faker-team] +path = "packages/services/faker/ops/team" + +[workspace.dependencies.faker-job-run] +path = "packages/services/faker/ops/job-run" + +[workspace.dependencies.faker-game-namespace] +path = "packages/services/faker/ops/game-namespace" + +[workspace.dependencies.faker-mm-lobby-row] +path = "packages/services/faker/ops/mm-lobby-row" + +[workspace.dependencies.faker-build] +path = "packages/services/faker/ops/build" + +[workspace.dependencies.faker-mm-lobby] +path = "packages/services/faker/ops/mm-lobby" + +[workspace.dependencies.faker-cdn-site] +path = "packages/services/faker/ops/cdn-site" + +[workspace.dependencies.user] +path = "packages/services/user" + +[workspace.dependencies.user-delete-pending] +path = "packages/services/user/standalone/delete-pending" + +[workspace.dependencies.user-resolve-email] +path = "packages/services/user/ops/resolve-email" + +[workspace.dependencies.user-get] +path = "packages/services/user/ops/get" + +[workspace.dependencies.user-profile-validate] +path = "packages/services/user/ops/profile-validate" + +[workspace.dependencies.user-pending-delete-toggle] +path = "packages/services/user/ops/pending-delete-toggle" + +[workspace.dependencies.user-token-create] +path = "packages/services/user/ops/token-create" + +[workspace.dependencies.user-team-list] +path = "packages/services/user/ops/team-list" + +[workspace.dependencies.user-avatar-upload-complete] +path = "packages/services/user/ops/avatar-upload-complete" + +[workspace.dependencies.user-worker] +path = "packages/services/user/worker" + +[workspace.dependencies.game-namespace-version-set] +path = "packages/services/game/ops/namespace-version-set" + +[workspace.dependencies.game-version-validate] +path = "packages/services/game/ops/version-validate" + +[workspace.dependencies.game-validate] +path = "packages/services/game/ops/validate" + +[workspace.dependencies.game-resolve-namespace-id] +path = "packages/services/game/ops/resolve-namespace-id" + +[workspace.dependencies.game-namespace-version-history-list] +path = "packages/services/game/ops/namespace-version-history-list" + +[workspace.dependencies.game-namespace-resolve-name-id] +path = "packages/services/game/ops/namespace-resolve-name-id" + +[workspace.dependencies.game-recommend] +path = "packages/services/game/ops/recommend" + +[workspace.dependencies.game-version-list] +path = "packages/services/game/ops/version-list" + +[workspace.dependencies.game-namespace-validate] +path = "packages/services/game/ops/namespace-validate" + +[workspace.dependencies.game-list-for-team] +path = "packages/services/game/ops/list-for-team" + +[workspace.dependencies.game-namespace-get] +path = "packages/services/game/ops/namespace-get" + +[workspace.dependencies.game-get] +path = "packages/services/game/ops/get" + +[workspace.dependencies.game-version-get] +path = "packages/services/game/ops/version-get" + +[workspace.dependencies.game-list-all] +path = "packages/services/game/ops/list-all" + +[workspace.dependencies.game-logo-upload-complete] +path = "packages/services/game/ops/logo-upload-complete" + +[workspace.dependencies.game-namespace-list] +path = "packages/services/game/ops/namespace-list" + +[workspace.dependencies.game-namespace-create] +path = "packages/services/game/ops/namespace-create" + +[workspace.dependencies.game-resolve-name-id] +path = "packages/services/game/ops/resolve-name-id" + +[workspace.dependencies.game-namespace-resolve-url] +path = "packages/services/game/ops/namespace-resolve-url" + +[workspace.dependencies.game-create] +path = "packages/services/game/ops/create" + +[workspace.dependencies.game-version-create] +path = "packages/services/game/ops/version-create" + +[workspace.dependencies.game-banner-upload-complete] +path = "packages/services/game/ops/banner-upload-complete" + +[workspace.dependencies.game-token-development-validate] +path = "packages/services/game/ops/token-development-validate" + +[workspace.dependencies.team-invite-get] +path = "packages/services/team-invite/ops/get" + +[workspace.dependencies.team-invite-worker] +path = "packages/services/team-invite/worker" + +[workspace.dependencies.rivet-util-captcha] +path = "packages/services/captcha/util" + +[workspace.dependencies.captcha-hcaptcha-config-get] +path = "packages/services/captcha/ops/hcaptcha-config-get" + +[workspace.dependencies.captcha-verify] +path = "packages/services/captcha/ops/verify" + +[workspace.dependencies.captcha-turnstile-verify] +path = "packages/services/captcha/ops/turnstile-verify" + +[workspace.dependencies.captcha-turnstile-config-get] +path = "packages/services/captcha/ops/turnstile-config-get" + +[workspace.dependencies.captcha-request] +path = "packages/services/captcha/ops/request" + +[workspace.dependencies.captcha-hcaptcha-verify] +path = "packages/services/captcha/ops/hcaptcha-verify" + +[workspace.dependencies.mm-config-namespace-config-validate] +path = "packages/services/mm-config/ops/namespace-config-validate" + +[workspace.dependencies.mm-config-version-publish] +path = "packages/services/mm-config/ops/version-publish" + +[workspace.dependencies.mm-config-lobby-group-get] +path = "packages/services/mm-config/ops/lobby-group-get" + +[workspace.dependencies.mm-config-namespace-get] +path = "packages/services/mm-config/ops/namespace-get" + +[workspace.dependencies.mm-config-lobby-group-resolve-version] +path = "packages/services/mm-config/ops/lobby-group-resolve-version" + +[workspace.dependencies.mm-config-version-get] +path = "packages/services/mm-config/ops/version-get" + +[workspace.dependencies.mm-config-version-prepare] +path = "packages/services/mm-config/ops/version-prepare" + +[workspace.dependencies.mm-config-lobby-group-resolve-name-id] +path = "packages/services/mm-config/ops/lobby-group-resolve-name-id" + +[workspace.dependencies.mm-config-namespace-create] +path = "packages/services/mm-config/ops/namespace-create" + +[workspace.dependencies.mm-config-game-upsert] +path = "packages/services/mm-config/ops/game-upsert" + +[workspace.dependencies.mm-config-game-get] +path = "packages/services/mm-config/ops/game-get" + +[workspace.dependencies.mm-config-namespace-config-set] +path = "packages/services/mm-config/ops/namespace-config-set" + +[workspace.dependencies.region-resolve] +path = "packages/services/region/ops/resolve" + +[workspace.dependencies.region-recommend] +path = "packages/services/region/ops/recommend" + +[workspace.dependencies.region-get] +path = "packages/services/region/ops/get" + +[workspace.dependencies.region-resolve-for-game] +path = "packages/services/region/ops/resolve-for-game" + +[workspace.dependencies.region-list-for-game] +path = "packages/services/region/ops/list-for-game" + +[workspace.dependencies.region-list] +path = "packages/services/region/ops/list" + +[workspace.dependencies.nomad-monitor] +path = "packages/services/nomad/standalone/monitor" + +[workspace.dependencies.rivet-util-cdn] +path = "packages/services/cdn/util" + +[workspace.dependencies.cdn-site-get] +path = "packages/services/cdn/ops/site-get" + +[workspace.dependencies.cdn-site-list-for-game] +path = "packages/services/cdn/ops/site-list-for-game" + +[workspace.dependencies.cdn-namespace-resolve-domain] +path = "packages/services/cdn/ops/namespace-resolve-domain" + +[workspace.dependencies.cdn-version-publish] +path = "packages/services/cdn/ops/version-publish" + +[workspace.dependencies.cdn-namespace-domain-create] +path = "packages/services/cdn/ops/namespace-domain-create" + +[workspace.dependencies.cdn-namespace-auth-user-remove] +path = "packages/services/cdn/ops/namespace-auth-user-remove" + +[workspace.dependencies.cdn-namespace-get] +path = "packages/services/cdn/ops/namespace-get" + +[workspace.dependencies.cdn-ns-enable-domain-public-auth-set] +path = "packages/services/cdn/ops/ns-enable-domain-public-auth-set" + +[workspace.dependencies.cdn-ns-auth-type-set] +path = "packages/services/cdn/ops/ns-auth-type-set" + +[workspace.dependencies.cdn-site-create] +path = "packages/services/cdn/ops/site-create" + +[workspace.dependencies.cdn-version-get] +path = "packages/services/cdn/ops/version-get" + +[workspace.dependencies.cdn-namespace-auth-user-update] +path = "packages/services/cdn/ops/namespace-auth-user-update" + +[workspace.dependencies.cdn-version-prepare] +path = "packages/services/cdn/ops/version-prepare" + +[workspace.dependencies.cdn-namespace-domain-remove] +path = "packages/services/cdn/ops/namespace-domain-remove" + +[workspace.dependencies.cdn-namespace-create] +path = "packages/services/cdn/ops/namespace-create" + +[workspace.dependencies.cdn-worker] +path = "packages/services/cdn/worker" + +[workspace.dependencies.rivet-util-team] +path = "packages/services/team/util" + +[workspace.dependencies.team-validate] +path = "packages/services/team/ops/validate" + +[workspace.dependencies.team-user-ban-list] +path = "packages/services/team/ops/user-ban-list" + +[workspace.dependencies.team-recommend] +path = "packages/services/team/ops/recommend" + +[workspace.dependencies.team-resolve-display-name] +path = "packages/services/team/ops/resolve-display-name" + +[workspace.dependencies.team-member-list] +path = "packages/services/team/ops/member-list" + +[workspace.dependencies.team-get] +path = "packages/services/team/ops/get" + +[workspace.dependencies.team-member-count] +path = "packages/services/team/ops/member-count" + +[workspace.dependencies.team-member-relationship-get] +path = "packages/services/team/ops/member-relationship-get" + +[workspace.dependencies.team-member-get] +path = "packages/services/team/ops/member-get" + +[workspace.dependencies.team-profile-validate] +path = "packages/services/team/ops/profile-validate" + +[workspace.dependencies.team-user-ban-get] +path = "packages/services/team/ops/user-ban-get" + +[workspace.dependencies.team-join-request-list] +path = "packages/services/team/ops/join-request-list" + +[workspace.dependencies.team-avatar-upload-complete] +path = "packages/services/team/ops/avatar-upload-complete" + +[workspace.dependencies.team-worker] +path = "packages/services/team/worker" + +[workspace.dependencies.ds-log-read] +path = "packages/services/ds-log/ops/read" + +[workspace.dependencies.ds-log-export] +path = "packages/services/ds-log/ops/export" + +[workspace.dependencies.job-run] +path = "packages/services/job-run" + +[workspace.dependencies.workflow-gc] +path = "packages/services/workflow/standalone/gc" + +[workspace.dependencies.workflow-metrics-publish] +path = "packages/services/workflow/standalone/metrics-publish" + +[workspace.dependencies.cloud-default-create] +path = "packages/services/cloud/standalone/default-create" + +[workspace.dependencies.cloud-version-publish] +path = "packages/services/cloud/ops/version-publish" + +[workspace.dependencies.cloud-game-config-get] +path = "packages/services/cloud/ops/game-config-get" + +[workspace.dependencies.cloud-namespace-token-public-create] +path = "packages/services/cloud/ops/namespace-token-public-create" + +[workspace.dependencies.cloud-game-config-create] +path = "packages/services/cloud/ops/game-config-create" + +[workspace.dependencies.cloud-namespace-get] +path = "packages/services/cloud/ops/namespace-get" + +[workspace.dependencies.cloud-version-get] +path = "packages/services/cloud/ops/version-get" + +[workspace.dependencies.cloud-game-token-create] +path = "packages/services/cloud/ops/game-token-create" + +[workspace.dependencies.cloud-device-link-create] +path = "packages/services/cloud/ops/device-link-create" + +[workspace.dependencies.cloud-namespace-create] +path = "packages/services/cloud/ops/namespace-create" + +[workspace.dependencies.cloud-namespace-token-development-create] +path = "packages/services/cloud/ops/namespace-token-development-create" + +[workspace.dependencies.cloud-worker] +path = "packages/services/cloud/worker" + +[workspace.dependencies.rivet-util-job] +path = "packages/services/job/util" + +[workspace.dependencies.job-gc] +path = "packages/services/job/standalone/gc" + +[workspace.dependencies.rivet-util-mm] +path = "packages/services/mm/util" + +[workspace.dependencies.mm-gc] +path = "packages/services/mm/standalone/gc" + +[workspace.dependencies.mm-player-get] +path = "packages/services/mm/ops/player-get" + +[workspace.dependencies.mm-dev-player-token-create] +path = "packages/services/mm/ops/dev-player-token-create" + +[workspace.dependencies.mm-lobby-idle-update] +path = "packages/services/mm/ops/lobby-idle-update" + +[workspace.dependencies.mm-lobby-find-lobby-query-list] +path = "packages/services/mm/ops/lobby-find-lobby-query-list" + +[workspace.dependencies.mm-lobby-find-fail] +path = "packages/services/mm/ops/lobby-find-fail" + +[workspace.dependencies.mm-lobby-list-for-user-id] +path = "packages/services/mm/ops/lobby-list-for-user-id" + +[workspace.dependencies.mm-lobby-history] +path = "packages/services/mm/ops/lobby-history" + +[workspace.dependencies.mm-lobby-list-for-namespace] +path = "packages/services/mm/ops/lobby-list-for-namespace" + +[workspace.dependencies.mm-lobby-state-get] +path = "packages/services/mm/ops/lobby-state-get" + +[workspace.dependencies.mm-lobby-player-count] +path = "packages/services/mm/ops/lobby-player-count" + +[workspace.dependencies.mm-lobby-find-try-complete] +path = "packages/services/mm/ops/lobby-find-try-complete" + +[workspace.dependencies.mm-lobby-for-run-id] +path = "packages/services/mm/ops/lobby-for-run-id" + +[workspace.dependencies.mm-player-count-for-namespace] +path = "packages/services/mm/ops/player-count-for-namespace" + +[workspace.dependencies.mm-lobby-runtime-aggregate] +path = "packages/services/mm/ops/lobby-runtime-aggregate" + +[workspace.dependencies.mm-lobby-get] +path = "packages/services/mm/ops/lobby-get" + +[workspace.dependencies.mm-worker] +path = "packages/services/mm/worker" + +[workspace.dependencies.telemetry-beacon] +path = "packages/services/telemetry/standalone/beacon" + +[workspace.dependencies.external-request-validate] +path = "packages/services/external/ops/request-validate" + +[workspace.dependencies.external-worker] +path = "packages/services/external/worker" + +[workspace.dependencies.build] +path = "packages/services/build" + +[workspace.dependencies.rivet-util-build] +path = "packages/services/build/util" + +[workspace.dependencies.build-default-create] +path = "packages/services/build/standalone/default-create" + +[workspace.dependencies.build-get] +path = "packages/services/build/ops/get" + +[workspace.dependencies.build-list-for-game] +path = "packages/services/build/ops/list-for-game" + +[workspace.dependencies.build-list-for-env] +path = "packages/services/build/ops/list-for-env" + +[workspace.dependencies.build-create] +path = "packages/services/build/ops/create" + +[workspace.dependencies.server-spec] +path = "packages/services/server-spec" + +[workspace.dependencies.cf-custom-hostname-get] +path = "packages/services/cf-custom-hostname/ops/get" + +[workspace.dependencies.cf-custom-hostname-resolve-hostname] +path = "packages/services/cf-custom-hostname/ops/resolve-hostname" + +[workspace.dependencies.cf-custom-hostname-list-for-namespace-id] +path = "packages/services/cf-custom-hostname/ops/list-for-namespace-id" + +[workspace.dependencies.cf-custom-hostname-worker] +path = "packages/services/cf-custom-hostname/worker" + +[workspace.dependencies.ip-info] +path = "packages/services/ip/ops/info" + +[workspace.dependencies.dynamic-config] +path = "packages/services/dynamic-config" + +[workspace.dependencies.email-send] +path = "packages/services/email/ops/send" + +[workspace.dependencies.job-log-read] +path = "packages/services/job-log/ops/read" + +[workspace.dependencies.job-log-worker] +path = "packages/services/job-log/worker" + +[workspace.dependencies.upload-prepare] +path = "packages/services/upload/ops/prepare" + +[workspace.dependencies.upload-complete] +path = "packages/services/upload/ops/complete" + +[workspace.dependencies.upload-get] +path = "packages/services/upload/ops/get" + +[workspace.dependencies.upload-file-list] +path = "packages/services/upload/ops/file-list" + +[workspace.dependencies.upload-list-for-user] +path = "packages/services/upload/ops/list-for-user" + +[workspace.dependencies.upload-worker] +path = "packages/services/upload/worker" + +[workspace.dependencies.custom-user-avatar-list-for-game] +path = "packages/services/custom-user-avatar/ops/list-for-game" + +[workspace.dependencies.custom-user-avatar-upload-complete] +path = "packages/services/custom-user-avatar/ops/upload-complete" + +[workspace.dependencies.debug-email-res] +path = "packages/services/debug/ops/email-res" + +[workspace.dependencies.tier] +path = "packages/services/tier" + +[workspace.dependencies.rivet-api] +path = "sdks/full/rust" + [profile.dev] overflow-checks = false debug = false lto = "off" -# Speed up proc macros. -# -# https://endler.dev/2020/rust-compile-times/#avoid-procedural-macro-crates [profile.dev.build-override] opt-level = 3 @@ -319,4 +872,3 @@ debug = false lto = "fat" codegen-units = 1 opt-level = 3 - diff --git a/packages/infra/client/Cargo.lock b/packages/infra/client/Cargo.lock index 665490925d..75e52c529d 100644 --- a/packages/infra/client/Cargo.lock +++ b/packages/infra/client/Cargo.lock @@ -629,7 +629,7 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chirp-types" -version = "0.1.0" +version = "0.0.1" dependencies = [ "prost 0.10.4", ] @@ -2314,7 +2314,7 @@ dependencies = [ [[package]] name = "formatted-error" -version = "0.1.0" +version = "0.0.1" dependencies = [ "gray_matter", "hashbrown 0.12.3", @@ -2536,7 +2536,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "global-error" -version = "0.1.5" +version = "0.0.1" dependencies = [ "async-trait", "formatted-error", @@ -4031,7 +4031,7 @@ dependencies = [ [[package]] name = "pegboard-container-runner" -version = "0.1.0" +version = "0.0.1" dependencies = [ "anyhow", "nix 0.27.1", @@ -4045,14 +4045,14 @@ dependencies = [ [[package]] name = "pegboard-echo-server" -version = "0.1.0" +version = "0.0.1" dependencies = [ "tiny_http", ] [[package]] name = "pegboard-isolate-v8-runner" -version = "0.1.0" +version = "0.0.1" dependencies = [ "anyhow", "deno_ast", @@ -4075,7 +4075,7 @@ dependencies = [ [[package]] name = "pegboard-manager" -version = "0.1.0" +version = "0.0.1" dependencies = [ "anyhow", "futures-util", @@ -4109,7 +4109,7 @@ dependencies = [ [[package]] name = "pegboard-runner-protocol" -version = "0.1.0" +version = "0.0.1" dependencies = [ "serde", "uuid", @@ -4809,7 +4809,7 @@ dependencies = [ [[package]] name = "rivet-config" -version = "0.1.0" +version = "0.0.1" dependencies = [ "config", "dirs", @@ -4825,7 +4825,7 @@ dependencies = [ [[package]] name = "rivet-util" -version = "0.1.0" +version = "0.0.1" dependencies = [ "async-trait", "bcrypt", @@ -4851,7 +4851,7 @@ dependencies = [ [[package]] name = "rivet-util-macros" -version = "0.1.0" +version = "0.0.1" dependencies = [ "proc-macro2", "quote", @@ -5132,7 +5132,7 @@ dependencies = [ [[package]] name = "schemac" -version = "0.1.0" +version = "0.0.1" dependencies = [ "lazy_static", "prost-build", @@ -6821,7 +6821,7 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "types-proto" -version = "0.1.0" +version = "0.0.1" dependencies = [ "chirp-types", "http 0.2.12", @@ -6836,7 +6836,7 @@ dependencies = [ [[package]] name = "types-proto-build" -version = "0.1.0" +version = "0.0.1" dependencies = [ "heck 0.3.3", "indoc 1.0.9", diff --git a/packages/infra/client/Cargo.toml b/packages/infra/client/Cargo.toml index 6cf24fa1e2..9d16d9f5b7 100644 --- a/packages/infra/client/Cargo.toml +++ b/packages/infra/client/Cargo.toml @@ -6,3 +6,16 @@ members = [ "manager", "runner-protocol", ] + +[workspace.package] +version = "0.0.1" +edition = "2021" +authors = ["Rivet Gaming, LLC "] +license = "Apache-2.0" + +[workspace.dependencies] +container-runner = { path = "container-runner" } +echo = { path = "echo" } +isolate-v8-runner = { path = "isolate-v8-runner" } +runner-protocol = { path = "runner-protocol", package = "pegboard-runner-protocol" } + diff --git a/packages/services/cluster/src/ops/server/dc-init/Cargo.toml b/packages/services/cluster/src/ops/server/dc-init/Cargo.toml deleted file mode 100644 index 267fab3129..0000000000 --- a/packages/services/cluster/src/ops/server/dc-init/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -name = "pegboard-dc-init" -version.workspace = true -authors.workspace = true -license.workspace = true -edition.workspace = true - -[dependencies] -chirp-client = { path = "../../../../common/chirp/client" } -chirp-workflow = { path = "../../../../common/chirp-workflow/core" } -reqwest = "0.11" -rivet-config = { path = "../../../../common/config" } -rivet-connection = { path = "../../../../common/connection" } -rivet-pools = { path = "../../../../common/pools" } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -tokio = { version = "1.40", features = ["full"] } -tracing = "0.1" -tracing-logfmt = "0.3" -tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "json", "ansi"] } -uuid = { version = "1", features = ["v4"] } - -cluster = { path = "../../../cluster" } -pegboard = { path = "../.." } - -[dev-dependencies] -chirp-worker = { path = "../../../../common/chirp/worker" } diff --git a/packages/services/cluster/src/ops/server/dc-init/src/lib.rs b/packages/services/cluster/src/ops/server/dc-init/src/lib.rs deleted file mode 100644 index 1f81518c9b..0000000000 --- a/packages/services/cluster/src/ops/server/dc-init/src/lib.rs +++ /dev/null @@ -1,54 +0,0 @@ -use chirp_workflow::prelude::*; - -// TODO: This is not idempotent. -#[tracing::instrument(skip_all)] -pub async fn start(config: rivet_config::Config, pools: rivet_pools::Pools) -> GlobalResult<()> { - let client = chirp_client::SharedClient::from_env(pools.clone())?.wrap_new("pegboard-dc-init"); - let cache = rivet_cache::CacheInner::from_env(pools.clone())?; - let ctx = StandaloneCtx::new( - chirp_workflow::compat::db_from_pools(&pools).await?, - config, - rivet_connection::Connection::new(client, pools, cache), - "pegboard-dc-init", - ) - .await?; - - // Read config from env - let cluster_configs = &ctx.config().server()?.rivet.clusters(); - - for (_, cluster_config) in cluster_configs { - // Find datacenter ids with pegboard pools - let datacenter_ids = cluster_config - .datacenters - .iter() - .map(|(_, x)| x.id) - .collect::>(); - - let rows = sql_fetch_all!( - [ctx, (Uuid,)] - " - SELECT dc_id - FROM UNNEST($1) AS dc(dc_id) - WHERE NOT EXISTS( - SELECT 1 - FROM db_workflow.workflows - WHERE - workflow_name = 'pegboard_datacenter' AND - (tags->>'datacenter_id')::UUID = dc_id - ) - ", - datacenter_ids, - ) - .await?; - - // Create missing datacenters - for (datacenter_id,) in rows { - ctx.workflow(pegboard::workflows::datacenter::Input { datacenter_id }) - .tag("datacenter_id", datacenter_id) - .dispatch() - .await?; - } - } - - Ok(()) -} diff --git a/packages/services/cluster/src/ops/server/dc-init/tests/integration.rs b/packages/services/cluster/src/ops/server/dc-init/tests/integration.rs deleted file mode 100644 index a557dee72e..0000000000 --- a/packages/services/cluster/src/ops/server/dc-init/tests/integration.rs +++ /dev/null @@ -1,14 +0,0 @@ -use tracing_subscriber::prelude::*; - -#[tokio::test(flavor = "multi_thread")] -async fn basic() { - tracing_subscriber::registry() - .with( - tracing_logfmt::builder() - .layer() - .with_filter(tracing_subscriber::filter::LevelFilter::INFO), - ) - .init(); - - pegboard_dc_init::run_from_env().await.unwrap(); -} diff --git a/packages/services/ds/Cargo.toml b/packages/services/ds/Cargo.toml index 3e89c26ee1..f5a87b400e 100644 --- a/packages/services/ds/Cargo.toml +++ b/packages/services/ds/Cargo.toml @@ -56,7 +56,7 @@ tier = { path = "../tier" } token-create = { path = "../token/ops/create" } upload-get = { path = "../upload/ops/get" } user-identity-get = { path = "../user-identity/ops/get" } -rivet-config = { path = "../../common/config" } +rivet-config.workspace = true [dependencies.sqlx] path = "../../../externals/sqlx" diff --git a/scripts/cargo/update_workspace.ts b/scripts/cargo/update_workspace.ts new file mode 100755 index 0000000000..573aca7d97 --- /dev/null +++ b/scripts/cargo/update_workspace.ts @@ -0,0 +1,92 @@ +#!/usr/bin/env -S deno run --allow-net --allow-env --allow-read --allow-write + +import { parse, stringify } from "@std/toml"; +import { walk } from "@std/fs"; +import { join, relative } from "@std/path"; + +const rootDir = join(import.meta.dirname, "../.."); + +async function updateCargoToml() { + const workspaceTomlPath = join(rootDir, "Cargo.toml"); + const workspaceTomlContent = await Deno.readTextFile(workspaceTomlPath); + const workspaceToml = parse(workspaceTomlContent); + + // Find all workspace members + const members: string[] = []; + for await ( + const entry of walk(join(rootDir, "packages"), { + includeDirs: false, + exts: ["toml"], + }) + ) { + // Exclude infra packages + if ( + entry.path.includes("packages/infra/client") || + entry.path.includes("packages/infra/job-runner") + ) { + continue; + } + + const packagePath = relative( + rootDir, + entry.path.replace(/\/Cargo\.toml$/, ""), + ); + members.push(packagePath); + } + + // Hardcode extra workspace members + members.push("sdks/full/rust"); + + // Remove path dependencies, since we'll replace these. This lets us + // preserve existing external dependencies. + const existingDependencies = workspaceToml.workspace?.dependencies || {}; + for (const [name, dep] of Object.entries(existingDependencies)) { + if (dep && typeof dep === "object" && "path" in dep) { + delete existingDependencies[name]; + } + } + + // Build new workspace dependencies + const newDependencies: Record = {}; + for (const packagePath of members) { + const packageTomlPath = join(rootDir, packagePath, "Cargo.toml"); + const packageTomlContent = await Deno.readTextFile(packageTomlPath); + const packageToml = parse(packageTomlContent); + + // Save to workspace + newDependencies[packageToml.package.name] = { + path: packagePath, + }; + + // // Replace all package dependencies that refer to a workspace package to use `*.workspace = true` + // for ( + // const [depName, dep] of Object.entries(packageToml.dependencies || {}) + // ) { + // if (dep && typeof dep === "object" && "path" in dep) { + // const depAbsolutePath = join(packagePath, dep.path); + // const depRelativePath = relative(rootDir, depAbsolutePath); + // if (members.includes(depRelativePath)) { + // delete packageToml.dependencies[depName].path; + // packageToml.dependencies[depName].workspace = true; + // } + // } + // } + + // // Write the updated package Cargo.toml + // const updatedPackageTomlContent = stringify(packageToml); + // await Deno.writeTextFile(packageTomlPath, updatedPackageTomlContent); + } + + // Update and write workspace + workspaceToml.workspace = workspaceToml.workspace || {}; + workspaceToml.workspace.members = members; + workspaceToml.workspace.dependencies = { + ...existingDependencies, + ...newDependencies, + }; + + const updatedTomlContent = stringify(workspaceToml); + await Deno.writeTextFile(workspaceTomlPath, updatedTomlContent); +} + +updateCargoToml().catch(console.error); diff --git a/scripts/deno.json b/scripts/deno.json index b311abf54f..89d0c442d6 100644 --- a/scripts/deno.json +++ b/scripts/deno.json @@ -2,6 +2,7 @@ "imports": { "@std/fs": "jsr:@std/fs@^1.0.5", "@std/path": "jsr:@std/path@^1.0.8", + "@std/toml": "jsr:@std/toml@^1.0.1", "dedent": "npm:dedent@^1.5.3" }, "fmt": { diff --git a/scripts/deno.lock b/scripts/deno.lock index 4d4f279d25..794712e25f 100644 --- a/scripts/deno.lock +++ b/scripts/deno.lock @@ -2,12 +2,17 @@ "version": "3", "packages": { "specifiers": { + "jsr:@std/collections@^1.0.5": "jsr:@std/collections@1.0.9", "jsr:@std/fs@^1.0.5": "jsr:@std/fs@1.0.5", "jsr:@std/path@^1.0.7": "jsr:@std/path@1.0.8", "jsr:@std/path@^1.0.8": "jsr:@std/path@1.0.8", + "jsr:@std/toml@^1.0.1": "jsr:@std/toml@1.0.1", "npm:dedent@^1.5.3": "npm:dedent@1.5.3" }, "jsr": { + "@std/collections@1.0.9": { + "integrity": "4f58104ead08a04a2199374247f07befe50ba01d9cca8cbb23ab9a0419921e71" + }, "@std/fs@1.0.5": { "integrity": "41806ad6823d0b5f275f9849a2640d87e4ef67c51ee1b8fb02426f55e02fd44e", "dependencies": [ @@ -16,6 +21,12 @@ }, "@std/path@1.0.8": { "integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be" + }, + "@std/toml@1.0.1": { + "integrity": "b55b407159930f338d384b1f8fd317c8e8a35e27ebb8946155f49e3a158d16c4", + "dependencies": [ + "jsr:@std/collections@^1.0.5" + ] } }, "npm": { @@ -49,6 +60,7 @@ "dependencies": [ "jsr:@std/fs@^1.0.5", "jsr:@std/path@^1.0.8", + "jsr:@std/toml@^1.0.1", "npm:dedent@^1.5.3" ] } diff --git a/sdks/full/rust/Cargo.toml b/sdks/full/rust/Cargo.toml index 6a448ded68..09a3bf0d29 100644 --- a/sdks/full/rust/Cargo.toml +++ b/sdks/full/rust/Cargo.toml @@ -1,9 +1,9 @@ + [package] name = "rivet-api" version = "0.0.1" authors = ["OpenAPI Generator team and contributors"] description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)" -# Override this license by providing a License Object in the OpenAPI. license = "Unlicense" edition = "2018" @@ -13,7 +13,11 @@ serde_derive = "^1.0" serde_with = "^2.0" serde_json = "^1.0" url = "^2.2" -uuid = { version = "^1.0", features = ["serde"] } + +[dependencies.uuid] +version = "^1.0" +features = ["serde"] + [dependencies.reqwest] version = "^0.11" -features = ["json", "multipart"] +features = ["json","multipart"]