I’ve been finding it difficult to find good tutorials on different topics within Rust, so I’ve had to learn what to do the hard way. I don’t want this hard-won knowledge to got waste, so I am considering making tutorials based on my experience. If you guys have any requests for a specific tutorial, let me know. I would also like to mention that this would be an in-my-free-time venture, so I’ll do my best, but I still have life stuff to which I need to attend. Thanks in advance.

  • baum@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I don’t know if this is exactly what you’re looking for but from the diesel docs, I believe you can init a connection using diesel::mysql, diesel::pg, and diesel::sqlite. I believe from there you can simply access an existing database, say one initialized in a container and connect to it. I dont think you would have to use the standard diesel sql scripts or migrations and could use any database with appropriate credentials from there. Sorry if I misinterpreted what you meant, however.

    edit: The other option could be to go with the crates that only handle the collection and statements/queries of databases (ie: mysql crate or postgres crate). If you wanted to do something like crud operations you could use something like axum or actix for the routing and methods and have the link to the database level with those crate connections