Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
C Other
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
demo
examples
include
lib
tests
win32
.gitignore
COPYING
Changelog
Makefile
README
README.tcc
TODO
VERSION
arm-gen.c
c67-gen.c
coff.h
configure
elf.h
gen_tccsyms.rb
i386-asm.c
i386-asm.h
i386-gen.c
i386-tok.h
il-gen.c
il-opcodes.h
libtcc.c
libtcc.h
nacl-configure
stab.def
stab.h
tcc-doc.texi
tcc.c
tcc.h
tccasm.c
tcccoff.c
tccelf.c
tccgen.c
tccpe.c
tccpp.c
tccrun.c
tccsyms.c
tcctok.h
texi2pod.pl
x86_64-asm.h
x86_64-gen.c

README

See README.tcc for the original document

This is an experimental port of tinycc (http://tinycc.org)

You can run C source code on NaCl, which means, you can run C programs
on your browser without interaction with servers.

The development is not completed at all. You may see weird errors even
for simple programs. Especially, x86-64 support should be terrible.
Also, this cannot generate NaCl ELF yet. It can only preprocess source
code or run the source code directly.

* Demo

http://shinh.skr.jp/nacltcc/tinycc.html

* How to build

- prerequisites

You need at least the followings:

NaCl SDK (my version is pepper_19)
ruby
make, etc.

For web interface, you also need:

naclports (my revision is 575, must be > r573)
Chrome (tested on 15.0.874.5 dev on 64bit linux, 14.0.835.186 on 32bit mac)

You need to set NACL_SDK_ROOT environment variable before the next step:

% export NACL_SDK_ROOT=$HOME/src/nacl_sdk/pepper_19

- build the CLI version

% ./nacl-configure
% make

This will build 32bit binary by default. Please specify
NACL_PACKAGES_BITSIZE if you want 64bit binary:

% NACL_PACKAGES_BITSIZE=64 ./nacl-configure
% make

- run the CLI version

% sel_ldr_x86_32 -B $NACL_SDK_ROOT/tools/irt_x86_32.nexe ./tcc -B. -run hello.c

For now, file output isn't working due to lack of unlink(2)

If you are using 64bit version, please use sel_ldr_x86_64 instead.
Of course, you may want to replace * to your actual toolchain directory.

- build the web version

Again, please note that you need naclports and NACL_SDK_ROOT
environment variable.

% cd demo
% make
% ./pack_data.sh

Then, put data.tar, tinycc.html, tinycc.nmf, and *.nexe in your web server.
Note that NaCl won't run on file:/// URLs.

* Known issues

- 32bit version is crashing on my 64bit linux. I don't know why.

* License

TCC's (i.e., GPLv2)
Something went wrong with that request. Please try again.