Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn the tuono_lib crate into tuono for the new projects #421

Open
Valerioageno opened this issue Jan 26, 2025 · 2 comments
Open

Turn the tuono_lib crate into tuono for the new projects #421

Valerioageno opened this issue Jan 26, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request rust Requires rust knowledge

Comments

@Valerioageno
Copy link
Member

Context

It is very weird to use tuono on the frontend and tuono_lib on the backend.

Goal

All new tuono projects will add the dependency using tuono and not tuono_lib

// api/health_check.rs
use tuono::Request;
use tuono::axum::http::StatusCode;

#[tuono::api(GET)]
pub async fn health_check(_req: Request) -> StatusCode {
    StatusCode::OK
}

Work breakdown

With this feature, we:

  • Update the dependency in each example to
[dependencies]
tuono = { package = "tuono_lib", path = "../../crates/tuono_lib/" }
  • Replace each tuono_lib occurrences in the examples with tuono
  • Update the tuono CLI to correctly replace the right strings (add tests)
  • Update tuono_lib_macros to correctly inject the tuono dependency
  • Update the documentation
@Valerioageno Valerioageno converted this from a draft issue Jan 26, 2025
@jacobhq
Copy link
Contributor

jacobhq commented Jan 26, 2025

Happy to work on this 👍

@marcalexiei marcalexiei added enhancement New feature or request rust Requires rust knowledge labels Jan 26, 2025
@Valerioageno Valerioageno moved this from Ready to In progress in Road to V1 Jan 26, 2025
@Valerioageno
Copy link
Member Author

@jacobhq It just came in my mind: We should keep the tuono_lib_macros support for both tuono_lib::hanldler and tuono::handler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rust Requires rust knowledge
Projects
Status: In progress
Development

No branches or pull requests

3 participants