Coder Social home page Coder Social logo

async-bincode's People

Contributors

chapeupreto avatar dependabot[bot] avatar jmchacon avatar jonhoo avatar joshtriplett avatar shahn avatar simenb avatar taiki-e avatar tudyx avatar wasabi375 avatar xmakro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

async-bincode's Issues

Using the `Sink` for writing in async?

I noticed this library exposes the futures_sink::Sink trait instead of the futures::sink::Sink trait. Unlike the latter, the former seems to not support futures::sink::SinkExt, which provides actual async methods for dumping things in, and there doesn't seem to be an equivalent convenience trait.

Is there currently a supported way to write to these in async contexts, by awaiting on some future, without directly interacting with the poll_ interface (and therefore having to manually manage polling/wakeups)?

Need Example

it's very hard to understand how to use this crate.

No way to limit memory usage

bincode allows limiting the memory usage of deserialized objects, and async-bincode should probably provide a facility for this as well. Without it, attackers are able to consume up to 8GB of RAM (2* 2^32 bytes, once for the buffer, the other for the deserialized message).

In addition, on 32bit platforms, the calculation of the needed buffer size is prone to an overflow. As far as I can see, this is not actually problematic as it just causes the deserialization to fail. The memory exhaustion attack due to being unable to limit memory consumed for buffers is probably the worse vector on these platforms.

compatible with wasm-unknown-unknown target?

Was curious whether this relied on anything requiring an OS or if it could run on bare metal, specifically a wasm-unknown-unknown target. On the surface, it sounded like it just relied on futures, which do work in wasm, given an executor compatible with wasm.

But the file src/futures.rs uses std::task so I'm guessing not?

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.