Written on October 19, 2023.
Tags: code, rust, wasm
Table of contents
Quick post to share a tool that has been enlightening my dev life recently. Tired of installing tons of stuffs on your machine and not being able to reproduce the same environment on another machine?
Devcontainers!
Enter containers.dev. It’s allows you to run your dev environment in a container. It is extremely well integrated with VSCode and integration with JetBrains IDEs is on the way IDEA-321768. Features allows to install extensions like docker-in-docker. devcontainers/cli is handy to attach to an exsting environment and executre long running commands with no IDE attached.
Won’t say much more, just try it out with a project like this one: ssoudan/fluid-simulation-rs where you can try it to develop locally, on GH Codespaces, or my preferred way: in a devcontainer on another machine.
This project is a (tiny) fluid simulation written in Rust and compiled to WASM. It is then used in a web page to render the simulation on a canvas. It is mostly a rewrite of this project in Rust. Go to https://ssoudan.github.io/fluid-simulation-rs/ for a live demo.
Last point, it can also be used in the CI, as demonstrated in: .github/workflows/ci.yml.
Enjoy!
References
- https://containers.dev/
- devcontainers/cli
- ssoudan/fluid-simulation-rs
- https://ssoudan.github.io/fluid-simulation-rs/