Giter VIP home page Giter VIP logo

dbus-bytestream's People

Contributors

marcelbuesing avatar mathstuf avatar srwalter avatar tylerwhall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dbus-bytestream's Issues

Hook into an event loop

It'd be nice to be able to hook into an event loop rather than having to rely on a blocking call to read messages.

Plans for service-side APIs?

It appears this is only for communicating over D-Bus, not for setting up a service on the bus.

Related, any plans for converting from an XML description to a Rust skeleton (c.f., qdbusxml2cpp from Qt)?

New release?

Could a new release be tagged? I'd like to be able to upload some crates which require the PRs I've filed. Thanks.

Demarshaling messages with zero-length arrays fails

When a message signature contains an array, but the message body actually contains no elements, parsing incorrectly fails with DemarshalError::MismatchedParens, due to invalid handling in

let mut sig_copy = "".to_owned();
while *offset < start_offset+(array_len as usize) {
// We want to pass the same signature to each call of demarshal
sig_copy = sig.to_owned();
vec.push(try!(demarshal(buf, offset, &mut sig_copy)));
}
// Now that we're done with our elements we can forget the elements consumed by demarshal
let mut mysig = sig.clone();
mysig.truncate(sig.len() - sig_copy.len());
mysig.insert(0, 'a');
*sig = sig_copy;

Note that if the while loop doesn't execute even once, sig_copy will remain empty, and the currently parsed sig will be unconditionally emptied, instead of being set to fields remaining to be parsed.

Maybe I'll fix the bug myself later and publish a PR, but meanwhile here's an example failing test case with an array in the middle of a simple struct. Both nonempty and empty array tests are added for contrast.

albel727@460d6c1

Relicense e.g. under MPL

It's great to see a native Rust dbus protocol implementation and I would like to somehow use this as a backend for a Rust native alternative to dbus-codgen or an alternative to dbus-tokio aka dbus-bytestream-tokio. Given the LGPL license I feel though it might be quite hard to use this in anything other than LGPL or GPL code since the library is by default linked statically. Don't get me wrong I entirely get the changes / fixes etc. should be upstreamed part and support that. Would you mind considering e.g. MPL, MIT or Apache ... ?

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.