Argh. Every time I have an idea for a side project in @rustlang the lack of library support gets in my way. Right now it's soooooo easy to pick Go because of this, so easy that people aren't bothering to write Rust versions of already available Go libraries. #SadRustacean
-
-
Odgovor korisnicima @KevinHoffman @rustlang
The lib I would need to really start using rust in prod is a Django like orm. Where you just create the model and the migration is done for you.
1 reply 1 proslijeđeni tweet 1 korisnik označava da mu se sviđa -
Have you used Diesel?
@dieselframework1 reply 0 proslijeđenih tweetova 1 korisnik označava da mu se sviđa -
Yes, you need to write the sql by yourself. I'm looking for something that create the DB from the rust coded model.
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđa -
So something like a Serde annotation that generates SQL from a struct?
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđa -
Exactly !
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđa -
Diesel already has annotations; out of curiosity, what would the API for that library look like, and how would it differ?
1 reply 0 proslijeđenih tweetova 1 korisnik označava da mu se sviđa -
Yes it has annotations, but from my understanding we still have to write the SQL part by ourself. It would be nice to code a struct that contains object like Charfield, Integerfield, etc.. and then we just call a command to generate the migration script.
1 reply 0 proslijeđenih tweetova 1 korisnik označava da mu se sviđa
You don’t have to write any sql. You write stuff like this, where NewPost is a struct with the annotation.pic.twitter.com/QFYio56mdP
-
-
Before doing this, you had to write the sql that created the "posts" table. Or maybe I missed something in this lib
1 reply 0 proslijeđenih tweetova 1 korisnik označava da mu se sviđa -
Ah! I forgot about that. Yes, by default, migrations are written by hand. A library for that would be quite nice! Sorry for forgetting :(
0 replies 0 proslijeđenih tweetova 1 korisnik označava da mu se sviđa
Kraj razgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.