DEV Community

CrabPascal
CrabPascal

Posted on

Contributing to CrabPascal: Get Involved | Contribuindo com o CrabPascal: participe

Bilingual post · Post bilíngue

Jump to: English · Português


English {#english}

Contributing to CrabPascal: Get Involved

CrabPascal is MIT-licensed, hosted on Bitbucket, and built in the open sprint by sprint. You do not need compiler PhD credentials to help — reproducible bugs, docs, RTL shims, and example projects all move the needle. Here is a practical on-ramp.

Repository and community

Dev environment (5 minutes)

git clone https://bitbucket.org/alphatecnologia/crabpascal.git
cd crabpascal
cargo build --release
Enter fullscreen mode Exit fullscreen mode

Smoke test:

cargo test
./target/release/crab-pascal run examples/hello.dpr
Enter fullscreen mode Exit fullscreen mode

Windows users can download prebuilt crab-pascal.exe from project downloads or use the VS Code extension (crabpascal.crabpascal) with optional auto-install.

Ways to contribute

1. Minimal bug reports

The best issue includes:

  • Smallest .pas that fails
  • Command run (check vs run)
  • Expected vs actual behavior

Parser bugs become tests/parser_hardening.rs cases. Runtime bugs become fixtures under tests/fixtures/.

2. RTL and shim declarations

Pick an missing Delphi API from the 360° review:

  1. Add signature to rtl/sys/*.pas
  2. Wire intrinsic in src/complete_runtime.rs
  3. Test with a tiny program

Match Delphi overloads — StrToInt, Format, stream methods.

3. Examples and docs

examples/crud/ started as a killer demo. Your domain (logging, CLI tools, games) helps others see CrabPascal fit. Mintlify docs live under mintlify/; blog posts under blog/posts/.

4. Sprint-aligned features

Open roadmap/sprints-overview.md. Find the active sprint. Reference sprint number in PR description so reviewers know acceptance criteria.

Pull request checklist

cargo fmt --check
cargo clippy -- -D warnings   # if you touched Rust
cargo test
crab-pascal check path/to/your_fixture.pas
Enter fullscreen mode Exit fullscreen mode

For Horse examples on Windows:

.\tests\test_exemplos_completo.ps1
Enter fullscreen mode Exit fullscreen mode

Keep PRs focused — one sprint concern beats a kitchen-sink refactor.

Code map for newcomers

Path Role
src/lexer/ Tokens
src/parser/ AST
src/semantic/ Type checking
src/complete_runtime.rs Execution
src/codegen/ C backend
src/preprocessor/ {$IFDEF}
src/unit_resolver.rs Unit paths
rtl/sys/ Delphi shims

Read one module deeply rather than skimming all — the architecture repeats patterns.

Code of conduct (informal)

Be honest about parity gaps. Prefer failing loudly over fake support (see Sprint 13 exceptions policy). Credit Delphi/FPC precedents when porting behavior.

Not sure where to start?

Comment on Dev.to or open a Bitbucket issue: "I know Pascal, new to Rust — where can I help?" Maintainers will point to a good first sprint bullet.

CrabPascal grows when Delphi developers bring real code. Bring yours.


Português {#portugus}

Contribuindo com o CrabPascal: participe

CrabPascal é MIT, hospedado no Bitbucket e construído abertamente sprint a sprint. Você não precisa de doutorado em compiladores para ajudar — bugs reproduzíveis, docs, shims RTL e exemplos movem a agulha. Este é um on-ramp prático.

Repositório e comunidade

Ambiente de dev (5 minutos)

git clone https://bitbucket.org/alphatecnologia/crabpascal.git
cd crabpascal
cargo build --release
Enter fullscreen mode Exit fullscreen mode

Smoke test:

cargo test
./target/release/crab-pascal run examples/hello.dpr
Enter fullscreen mode Exit fullscreen mode

No Windows, baixe crab-pascal.exe nos downloads do projeto ou use a extensão VS Code (crabpascal.crabpascal) com auto-instalação opcional.

Formas de contribuir

1. Bug reports mínimos

A melhor issue inclui:

  • Menor .pas que falha
  • Comando usado (check vs run)
  • Comportamento esperado vs real

Bugs de parser viram casos em tests/parser_hardening.rs. Bugs de runtime viram fixtures em tests/fixtures/.

2. RTL e declarações shim

Escolha API Delphi faltante do review 360°:

  1. Adicione assinatura em rtl/sys/*.pas
  2. Ligue intrinsic em src/complete_runtime.rs
  3. Teste com programinha

Espelhe overloads Delphi — StrToInt, Format, métodos de stream.

3. Exemplos e documentação

examples/crud/ começou como demo killer. Seu domínio (logging, CLI, jogos) ajuda outros a ver fit do CrabPascal. Docs Mintlify em mintlify/; posts em blog/posts/.

4. Features alinhadas a sprint

Abra roadmap/sprints-overview.md. Ache sprint ativo. Referencie número do sprint na descrição do PR para reviewers checarem aceitação.

Checklist de pull request

cargo fmt --check
cargo clippy -- -D warnings   # se mexeu em Rust
cargo test
crab-pascal check path/to/seu_fixture.pas
Enter fullscreen mode Exit fullscreen mode

Para exemplos Horse no Windows:

.\tests\test_exemplos_completo.ps1
Enter fullscreen mode Exit fullscreen mode

PRs focados — uma preocupação de sprint bate refactor cozinha.

Mapa do código para iniciantes

Path Papel
src/lexer/ Tokens
src/parser/ AST
src/semantic/ Checagem de tipos
src/complete_runtime.rs Execução
src/codegen/ Backend C
src/preprocessor/ {$IFDEF}
src/unit_resolver.rs Paths de units
rtl/sys/ Shims Delphi

Leia um módulo a fundo em vez de skim geral — a arquitetura repete padrões.

Código de conduta (informal)

Seja honesto sobre gaps de paridade. Prefira falhar alto a suporte falso (veja política de exceptions Sprint 13). Credite precedentes Delphi/FPC ao portar comportamento.

Não sabe por onde começar?

Comente no Dev.to ou abra issue no Bitbucket: "Sei Pascal, novo em Rust — onde posso ajudar?" Maintainers apontam bullet good first sprint.

CrabPascal cresce quando desenvolvedores Delphi trazem código real. Traga o seu.


Published on dev.to/@crabpascal · Código em CrabPascal

Top comments (0)