Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 1.55 KB

README.md

File metadata and controls

50 lines (31 loc) · 1.55 KB

Sugar C

standard-readme compliant

A different flavour of Tiny C, it's sugar!

This fork of tcc intends to adds some syntactic sweetness to C-like scripts. Also reviewing the basic interface that is offered to the user from the command line, defaulting the compiler to run code on the fly, instead of building a binary.

Table of Contents

Install

You need to make-install Sugar C to get it properly working on your system. Hopefully this will be straight forward, so keep fingers crossed.

For linux and osx should be as simple as pasting this line into your terminal:

$ git clone https://github.com/antonioprates/sugar.git && cd sugar && ./install.sh

If you get permission issues, you can try to sudo the install script also:

$ sudo ./install.sh

If you don't need the source code, you can remove the folder afterwards:

$ cd .. && rm -rf sugar

For windows you can clone the repo and give it a try to the win32/build-sugar.bat (ugh!), never tried. Maybe send me a message, I will be happy to know it still works, or if needs any fixes.

Usage

The implicit '-run' directive together with the <sugar.h> library, makes c-scripting easier. You can try and inspect the samples like:

$ sugar hello.c

Or if given the right permission to the file, and assuming /usr/local/bin/sugar to be sugar install path on your system:

$ ./hello.c