# ficus **Repository Path**: niuniu4/ficus ## Basic Information - **Project Name**: ficus - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-23 - **Last Updated**: 2021-06-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Ficus **WIP** This is a new functional language with the first-class array support that also supports imperative and object-oriented programming paradigms. `ficus` compiler generates a portable C/C++ code out of .fx files. ## License The code is distributed under Apache 2 license, see the [LICENSE](LICENSE) ## How to build The compiler is written in Ficus itself and needs C/C++ compiler and make utility. ### **Unix (Linux, macOS, BSD, ...)** ``` cd make -j8 bin/ficus -run test/test_all.fx # run unit tests bin/ficus -run -O3 examples/fst.fx # run some examples, e.g. fst.fx, # optionally specify optimization level ``` ### **Windows** Install Visual Studio, for example Visual Studio 2019 Community Edition, open "Developer PowerShell for VS2019" from the Windows menu and type: ``` cd nmake bin/ficus -run -O3 examples/fst.fx # the usage is the same as on Unix ``` ### **Set environment variables** You can add `/bin` to the `PATH`. You can also customize ficus compiler behaviour by setting the following environment variables: * `FICUS_PATH` can point to the standard library (`/lib`), though ficus attempts to find the standard library even without `FICUS_PATH`. It can also contain other directories separated by `:` on Unix and `;` on Windows. The directories with imported modules can also be provided via one or more command-line options `-I `. Note that if a compiled module imports other modules from the directory where it resides, that directory does not need to be explicitly specified. * `FICUS_CFLAGS` is used by C/C++ compiler to build the produced .c/.cpp files. Alternative way to pass extra flags to C/C++ compiler is via `-cflags ""` command-line option, e.g. `-cflags "-ffast-math -mavx2"`. * `FICUS_LINK_LIBRARIES` contains the linker flags and the extra linked libraries. Alternative way to pass the extra linker flags to C/C++ compiler is via `-clibs ""` command-line option. ## How to use (run `ficus --help` to get more detailed up-to-date information about command line parameters) Here is a brief description with some most common options: ``` ficus [-app|-run|...] [-O0|-O1|-O3] [-verbose] [-I ]* [-o ] [--