cey is the C* compiler. It transpiles .cy source files to C, then compiles them using gcc or clang.
#ekle <stdgç.b>
#ekle <stdküt.b>
tam ana(boşluk) {
tam* dizi = (tam*) bellekal(5 * boyut(tam));
için (tam i = 0; i < 5; i++) {
dizi[i] = i * 2;
}
yazdırf("Merhaba C*\n");
bırak(dizi);
döndür 0;
}cey <input-files> [compiler-args] [cey-options]cey -Wall -Werror ./example.cy -o ./build/example -- --cc=clangOnly files ending with .cy are compiled by cey. All other files and arguments are passed directly to the C compiler.
Use -- to separate C compiler arguments from cey options, if any.
--pack: Minify the generated C file (removes whitespace, breaks error messages).--cc=gccor--cc=clang: Choose the backend compiler. Default isgcc.--int: Preserve the intermediate files.
Intermediate files are written to /tmp/cey_tmp_*/ and automatically deleted after compilation.
yec is a separate binary used to reverse-transpile C code to C*.
It only performs transpilation, not compilation.
yec <source_file> <destination_file>To fully rebuild the compiler from its own source using the current toolchain, run:
make bootstrapThis will:
- Use
amalgamatorto generate an amalgamated C source file fromsrc/cey.cand save it asbuild/amalgamation.c. - Reverse-transpile the amalgamated C source into C* (
examples/cey.cy) usingyec. - Compile
cey.cywith the currentceycompiler to produce a newceybinary, replacing the existing one inbuild/cey.