Giter Club home page Giter Club logo

rcrl's Issues

cling C++ as scripting language / hot code reload

cling based C++ as scripting language / hot code reload
Why? Able to run C++ script in runtime or compile it for max speed ( as in example https://github.com/derofim/cling-cmake )
Also: May be used to improve modules compile time

HOT code reload
possible approaches:

store app state
fix cling undo for files
https://root-forum.cern.ch/t/loading-unloading-class-as-interpreted-macro-in-cling-multiple-times/32976/2

execute cling code to change callbacks & variables
nested cling::Interpreter with multiple cling::MetaProcessor
IDK how to do it, but you can create child cling::Interpreter

Can't compile on VS2019

  1. calling cmake from command line throws "Error: could not load cache"

  2. opening the folder from CS/IDE stops with " ninja: error: build.ninja:123: bad $-escape (literal $ must be written as $$)"

?any ideas

Improvements

I have forked your library RCRL and used libclang with some changes as the following:

  • Text input is feed to clang.
  • Traverse the parsed code for functions & variables definition "ignore errors".
  • Add export prefix for them and put them in plugin.cpp.
  • Every non-parsed text would be regarded as once in plugin.cpp.
  • Append plugin.hpp with functions prototypes and extern variables.
  • Load library with RTLD_GLOBAL, so variables can be reused.

Your library is very very helpful. Thanks a bunch.

I attracted to your library when I was using a C++17 library and cling--clang5-- wasn't able to handle header files.

Regards.

MacOS - ctor/dtor counting test doesn't work

For some reason this test (which exports a function called test_ctor_dtor_order() and calls it from RCRL-submitted code) for the order of construction and destruction of variables from a vars section doesn't work on MacOS - this is the output of a failing build - it is as if the function was never called! The weird thing is that it doesn't crash or assert or anything like that - the compiled plugin is copied and loaded successfully...

and the MORE weird thing is that I have no problems calling such exported functions in the demo application (the host_app target) that is the focus of the repository itself

and the EVEN MORE weird thing is that before doing this test with exported symbols I was just inspecting the stdout output when loading the plugin and when unloading it (this commit is with the changes from text-based testing to an exported function) and it... didn't work on MacOS (but output redirecting works perfectly fine for the host_app target)

I tried not to reuse the same plugin.cpp filename for the plugin for the host_app target and the rcrl_compiler_tests target but that didn't help. Maybe the host_app target just works because of some CMake flags inherited from one of the third parties it links against (perhaps glfw?).

So I'm giving up - I cannot waste any more hours on that platform - hopefully someone else helps me.

Integrate under VSCode

Hi, I'm interested in using your RCRL in VSCode for msvc compiler. I successfully built and ran the tests but I have no clue how to use it within the VSCode environment (not sure if this is even possible).
Thanks in advance :)

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.