Page MenuHomePhabricator

[services][backup] Bootstrap new Rust project
ClosedPublic

Authored by bartek on Dec 8 2022, 4:08 AM.
Tags
None
Referenced Files
F3286566: D5842.diff
Sat, Nov 16, 1:26 PM
Unknown Object (File)
Sun, Nov 10, 10:05 PM
Unknown Object (File)
Sat, Nov 9, 1:21 PM
Unknown Object (File)
Sat, Nov 9, 11:59 AM
Unknown Object (File)
Sat, Nov 9, 11:59 AM
Unknown Object (File)
Fri, Nov 8, 3:31 AM
Unknown Object (File)
Mon, Nov 4, 4:01 PM
Unknown Object (File)
Mon, Nov 4, 4:00 PM
Subscribers

Details

Summary

Created a standard cargo project structure. Linked proto code generation.

Adding @ashoat as creating a project introduces dependencies. These are almost 1:1 copy-pasted from blob service.

Depends on D5841

Test Plan

cargo run succeeds and prints hello world.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Dec 8 2022, 4:15 AM

Dependencies look good

This revision is now accepted and ready to land.Dec 8 2022, 12:13 PM
  • Moved service module from service.rs to service/mod.rs as it is going to be a multi-file module
  • Introduced a few more dependencies:
    • async_stream - To conveniently manage data chunks when pulling backups. Was already used in old blob_client.
    • clap - A command-line parser, also used in identity service. Will be used to configure the service
    • once_cell - To conveniently store global config read from cmdline. This lib is extremely popular and powerfull, it's planned to be merged into Rust std lib.
    • rand and uuid - To generate backup/log IDs, unique holders, etc. These are also used in our other services.

cc @ashoat on new dependencies