Powers multi-language support for CodeCrafters challenges
Powers multi-language support for CodeCrafters challenges
This repository was previously used to power multiple language support for CodeCrafters challenges.
IMPORTANT: The content in this repository has since been migrated to challenge-specific repositories like this:
New PRs must be sent to the above repositories. We're still updating docs around contributing support.
The language one uses for a CodeCrafters challenge is an integral part of the challenge experience. A few questions to think about:
We'll tackle these problems through a combination of:
For a language to be supported in a specific challenge, we need the following things in place:
You'll need one Dockerfile per language version supported. These'll be placed under the
dockerfiles/ folder.
The Dockerfile needs to setup the language + all required dependencies, and make
the tester executable available at /bin/tester.
Wherever possible, utilize Docker's build cache.
The starter repo needs to contains the following files:
codecrafters.ymlREADME.mdyour_docker.sh
for Docker, your_git.sh for Git etc. app folder, that contains boilerplate code that the user will build upon.
This code must also include a section that can be commented out to pass the
first stage.Any language-specific code must adhere to common conventions or style guides for that language.
Since starter repos for different languages are likely to have a lot of similar
code, we use templates to create these. The raw files are under
starter_templates, the compiled versions are under compiled_starters.
Slow build times drastically affect the codecrafters challenge experience. Building an image for a language and executing the starter should be snappy - ideally under 1 second.
To achieve this, we use Docker's build caching.
The experience of downloading a repository, running it locally, receiving results via a git push etc. can be pretty daunting to a new user who isn't used to how CodeCrafters works.
We make this easier by adding a concise step-by-step README, and also including all code needed to pass the first stage.
Thank you for considering contributing to this project!
Here's a detailed guide on Adding support for a new language. If you need help, feel free to ask in the Discord server.
No open issues yet, or sync has not completed.