Permalink
Switch branches/tags
Nothing to show
Commits on Sep 10, 2018
Commits on Sep 9, 2018
Commits on Jun 20, 2018
  1. Detect default include directories

    ysbaddaden committed Jun 20, 2018
    Add helpers to detect the default C or C++ include directories. The
    compiler to use can be selected with the `CC` and `CXX` environment
    variables. Otherwise they default to `cc` and `c++`.
    
    Supports both GCC and clang.
  2. Fix: libclang 5.0 bindings

    ysbaddaden committed Jun 20, 2018
  3. POSIX Makefile

    ysbaddaden committed Jun 20, 2018
Commits on Apr 14, 2018
  1. Fix: typos

    ysbaddaden committed Apr 14, 2018
Commits on Sep 25, 2017
  1. Fix: c2cr command usage

    ysbaddaden committed Sep 25, 2017
  2. Add c_include macro

    ysbaddaden committed Sep 25, 2017
    The macro will generate bindings on-the-fly for C headers. For
    example:
    
        # foo.cr
        require "clang/macros"
        c_include "clang-c/CXErrorCode.h", remove_enum_prefix: true
        c_include "clang-c/CXString.h", remove_enum_prefix: true
        c_include "clang-c/Index.h", remove_enum_prefix: true
    
    Since libclang headers are usually not located in standard include
    directories, one must specify the CFLAGS environment variable prior
    to compilation:
    
        CFLAGS=`llvm-config-5.0 --cflags` crystal foo.cr
  3. Release: v0.2.0

    ysbaddaden committed Sep 25, 2017
  4. Add c2cr to shards targets

    ysbaddaden committed Sep 25, 2017
  5. c2cr: fix proc definitions

    ysbaddaden committed Sep 25, 2017
  6. C2CR: cleanup generated enum constants

    ysbaddaden committed Sep 24, 2017
    Unlike C that uses enum constants directly, Crystal always refers to
    them through the enum namespace, so directly generating such
    constants directly leads to many repetitions.
    
    Since enum constants can be named in whatever way, the cleanup
    strategy must be configurable. This patch proposes some new option,
    namely `--remove-enum-prefix` and `--remove-suffix-prefix` which may
    take a reference value, and will enable removing repeated prefixes
    and suffixes.
    
    For example:
    
        $ e2cr -I/usr/lib/llvm-5.0/include clang-c/Index.h --remove-enum-prefix
        $ e2cr -I/usr/lib/llvm-5.0/include llvm-c/Core.h --remove-enum-prefix=LLVM --remove-enum-suffix
        $ e2cr gtk-2.0/gtk/gtkenums.h --remove-enum-prefix
Commits on Sep 23, 2017
Commits on Sep 22, 2017
  1. Sample: c2cr to autogenerate C bindings

    ysbaddaden committed Sep 22, 2017
    Takes some include declarations matching C declarations
    (-I/path/to/include) and a single C header (.h) file to generate
    bindings for. For example:
    
        c2cr -I/usr/lib/llvm-5.0/include llvm-c/Core.h
  2. Sample: debug C or C++ AST

    ysbaddaden committed Sep 22, 2017
  3. Initial import: libclang bindings with wrapper classes

    ysbaddaden committed Sep 22, 2017
    clang-c bindings have been manually generated and only tested
    against clang-3.9.