All Projects → ioquatix → ffi-clang

ioquatix / ffi-clang

Licence: other
Ruby FFI bindings for libclang 3.4+.

Programming Languages

ruby
36898 projects - #4 most used programming language
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to ffi-clang

rdp
A library providing FFI access to fast Ramer–Douglas–Peucker and Visvalingam-Whyatt line simplification algorithms
Stars: ✭ 20 (-51.22%)
Mutual labels:  ffi
react-native-fast-openpgp
OpenPGP for react native made with golang for fast performance
Stars: ✭ 29 (-29.27%)
Mutual labels:  ffi
Compiler-Principle
词法分析,LL(1) 文法分析,LR(1) 文法分析
Stars: ✭ 18 (-56.1%)
Mutual labels:  ffi
JitFFI
A fast and customizable JIT compiler for FFI (Foreign-Function Interface).
Stars: ✭ 45 (+9.76%)
Mutual labels:  ffi
php-ffi-rust
PHP7.4 + Rust
Stars: ✭ 28 (-31.71%)
Mutual labels:  ffi
php-fuse
PHP FFI bindings for libfuse
Stars: ✭ 53 (+29.27%)
Mutual labels:  ffi
cxxd
C/C++ language server implemented on top of Clang frontend.
Stars: ✭ 145 (+253.66%)
Mutual labels:  libclang
rust-flutter-reactive
This is a sample app to improve consistency over Mobile App Development.
Stars: ✭ 25 (-39.02%)
Mutual labels:  ffi
rust-xgboost
Rust bindings for XGBoost.
Stars: ✭ 77 (+87.8%)
Mutual labels:  ffi
deno bindgen
Simplified glue code generation for Deno FFI libraries written in Rust.
Stars: ✭ 142 (+246.34%)
Mutual labels:  ffi
rust lisp
A Rust-embeddable Lisp, with support for interop with native Rust functions
Stars: ✭ 128 (+212.2%)
Mutual labels:  ffi
rid-examples
Examples showing how to use Rid in order to build Dart/Flutter apps integrated with Rust.
Stars: ✭ 191 (+365.85%)
Mutual labels:  ffi
asmdot
[Unstable] Fast, zero-copy and lightweight (Arm | Mips | x86) assembler in (C | C++ | C# | Go | Haskell | Javascript | Nim | OCaml | Python | Rust).
Stars: ✭ 23 (-43.9%)
Mutual labels:  ffi
r6rs-pffi
Portable Foreign Function Interface (FFI) for R6RS
Stars: ✭ 40 (-2.44%)
Mutual labels:  ffi
haskell-libui
Haskell bindings to the libui C library.
Stars: ✭ 45 (+9.76%)
Mutual labels:  ffi
crfsuite-rs
Rust binding to crfsuite
Stars: ✭ 19 (-53.66%)
Mutual labels:  ffi
pywrap
C++ binding generator based on libclang and pybind11
Stars: ✭ 17 (-58.54%)
Mutual labels:  libclang
bootstrap
Bootstrap Go bindings for Clang's C API
Stars: ✭ 18 (-56.1%)
Mutual labels:  libclang
lua-resty-openssl
FFI-based OpenSSL binding for OpenResty
Stars: ✭ 76 (+85.37%)
Mutual labels:  ffi
denoffi
Deno Foreign Function Interface.
Stars: ✭ 37 (-9.76%)
Mutual labels:  ffi

FFI::Clang

A light-weight wrapper for Ruby exposing libclang. Works for libclang v3.4+.

Build Status Code Climate

Installation

Add this line to your application's Gemfile:

gem 'ffi-clang'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ffi-clang

Usage

Traverse the AST in the given file:

index = Index.new
translation_unit = index.parse_translation_unit("list.c")
cursor = translation_unit.cursor
cursor.visit_children do |cursor, parent|
	puts "#{cursor.kind} #{cursor.spelling.inspect}"
	
	next :recurse 
end

Library Version

Due to issues figuring out which library to use, we require you to manually specify it. For example, to run the tests, with MacPorts llvm/clang 3.4, use the following:

LLVM_CONFIG=llvm-config-mp-3.4 rake

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Copyright, 2010-2012, by Jari Bakken.
Copyright, 2013, by Samuel G. D. Williams. http://www.codeotaku.com
Copyright, 2013, by Garry C. Marshall. http://www.meaningfulname.net
Copyright, 2014, by Masahiro Sano.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].