C Usage
Usage Instructions for C
See the release bundle for some examples of C programs which can be compiled and run on Valida. Here is an example C program from this repo, called cat.c
:
To compile the cat.c
example to Valida from within the Valida shell or the Valida Docker image shell:
Once running, the cat
example will wait for input. After you are done providing input, press ctrl+D
. The program should echo back what you wrote, writing its output to log
.
Compiling and running the other examples follows the same procedure, substituting $NAME
for the name of the example:
C standard libraries
See Using LLVM libc for instructions on how to use the partial libc support included with the Valida toolchain. This allows for the use of some libc header files and standard library functions and macros.
Last updated