Closed jackymao closed 2 years ago
I haven't used Warp myself before (my own projects usually use Actix Web), but I'd certainly like Butane to be compatible with Warp, so I'll take a dive into this.
Once I fix up Many, I'll give Warp a a bit of a look.
Indeed ForeignKey implemented Serialize/Deserialize. Sorry that I missed this and I should more carefully checking on this. I was add the #[derive(Serialize, Deserialize)]
line above pub struct Post {
, and get some hints by VSCode. But I have just retry and there is no warning about this now. It is my fault and really sorry about the wrong words on it.
Thank you for the advice on dyn BackendConnection, I will try butane::db::Connection and R2D2, I see there is a test r2r2.rs, I need to learn and getting understand how to work with it.
Appreciate that you'll work on the Many feature and will have a look on Warp in future. It's a great news. Actix Web is powerful, and I'm also quite love Warp. I would like to use Butane with Warp if possible.
I've published 0.4 which allows Serialize/Deserialize on Many. I haven't gotten to looking at Warp directly yet, but will try to do so in the next few days.
Hi @Electron100,
Is there a plan of an example that Butane works with Warp ?
I tried to work the getting started blog program with Warp but failed, meet 2 major problem:
(dyn butane::db::BackendConnection + 'static)
cannot be shared between threads safely, when try to write "let post = create_post(&conn, &blog, title, body);" in Warp filter map closure.I'm unable to solve this by myself. I would appreciate if you have plan on an example of Butane works with Warp in future.
Many thanks.
Best regards, Jacky