Skip to content

TallenPeli/ZINC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZINC

GitHub

Zero-cost INtegrated C++

ZINC is a programming language written in C++ that aims to provide the same (if not more) functionality, but is easier to learn and has a faster development cycle.

ZINC is for Linux/UNIX systems. (Windows port is planned, although it works well in WSL)

C++ libraries are compatable with ZINC.


Install

Compile from source

Fedora/RHEL

Insall dependnecies

sudo dnf install make g++ gcc

clone repository

git clone https://github.com/Talleeenos69/ZINC/

cd into ZINC

cd ./ZINC

Build

make

Ubuntu/Debian

Install dependnecies

sudo apt-get install make g++ gcc

clone repository

git clone https://github.com/Talleeenos69/ZINC/

cd into ZINC

cd ./ZINC

Build

make

Arch/Manjaro

Insall dependnecies

sudo pacman -S make gcc

clone repository

git clone https://github.com/Talleeenos69/ZINC/

cd into ZINC

cd ./ZINC

Build

make

Windows

Install the WSL and follow the instructions for your distribution.

Usage

Documentation

(The default ZINC file format is .zc but is not required.)

[zinc executable] {zinc script} [flags]

Flags

-k or --keep-translation (Keeps the generated C++ file even after compilation)
-v or --verbose (Verbose output - tells you exactly what's going on)
-O0, -O1, -O2, -O3, -Os, -Ofast (Control the level of optimization during compilation)
-asm or --assembly (Generate assembly code instead of an executable)

Example Usage

./zinc /home/$USER/Documents/ZINC/main.zc -k -v -O2

Example Code

using zincstd;

main(){
    let zinc_version = 0.0.2;
    string name = input("Enter name : ");
    loop(2, i){
        print("HI ");
        println(name);
    }
    rest(1s);
    print("Zinc Version : ");
    println(zinc_version);
    return 0;
}

VSCode Language Support

To properly use ZINC in the VSCode IDE, ensure you have installed the language support extension from this GitHub repository :

https://github.com/Talleeenos69/ZINC-VSCode-Language_Support

(Refer to this guide for manual installation of VSCode extensions)

About

Zero-cost INtegrated C++

Resources

License

Stars

Watchers

Forks

Packages

No packages published