Skip to content

malisipi/vzcc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zig CC for V

A cross-compiler for V

For Linux

  1. Install V and Zig

  2. Install this application

    v install malisipi.vzcc

    or

    git clone https://github.com/malisipi/vzcc
    mkdir ~/.vmodules/malisipi/
    mv vzcc ~/.vmodules/malisipi/vzcc
  3. Compile this application

    v ~/.vmodules/malisipi/vzcc
  4. Allow to run & Symlink zig_cc file

    sudo chmod +x ~/.vmodules/malisipi/vzcc/src/zig_cc
    sudo ln -sr ~/.vmodules/malisipi/vzcc/src/zig_cc /bin/zig_cc
  5. Symlink this application (Optional)

    sudo ln -sr ~/.vmodules/malisipi/vzcc/vzcc /bin/vzcc
  6. You're ready to go

How To Use?

vzcc [input_file] [output_file]
===>      a.v        a.out
vzcc [input_file] [target_os] [output_file]
===>      a.v       windows      a.exe
vzcc [input_file] [target_arch] [target_os] [output_file]
===>      a.v        x86_64       windows      a.exe
vzcc [input_file] [target_arch] [target_os] [output_file] [target_flags]
===>      a.v        x86_64       windows      a.exe          -gnu

[target_arch]: If undefined, your os arch will be used as target
[target_os]: If undefined, your os will be used as target
[target_flags]: "" is default