Code Monkey home page Code Monkey logo

julia-ffi's Introduction

Julia ffi and C parser for generating it, and some various utilities.

This project contains:

  • In development is a tool to autoFFI C libraries. The current FFIs are made with a Common Lisp parser, but when ready, the Julia parser will be used instead.
  • FFI-ed C libraries, with extras to utilize Julia's features.

This project also contains a utility lib. Some of which may be better off from a standard lib/more standard way to do it.

Outputs of autoffi-er provided

Everything specifically autogenerated is under autoffi/, not everything works (or is complete there) there.(GL works pretty well)

Currently all the stuff in autoffi/ is completely analogous to the C interface. Some extra stuff is added outside of that directory.

'Install'

To use, first compile some stuff within with make(though not all of them need it)

Then edit ~/.juliarc.jl and add (NOTE: it used to be /src/julia-src/)

push(LOAD_PATH, "$(path_julia_ffi)/")

Then things can be loaded with paths originating from that.(hopefully)

Currently you have to run it as julia -L ~/.juliarc.jl TODO is use the modules, and figure how to load things correctly..

Stuff reasonably usable:

Opengl

Everything analogous to C works. I have yet to find any problem with autoffi/gl.j. ffi_extra/gl_util.j adds some useful functions, and overloaded version of the C functions (Note: glcolor does not use glcolorb for integers; it would be confusing)

It also adds stuff to make @with work;(it needs the no_longer_with method) so @with primitive() begin ... end and @with pushed_matrix() ... works.

SDL

bad_sdl_utils needs make to be run from it's directory. Also the readme in that directory lists the functions in there.

Note that this currently does not at all use the autoffi stuff, but you can catch most events.

The rest.

autoffi/glu.j not at all tested yet, autoffi/acpi.j lacks a function to create the structs and look at its items. I want to add autogenerators for those. Note that then those parts aren't analogous to the C interface, and also maybe Julia will/has already increased support for FFIing those..

TODO

  • Get the parser to autoFFI.
  • Will want a standard way to deal with:
  • analogous to C.
  • automatically created extra stuff.
  • manually created extra.

Licenses

Are mentioned in the files. Some of it public domain, some is GPL, stuff under parse/ is under the MIT license.

Author

Jasper den Ouden

julia-ffi's People

Contributors

o-jasper avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.