wealthfolio icon indicating copy to clipboard operation
wealthfolio copied to clipboard

Init src-rust-lib

Open maidh91 opened this issue 5 months ago • 0 comments

Context

  • This is one step in the plan to support this app running on web browser, and mobile
  • Goal
    • in Desktop mode, src/commands will calls to @tauri-apps
    • in Web browser mode, src/commands will calls to some backend
      • eventually, the dir structure can be like this
wealthfolio/
├── src/
├── src-tauri/
├── src-rust-api/    # some REST api backend
├── src-rust-lib/    # shared rust code using `src-tauri` and `src-rust-api` 

Summary

  • This src-rust-lib contains shared code using in different project like src-tauri (desktop) or src-rust-api (REST api)
  • Move src-tauri/db.rs to src-rust-api/db.rs
  • This PR only shows a sample of reusing db.rs in src-tauri from src-rust-api, the full PR is https://github.com/afadil/wealthfolio/pull/54 that move all core logic to src-rust-libs

maidh91 avatar Sep 07 '24 12:09 maidh91