Skip to content

Add Cobrust language support#7977

Closed
Hakureirm wants to merge 1 commit into
github-linguist:mainfrom
Hakureirm:add-cobrust-language
Closed

Add Cobrust language support#7977
Hakureirm wants to merge 1 commit into
github-linguist:mainfrom
Hakureirm:add-cobrust-language

Conversation

@Hakureirm
Copy link
Copy Markdown

@Hakureirm Hakureirm commented May 22, 2026

Description

Add support for Cobrust (.cb extension), an AI-first statically-typed
language with Python syntax + Rust ownership semantics. Compiles to native
binaries via Cranelift / LLVM.

  • Project: https://github.com/Cobrust-lang/cobrust
  • License (compiler + samples): Apache-2.0 OR MIT dual
  • Current release: v0.5.2 (2026-05-22)
  • Sample license: Apache-2.0 OR MIT dual (same as compiler)

Checklist

  • languages.yml entry added (no language_id per CONTRIBUTING — will be assigned by script/update-ids)
  • samples/Cobrust/ populated with 5 programs (4 of 5 are non-trivial algorithms: fib, fizzbuzz, two_sum, valid_anagram)
  • Color hex #b45309 (warm amber/copper) — no collision with existing hexes in current languages.yml
  • .cb extension not currently claimed (nearest are .cbl COBOL and .cbx CryptoBox — distinct)
  • TextMate grammar published at https://github.com/Cobrust-lang/cobrust-tmlanguage (scope source.cobrust, 314 LOC, dual Apache-2.0 OR MIT)
  • License: Apache-2.0 OR MIT dual

Grammar submodule

The TextMate grammar lives in a dedicated repo so it can be added as a
vendor submodule via script/add-grammar:

script/add-grammar https://github.com/Cobrust-lang/cobrust-tmlanguage

I am happy to push the grammars.yml + submodule entry as an additional
commit on this PR once a maintainer indicates the languages.yml + samples
approach is OK; or run script/add-grammar locally and amend this PR
in a single revision — whichever the maintainer prefers.

Usage scope (honest)

.cb files are concentrated in the project organisation:

  • Cobrust-lang/cobrust main repo: ~158 .cb files across examples/,
    examples/leetcode/ (100-problem LC-100 stress corpus), tests/cb_fixtures/
  • VSCode/Cursor extension cobrust-lang.cobrust published 2026-05-22 on
    Open VSX: https://open-vsx.org/extension/cobrust-lang/cobrust

External repo adoption is currently nascent (released 5 days ago).
Primary users are project authors and AI agents writing/translating
Cobrust source via the project's LLM-translation subsystem. Maintainers
are welcome to apply usage-gate policy as they see fit; this PR
provides the language definition + grammar so the option is available
when adoption grows.

Cross-references

@Hakureirm Hakureirm requested a review from a team as a code owner May 22, 2026 08:37
Cobrust is a Rust-implemented Python successor with static typing
and AI-native translation pipeline. Compiles to native binaries
via Cranelift / LLVM.

- languages.yml: add Cobrust entry (type: programming, color: #b45309,
  extension: .cb, ace_mode: python, no language_id per CONTRIBUTING)
- samples/Cobrust/: add 5 sample files (hello, fib, fizzbuzz, two_sum,
  valid_anagram — 4 of 5 are non-trivial algorithms)

Grammar TextMate scope: source.cobrust — full grammar deferred to
vendor submodule once cobrust-textmate-grammar repo is published
(follow-up PR per linguist CONTRIBUTING §Add a grammar).

Repo: https://github.com/Cobrust-lang/cobrust
License: Apache-2.0 OR MIT dual
@Hakureirm Hakureirm force-pushed the add-cobrust-language branch from 2974f8e to 09d5e36 Compare May 22, 2026 09:30
@lildude
Copy link
Copy Markdown
Member

lildude commented May 22, 2026

This PR is invalid. You have not followed the instructions in the CONTRIBUTING.md file and have not used our PR template.

We have also minimum usage requirements as detailed in the CONTRIBUTING.md file. This means we do not accept PRs for very new or hobby languages. Closing but feel free to open a PR when your language is popular enough.

@lildude lildude closed this May 22, 2026
@Hakureirm Hakureirm deleted the add-cobrust-language branch May 22, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants