百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

languages

> 编程语言
开源

为 CodeCrafters 挑战提供多语言支持

335 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

为 CodeCrafters 挑战提供多语言支持

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:

  • codecrafters-io/build-your-own-redis
  • codecrafters-io/build-your-own-docker
  • codecrafters-io/build-your-own-git
  • codecrafters-io/build-your-own-sqlite
  • codecrafters-io/build-your-own-grep

New PRs must be sent to the above repositories. We're still updating docs around contributing support.

Table of Contents

  • Objective
  • Components
    • Dockerfile
    • Starter Repo
  • Constraints
    • Fast build times
    • Easy to start
  • Contributing

Objective

The language one uses for a CodeCrafters challenge is an integral part of the challenge experience. A few questions to think about:

  • Is it easy to setup locally?
  • Does the standard library have all required functions to complete the challenge?
  • Are there any tricky areas where people are likely to get stuck?

We'll tackle these problems through a combination of:

  • Sample code to get started
  • Troubleshooting advice in the README
  • Helpful language-specific hints in stages wherever applicable

Components

For a language to be supported in a specific challenge, we need the following things in place:

  • A Dockerfile, which'll be used to build the container where code is evaluated.
  • A starter repo, like this one.

Dockerfile

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.

Starter Repo

The starter repo needs to contains the following files:

  • codecrafters.yml
  • README.md
  • An executable script / entry point, based on the challenge. your_docker.sh for Docker, your_git.sh for Git etc.
  • An 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.

Constraints

Fast build times

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.

Easy to start

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.

Contributing

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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言