// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
	"name": "ssm",
	"image": "mcr.microsoft.com/devcontainers/rust:1-bookworm",

	// Features to add to the dev container
	"features": {
		"ghcr.io/devcontainers/features/python:1": {
			"version": "3.12",
			"installTools": false
		},
		"ghcr.io/guiyomh/features/just:0": {},
		"ghcr.io/devcontainers/features/ruby:1": {
			"version": "3.2"
		}
	},

	// Mount AWS credentials from host
	"mounts": [
		"source=${localEnv:HOME}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached"
	],

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	"forwardPorts": [9050, 4000],

	// Use 'postCreateCommand' to run commands after the container is created.
	"postCreateCommand": "curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH=\"$HOME/.local/bin:$PATH\" && rustup component add rustfmt clippy && uv tool install maturin && gem install github-pages",

	// Configure tool-specific properties.
	"customizations": {
		"vscode": {
			"extensions": [
				"rust-lang.rust-analyzer",
				"vadimcn.vscode-lldb",
				"serayuzgur.crates",
				"editorconfig.editorconfig",
				"ms-python.python",
				"tamasfe.even-better-toml",
				"mhutchie.git-graph"
			]
		}
	}
}
