d2
d2 copied to clipboard
Add a `.devcontainer` manifest
This could be useful for quickly spinning up a dev environment, e.g. in a local container or a codespace:
- https://code.visualstudio.com/docs/devcontainers/create-dev-container
- https://github.com/microsoft/vscode/tree/main/.devcontainer (an example)
The setup should follow the standard Ubuntu setup:
- Run
Scripts/install-dependencies-aptor install the equivalent dependencies manually - Download Swift from https://www.swift.org/download and place it e.g. in
/opt/swift-
Add symlinks to make it accessible from the
PATH:ln -s /opt/swift/usr/bin/swift /usr/local/bin/swift ln -s /opt/swift/usr/bin/sourcekit-lsp /usr/local/bin/sourcekit-lsp
-
The only stumbling block is that the default image in GitHub Codespaces is currently based on Ubuntu 20.04, which doesn't have libstdc++-12-dev. However it seems like the installed libstdc++-9-dev should be fine too.
Alternatively we could of course try use something based on the swift-Docker image, similar to our production image (though of course without the slimmed down runner image or cross-compilation).