This repository is configured with a GitHub Codespaces development container that provides a complete, ready-to-use development environment for the FFT multi-language project.
-
Create a Codespace
- Click the green "Code" button on GitHub
- Select the "Codespaces" tab
- Click "Create codespace on main" (or your branch)
-
Wait for Setup
- The container will build automatically (first time takes ~3-5 minutes)
- Dependencies are installed via the post-create script
- All languages and tools will be ready to use
-
Start Debugging
- Press
Ctrl+Shift+D(orCmd+Shift+Don Mac) to open the Debug panel - Select any debug configuration from the dropdown
- Press
F5or click the green play button to start debugging
- Press
- Python 3.12 - Latest Python with pip
- C++ (g++ with C++11) - GCC compiler with debugging support (gdb)
- Java 17 - OpenJDK for Java development
- Node.js 20 - For JavaScript and TypeScript
- Rust (latest stable) - Cargo and rustc
- Build Tools: make, cmake, cargo, npm
- Debuggers: gdb (C++), lldb (Rust), debugpy (Python)
- Utilities: git, vim, nano, curl, wget
The following extensions are automatically installed:
- Python language support
- Pylance (IntelliSense)
- Python debugger
- C/C++ IntelliSense
- C/C++ debugging
- CMake Tools
- Java Extension Pack
- Java debugger
- ESLint
- Prettier
- TypeScript language support
- rust-analyzer (language server)
- LLDB debugger
- EditorConfig
- GitLens
- GitHub Actions
The .vscode/launch.json file includes pre-configured debug settings for all languages:
- Python: FFT Main - Debug the main FFT implementation
- Python: Run Tests - Debug the test suite
- C++: FFT Main - Debug the main FFT executable
- C++: Run Tests - Debug the test executable
- Java: FFT Main - Debug the main FFT class
- Java: Run Tests - Debug the test class
- JavaScript: FFT Main - Debug the FFT implementation
- JavaScript: Run Tests - Debug the test suite
- TypeScript: FFT Main - Debug compiled TypeScript FFT
- TypeScript: Run Tests - Debug compiled TypeScript tests
- Rust: FFT Main - Debug the Rust FFT binary
- Rust: Run Tests - Debug Rust test binaries
The .vscode/tasks.json file provides build and test tasks:
- Build C++ FFT - Compile C++ code
- Build TypeScript - Compile TypeScript to JavaScript
- Build Rust FFT - Build Rust project
- Run All Tests - Execute tests for all languages
- Individual test tasks for each language
Access tasks via:
Ctrl+Shift+B(orCmd+Shift+Bon Mac) for build tasksCtrl+Shift+P→ "Tasks: Run Task" for all tasks
Consistent formatting and linting across the team:
- Auto-save enabled with delay
- Format on save enabled
- Language-specific tab sizes (4 for Python/C++/Java/Rust, 2 for JS/TS)
- Type checking enabled for Python and TypeScript
.devcontainer/
├── devcontainer.json # Main configuration file
├── Dockerfile # Custom container image
└── post-create.sh # Automatic setup script
.vscode/
├── launch.json # Debug configurations
├── tasks.json # Build and test tasks
├── settings.json # Workspace settings
└── extensions.json # Recommended extensions
Edit .devcontainer/Dockerfile and add packages to the apt-get install commands:
RUN apt-get update && apt-get install -y \
existing-package \
new-package \
&& rm -rf /var/lib/apt/lists/*Edit .devcontainer/devcontainer.json in the customizations.vscode.extensions array:
"extensions": [
"existing.extension",
"publisher.new-extension"
]Edit the Dockerfile to change the Python version:
RUN add-apt-repository ppa:deadsnakes/ppa -y && \
apt-get update && \
apt-get install -y python3.13 python3.13-dev ...Edit the Dockerfile to change the Node.js version:
RUN curl -fsSL https://deb.nodesource.com/setup_21.x | bash - && \
apt-get install -y nodejsEdit the Dockerfile to change the Java version:
RUN apt-get install -y openjdk-21-jdkRust uses the latest stable version by default. To use a specific version:
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.75.0The .devcontainer/post-create.sh script runs after container creation. Edit it to:
- Install additional dependencies
- Set up databases
- Pre-build projects
- Initialize services
Example additions:
# Install additional Python packages
pip install --user numpy scipy
# Set up a database
sudo apt-get update && sudo apt-get install -y postgresql- Check the Dockerfile syntax
- Ensure all URLs are accessible
- Look at the build logs in the terminal
- Try rebuilding: "Codespaces: Rebuild Container"
- Rebuild the container
- Check the extension IDs in
devcontainer.json - Ensure extensions are compatible with the VSCode version
- Verify the build task completed successfully
- Check paths in
launch.jsonmatch your project structure - Ensure the debugger extension is installed
- Review the Debug Console for error messages
- Check script permissions:
chmod +x .devcontainer/post-create.sh - Review the script for syntax errors
- Check the creation log in the terminal
- Ensure all dependencies are available
If you want to use this devcontainer locally with VS Code:
- Install Docker Desktop
- Install the Dev Containers extension
- Open the repository in VS Code
- Press
F1and select "Dev Containers: Reopen in Container"
- GitHub Codespaces Documentation
- Dev Containers Specification
- VSCode Debugging Guide
- VSCode Tasks Guide
When contributing to the devcontainer configuration:
- Test changes in a new Codespace before committing
- Document any new dependencies or requirements
- Update this README if you add new features
- Ensure the post-create script remains idempotent
- Keep container build time reasonable (< 10 minutes)
- Use
Ctrl+Shift+P(orCmd+Shift+P) to access the command palette - Forward ports automatically by running servers (they appear in the Ports panel)
- Customize your personal Codespace settings in GitHub Settings → Codespaces
- Use
code .in the terminal to open files/folders in the editor - Rebuild the container after changing
devcontainer.jsonorDockerfile