Git Product home page Git Product logo

ffi-uctags's Introduction

Preferred Languages (in this particular order)

  1. 💎 Ruby
  2. 🔤 English (inconsistent spelling and New Yorker umlauts 😁)
  3. 🀄 Mandarin Chinese (language attrition… I went from native to just a beginner 😓)
  4. 🔣 C (In this world, you have two options: Evolve to Crab, or Return to Assemble 🐵)
  5. ☕ Java (it’s got both a compiler and a VM interpreter… 🤨)
[expand/collapse the rest of the About Me]

Languages by File Size Totals

Other stuff I play occasionally (ordered by est. frequency)

  1. 🎼 MuseScore
  2. ♾️ Mathematics & (basic) Calculus
  3. 💡 Arduino UNO Starter Kit
  4. 📚 Microsoft Office

Some stuff I used to play (no particular order)

  • ⛵ Jakarta EE (formerly Java EE)
  • 🖥️ HTML-CSS-JS
  • 💽 Oracle Database & PL/SQL
  • 📐 SketchUp

ffi-uctags's People

Contributors

dependabot[bot] avatar paradoxv5 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

ffi-uctags's Issues

Check `--fields-C={properties}` for `static` and `extern` attributes

Follow up to #6.
Currently, FFI-UCtags reads variables and functions naïvely without considering the storage classifiers.

c6811ec has hot-reverted variable loading.
Only those marked with extern or (const but not static) are available via FFI.
Note that u-ctags read const as part of the type (typeref), so it might appreciate some help from #19.

Functions, while extern by default, should also exclude static ones.

Submodule the u-ctags repo and build it on `gem install`

Submodule at /u-ctags/src, build (prefix) at /u-ctags.

Research on concerns:

  • U-ctags is GPL-2.0, though bundling the source code verbatim and not overlapping our content with theirs complies with the copyleft.
    • This licensing is one of the reasons of why I decided against just bundling a prebuilt executable.
    • Should also double remind desktop devs about the two-part licensing – once in the “Dependency” paragraph at the top, once in the “License” section at the bottom.
  • While not a Ruby extension, the .gemspec can make & make install any Makefile after executing extconf.rb.
  • U-ctags dependencies are listed at autotools.rst#gnulinux-distributions. gcc, make, pkg-config, autoconf and automake needs to be checked; the rest are for disableable features. ./autogen.sh and ./configure check them
  • U-ctags is a lot of files, so building it will “take a while”. The README.md should include and cite how to enable parallel make: https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install#the-make-environment-variable

./configure options:

--prefix=/EXPANDED/PATH/TO/./u-ctags
--disable-readcmd
--disable-xml
--disable-json
--disable-seccomp
--disable-yaml
--disable-pcre2
--without-included-regex

Recognize `const` types

The const keyword is included in the typeref of a construct. The current implementation does not recognize the prefix and falls back to pointers.

Create a log method

  • Replace puts … if $VERBOSE with a module_function
  • Optional: define this method in a separate logging module which UCtags includes

Automatic header searching

  1. Similar to the library name arg handled by FFI, if the header arg is a relative path but the file isn’t in working directory, also check the system header directories (e.g., /usr/include, /usr/local/include and /opt/local/include)
  2. If the header is not given, identify the header name from the library name and use the previous checkbox point feature to locate it.

Prefix handing options

Options to

  • not import constructs with a _ prefix (would also exclude __anon constructs)
  • remove a prefix (e.g., glfwInitInit)

Support Enums

  • u-ctags kinds e and g
    • Import to Constants – reüse mechanism for structs/unions
  • documentation (search for /\((and|or) enums? in future versions\)/)

Allow the imported functions to release the Ruby GVL

attach_function :long_running_function, [], :int, blocking: true

This allows other Ruby threads (if there are any) to proceed while the current one is crunching numbers in C.

Do not set this flag for FFI::CURRENT_PROCESS libraries or headers with #include <ruby.h> (requires #5).

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.