by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    xiolec
    @xiolec

    I also added some destroy functions in class_ though those were kinda just put together quickly. also added set_js_const which allows to add a const value on to the js function.

    the interceptors don't include all the static asserts needed. Haven't really tried merging it to your version yet. I need to redo all my changes to v8pp::context first lol.

    also I added the external_data to its own file. and tracked the data that was created and deleted all the data when the isolate is destroyed. I might also add a comparison function to the external_data holder. so that the same data wont be created multiple times but instead is just searched for.
    Yeah, i think I need to completely redo all my changes to the v8pp::context lol
    xiolec
    @xiolec

    Context.hpp is now updated to use callback functions to create a global object with class_

    Added convert functions to automatically convert an object into v8 without importing/referencing first

    Added insertobject functions in class to insert pointers into a v8 object that was already created

    - Requires 2 aligned pointer slots. 
    xiolec
    @xiolec
    Do you know if its possible to create two v8::contexts with the same objecttemplate? Can't get it to stop crashing when the new context is made and the old one still exists.
    xiolec
    @xiolec
    never mind think I found the problem. I was adding instances of objects to the template after it was created on the first context.
    Tim Janik
    @tim-janik
    @pmed can I close #52 and #49 or do you have any reason to keep them open?
    Alexey Zasenko
    @0xDAD
    Hi all! I believe here is the proper place to ask questions like mine. @pmed, have you considered adding CMake support to the project?
    Pavel Medvedev
    @pmed
    Hi @0xDAD,
    Yes, it would be great to have the CMake support. Pull requests are welcomed! :)
    while the library can be mostly used as a header-only, it would be good to have CMake support for quick starting with examples or tests
    Alexey Zasenko
    @0xDAD
    Also, cmake config file could help easily embed and customize the library into user projects. Thanks. Will make request if have something interesting
    Pavel Medvedev
    @pmed
    Super, thanks!
    Alexey Zasenko
    @0xDAD
    Got linking error in case of using v8pp::context and V8PP_HEADER_ONLY defined. Was it intended not to use contexts in header-only implementation? Or maybe I did smth wrong? Thanks
    Alexey Zasenko
    @0xDAD
    error LNK2019: unresolved external symbol "public: __thiscall v8pp::context::context(class v8::Isolate *,class v8::ArrayBuffer::Allocator *,bool)" (??0context@v8pp@@QAE@PAVIsolate@v8@@PAVAllocator@ArrayBuffer@3@_N@Z) 
    error LNK2019: unresolved external symbol "public: __thiscall v8pp::context::~context(void)" (??1context@v8pp@@QAE@XZ)
    Adding context.cpp to the project solves the problem.
    Pavel Medvedev
    @pmed
    This v8pp::context is used mostly for test and in a couple of projects those had V8 embedded. Intent for V8PP_HEADER_ONLY was to use the library without installation in projects for Node.js native add-ons. There you could just add the library as an NPM dependency in package.json. See also these comments: https://github.com/pmed/v8pp/issues/75#issuecomment-397034400 https://github.com/pmed/v8pp/issues/75#issuecomment-397249100
    Alexey Zasenko
    @0xDAD
    Got it. I'm trying to use the library for wrapping business objects for V8 engine embedded into my app. I found it quite straightforward and cppish) Thanks for your time and for sharing!
    Pavel Medvedev
    @pmed
    You are welcome! I've created this library for one similar, so v8pp was designed from requirements to that project.
    David Warford
    @redstonedash
    Hello. I am confused on how I am supposed to include v8 into my project. do i just add the v8pp directory as an include directory?
    David Warford
    @redstonedash
    also all the examples seem to include node.h but i don't have a node.h
    Pavel Medvedev
    @pmed
    Hello! This library is a wrapper for V8, that should also be a dependency in your project. Please refer the V8 documentation how to embed it into your project. And yes, v8pp is a header-only library, so you can add its v8pp subdirectory into your project includes path.
    v8pp/examples contains native Node.js addons, implemented with v8pp. You could read how to build the native Node.js in the Node.js documentation: https://nodejs.org/dist/latest-v12.x/docs/api/addons.html#addons_building
    David Warford
    @redstonedash
    oh. i guess i was misinformed. somone said this game with the v8 binaries and thats why i was trying to use it because building v8 was a struggle for me
    Pavel Medvedev
    @pmed
    Here is also some documentation in v8pp: https://github.com/pmed/v8pp/blob/master/docs/addons.md
    Pavel Medvedev
    @pmed
    ok, v8 building is not a trivial task. I've made a project to build V8 on windows into a NuGet package: https://github.com/pmed/v8-nuget