Bibliotecas de Delégua - #19
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Este PR atualiza dependências do ecossistema Delégua/LLVM e adiciona um conjunto grande de bibliotecas nativas em C (texto, vetor, matemática, física, estatística, CSV/JSON, HTTP, dados, criptografia, arquivos), junto com uma bateria de testes Jest para validar a geração de IR e o mecanismo de importação/dspacho dessas bibliotecas.
Changes:
- Atualiza
@designliquido/deleguae@designliquido/llvm-bindingse ajusta o empacotamento para distribuir as bibliotecas nativas emdist/bibliotecas. - Adiciona/expande bibliotecas nativas em C (incluindo dependência vendorizada
cJSON) e novas APIs (ex.:aleatorio,aleatorioEntre,delegua_formatar). - Adiciona muitos testes de compilação (IR assertions) cobrindo métodos de texto/vetor, interpolação, importação e bibliotecas A–G/F.
Reviewed changes
Copilot reviewed 50 out of 52 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Atualiza locks para as novas versões de dependências. |
| package.json | Bump de dependências e ajuste do script de empacotamento para copiar fontes/bibliotecas/** para dist. |
| fontes/ilc.ts | Ajusta caminho de bibliotecas nativas para dist/bibliotecas no CLI. |
| fontes/bibliotecas/vetor.h | Declara API nativa de operações de vetor (add/remove/sort/slice/join/filter/map). |
| fontes/bibliotecas/vetor.c | Implementa operações de vetor e callbacks para filtrar/mapear. |
| fontes/bibliotecas/texto.h | Declara API nativa de operações de texto (maiúsculo/minúsculo/etc.). |
| fontes/bibliotecas/texto.c | Implementa operações de texto. |
| fontes/bibliotecas/padrao.h | Expande API padrão com aleatoriedade, conversões e delegua_formatar. |
| fontes/bibliotecas/padrao.c | Implementa aleatoriedade, conversões texto e delegua_formatar. |
| fontes/bibliotecas/matematica.h | Declara API de matemática (álgebra/trig/financeira/geometria). |
| fontes/bibliotecas/matematica.c | Implementa matemática via libm. |
| fontes/bibliotecas/fisica.h | Declara API de física (cinemática). |
| fontes/bibliotecas/fisica.c | Implementa física (cinemática). |
| fontes/bibliotecas/estatistica.h | Declara API estatística para Vetor numérico. |
| fontes/bibliotecas/estatistica.c | Implementa max/min/média/mediana/variância/covariância. |
| fontes/bibliotecas/csv.h | Declara API CSV (parse/serialize/leitura/escrita/acessores). |
| fontes/bibliotecas/csv.c | Implementa parser/serializador CSV e IO em arquivo. |
| fontes/bibliotecas/json.h | Declara API JSON baseada em cJSON. |
| fontes/bibliotecas/json.c | Wrapper JSON e inclui implementação do cJSON diretamente. |
| fontes/bibliotecas/http.h | Declara API HTTP via libcurl (cliente, métodos, acessores, liberar). |
| fontes/bibliotecas/http.c | Implementa cliente HTTP com libcurl, buffer dinâmico e cabeçalhos. |
| fontes/bibliotecas/dados.h | Declara API “delegua-dados” (RecorteDados/Serie) baseada em CSV. |
| fontes/bibliotecas/dados.c | Implementa leitura CSV → dataframe-like e operações (slice/info/toString/removerNulo/selecionarColuna/agregações). |
| fontes/bibliotecas/arquivos.h | Declara API de arquivos (abrir/diretório/estat/IO por instância). |
| fontes/bibliotecas/arquivos.c | Implementa API de arquivos e wrappers multiplataforma para stat/getcwd. |
| fontes/bibliotecas/criptografia.h | Declara APIs criptográficas F.1a/F.1b/F.1c (clássicos + OpenSSL). |
| fontes/bibliotecas/criptografia.c | Implementa cifras educacionais (XOR/ROT/Base64/“menino do acre”). |
| fontes/bibliotecas/criptografia-hashes.c | Implementa hashes/HMAC/RAND/UUID/PBKDF2 com OpenSSL. |
| fontes/bibliotecas/criptografia-aes-rsa.c | Implementa AES-256-GCM e RSA (keygen/cripto/assinatura) com OpenSSL. |
| fontes/bibliotecas/terceiros/cjson/cJSON.h | Cabeçalho vendorizado do cJSON (MIT). |
| fontes/bibliotecas/terceiros/cjson/cJSON.c | Implementação vendorizada do cJSON (arquivo único). |
| fontes/bibliotecas/terceiros/README.md | Documenta política de bibliotecas vendorizadas e cJSON. |
| testes/compilador-llvm.texto.test.ts | Testa geração de IR para métodos de texto e erro em método desconhecido. |
| testes/compilador-llvm.metodos-vetor.test.ts | Testa geração de IR para métodos de vetor (fase 4) e erro para método inexistente. |
| testes/compilador-llvm.metodos-vetor-com-funcoes.test.ts | Testa filtros/mapas com lambdas e referências de função (fase 5). |
| testes/compilador-llvm.interpolacao.test.ts | Testa interpolação de texto e fallback sem interpolação. |
| testes/compilador-llvm.importacao.test.ts | Testa formas de importação e inicialização do mapa de módulos. |
| testes/compilador-llvm.heranca.test.ts | Testa herança/sobrescrita/super e cadeia de herança (fase 6). |
| testes/compilador-llvm.funcoes-nativas.test.ts | Testa chamadas IR para funções nativas (aleatório, texto()). |
| testes/bibliotecas/matematica.test.ts | Testa importação e chamadas do módulo matematica. |
| testes/bibliotecas/fisica.test.ts | Testa importação e chamadas do módulo fisica. |
| testes/bibliotecas/estatistica.test.ts | Testa importação e chamadas do módulo estatistica. |
| testes/bibliotecas/arquivos.test.ts | Testa importação e chamadas do módulo arquivos. |
| testes/bibliotecas/csv.test.ts | Testa importação e chamadas do módulo csv. |
| testes/bibliotecas/json.test.ts | Testa importação e chamadas do módulo json. |
| testes/bibliotecas/http.test.ts | Testa importação e chamadas do módulo http. |
| testes/bibliotecas/dados.test.ts | Testa importação e operações do módulo dados (G.1). |
| testes/bibliotecas/criptografia/algoritmos-educacionais.test.ts | Testa APIs F.1a (cifras educacionais). |
| testes/bibliotecas/criptografia/hashes.test.ts | Testa APIs F.1b (hash/HMAC/RAND/UUID/PBKDF2). |
| testes/bibliotecas/criptografia/aes-rsa.test.ts | Testa APIs F.1c (AES-256-GCM e RSA). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.