Coder Social home page Coder Social logo

io-plugin's Introduction

IO-Plugin

IO-Plugin is a rust package which allows easily creating a plugin-system based on the following model:

  1. The host spawns instances of its' plugins (by runnning their executables)
  2. The host sends serialised messages on the plugin process' stdin
  3. The host receives serialised responses on the plugin process' stdout

Theoretically, it is also possible to create plugins in other languages, though their interfaces will have to be determined manually. The messages are currently serialised using serde-cbor (this is subject to change at my discretion - though I expect to stick to serde-supported formats).

A usage example is available under ./io-plugins-test

Checklist:

  • Determine structure for translating a provided enum to the various relevant data structures.
  • Write a macro that converts said enum to the data structure
  • Attribute-forwarding (besides just documentation)
  • Create sensible default implementations (except for the plugin-trait methods)
  • Support generics (types only - no lifetimes)
  • Allow providing custom default implementations (for example - to output the interface version a plugin was compiled against)
  • Increase clarity of error messages (there are probably some invalid usages which result in unclear errors)

io-plugin's People

Contributors

lirannl avatar

Watchers

 avatar  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.