Giter VIP home page Giter VIP logo

Comments (2)

texodus avatar texodus commented on May 13, 2024

Thanks for the report!

This certainly needs better documentation and some code cleanup. The node.js runtime does not support a worker implementation currently, due to

  • The API differences between WebWorkers and Node's child_process module made this not free (unless there is a better way).
  • There is no renderer process in node.js, so I was originally unclear that subprocess instantiation of the node.js was even warranted.

The intention of the documentation was to show the 2 separate ways to access the the perpsective module symbol, In The Browser for using the worker() method to get a perspective module symbol, and In Node.js for acquiring the same symbol simply by importing it. This is wildly insufficient, so I'll be cleaning up the documentation to make this easier to understand and will close this issue once it is merged.

Separately, I am completely open to adding a subprocess API to the node.js runtime as well. If you're interested in contributing such a change, PRs are always welcome - if you would just like to request and track progress on this, feel free to open a separate issue detailing your use case so we can better understand how best to implement it.

from perspective.

texodus avatar texodus commented on May 13, 2024

Regarding node-gyp - I think we'd need some clear explanation of what this would bring to the project over the WebAssembly runtime. From my (albeit limited) scope, node-gyp would seem to add quite alot of additional build complexity, potentially a separate c++ API for binding, and a loss of portability; while the performance gain has at best not been explored, and I have reason to suspect it is minimal in Perspective's case.

from perspective.

Related Issues (20)

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.