leptos
leptos copied to clipboard
Dev Containers and Docker Examples
Is your feature request related to a problem? Please describe. I commonly use Docker containers and Dev Containers within VSCode, Leptos has no examples of this and the project itself doesn't have a Dev Container. I regularly use containers to improve my development experience and repeatability. At the moment I need to reimplement this functionality for new projects without an official reference.
Describe the solution you'd like My proposal is to implement Dev Container support for the project itself and create a new example that users can look to as a guide on how to run Leptos in a containerised setting.
Describe alternatives you've considered Though I have brewed some solutions myself in the past, it would be good if they were part of the project.
Additional context For these changes, I would like to implement them myself.
Also for clarification, I'm not talking about publishing containers to Dockerhub or anything - only having examples of how to run Leptos in a containerised environment and adding Dev Containers to the project itself.
Please take a look at a pull request I've opened in the Leptos Book repository as an example of what I would like to add to this repository: leptos-rs/book#47
Because the examples in the book are all CodeSandboxes, they include Dockerfiles that include everything needed for developing a Leptos app, which I guess may or may not be identical with what's required for working on the Leptos repo itself.
It's pretty straightforward -- just Rust and Trunk.
I have never used VS Code Dev Containers so I have no insight into that part. I'm not sure that there's any Leptos-specific setup that needs to be done here, though. Having access to an ordinary Rust toolchain is all you need. (I guess if you wanted to specify either trunk
or cargo-leptos
that also works, and both can be installed with cargo install
.)
I have never used VS Code Dev Containers so I have no insight into that part. I'm not sure that there's any Leptos-specific setup that needs to be done here, though. Having access to an ordinary Rust toolchain is all you need. (I guess if you wanted to specify either
trunk
orcargo-leptos
that also works, and both can be installed withcargo install
.)
This is true, it is primarily intended to make an "it just works" style setup for people to get down to coding if they don't want to worry about their environment. An example of this would be that I commonly do development work on fresh machines or machines that I may not have sudo in, or machines that I do not want to pollute in terms of installations and required libraries.
It could be included in the repo as something optional, by no means required, but it would be nice to have a predefined environment that is virtually guaranteed to work when you spin it up. I found this to be something I wish I had when I began learning Rust and wanted to dabble in web frameworks, it was a little difficult to know what I needed at the time. If easily reusable and resettable environments were available from the beginning I think it would have been easier for me to pick up with only having to worry about the project I'm interacting with instead of my system, even if the installation is relatively not difficult.
For these changes, I would like to implement them myself.
@Jaffa-Cakes feel free to put up a PR.
@gbj I have experience with devcontainers, and would be happy to review the PR
@Jaffa-Cakes feel free to put up a PR.
@rakshith-ravi I'd be happy to put work towards another PR if @gbj can confirm it would likely be accepted.
We'll have to wait for a confirmation from @gbj, but the way I see it, it's just a quality of life improvement and doesn't affect others' workflow, so shouldn't be an issue
Sure, fine by me.
@Jaffa-Cakes ping me when you make the PR