ARK-Builders / ARK-Builders/ark-core

Offload `ark-cli storage` Subcommand Methods to `fs-storage` Crate

Open
#73 0 comments 0 reactions 1 assignee Claimed by @tareknaser View on GitHub
Dominant language
Rust
Stars
10
Forks
6
PR merge metrics
No merged PRs in 30d

Description

## Description
Currently, `ark-cli storage` subcommand implements its own storage handling methods for different storage types, specifically:
- `File`
- `Folder`

For each storage type, `ark-cli` includes methods to:
- Load storage from disk
- Read storage
- Append to storage
- Overwrite storage

`ark-cli` exposes CLI commands to call these methods from the command line.

For better modularity, we should offload these operations to another crate within `ark-rust` workspace, potentially `fs-storage`.
`ark-cli` crate should then only have CLI command structs to gather parameters from the user, perform minimal preprocessing (if needed), and pass these to the methods in `fs-storage`. This will allow better separation of concerns, making the codebase easier to manage and extend.

## Tasks
- [ ] Implement the storage handling methods (loading, reading, appending, overwriting) in `fs-storage` crate.
- [ ] Modify the `ark-cli` crate to use the `fs-storage` crate for all storage operations.

Related conversation: https://github.com/ARK-Builders/ark-rust/pull/67#discussion_r1619128333

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.