The official Sun lang repository
Go to file
Talles Amadeu 4bb15c84dd add support to read json files 2025-12-09 15:36:06 -03:00
.vscode fix linting errors 2025-12-09 13:43:44 -03:00
build add support to read json files 2025-12-09 15:36:06 -03:00
src add support to read json files 2025-12-09 15:36:06 -03:00
tests add support to read json files 2025-12-09 15:36:06 -03:00
Makefile first version of Sun 2025-12-09 13:23:45 -03:00
README.md first version of Sun 2025-12-09 13:23:45 -03:00
install.sh first version of Sun 2025-12-09 13:23:45 -03:00
sun add support to read json files 2025-12-09 15:36:06 -03:00

README.md

Sun Language Compiler

Instalação Rápida (Recomendado)

O projeto inclui um script de instalação que:

  1. Verifica e instala dependências (no Ubuntu/Debian).
  2. Compila o projeto.
  3. Instala o binário sun em /usr/local/bin.

Basta rodar:

./install.sh

Instalação Manual

Pré-requisitos

macOS

  • Homebrew instalado
  • LLVM instalado via Homebrew:
    brew install llvm@21
    

Ubuntu / Linux (Debian-based)

O script install.sh tenta instalar estes pacotes automaticamente.

  • Build essentials e LLVM/Clang:
    sudo apt update
    sudo apt install build-essential llvm clang
    
    Nota: O projeto requer suporte a C++17. Versões recentes do LLVM (15+) são recomendadas.

Compilando

  1. Abra o terminal na pasta do projeto.
  2. Rode o comando:
    make
    
    Se o llvm-config não estiver no PATH ou tiver um nome diferente (ex: llvm-config-15), você pode especificá-lo:
    make LLVM_CONFIG=llvm-config-15
    
  3. Isso irá gerar o executável sun.

Usando o Compilador

Para compilar e rodar um arquivo .sun:

./sun arquivo.sun

Para apenas compilar e gerar um executável:

./sun arquivo.sun -o nome_do_programa
./nome_do_programa