Coder Social home page Coder Social logo

Element constructor for Array about corda-rpc HOT 7 OPEN

djc avatar djc commented on July 19, 2024
Element constructor for Array

from corda-rpc.

Comments (7)

djc avatar djc commented on July 19, 2024

It's certainly possible that I've gotten it wrong -- not sure how much I exercised the array code path. Would you be able to submit a PR?

from corda-rpc.

minghuaw avatar minghuaw commented on July 19, 2024

I am actually implementing my own serde crate for AMQP1.0, and I have List as the default serialization format for sequence types, and there is a wrapper Array which will be serialized as an array. I'm wondering if you could share any ideas on serializing the enums. I don't really have a good idea for the tuple variants and struct variants.

from corda-rpc.

djc avatar djc commented on July 19, 2024

Why are you implementing your own?

from corda-rpc.

minghuaw avatar minghuaw commented on July 19, 2024

I am trying to learn how serde works by implementing the AMQP1.0

from corda-rpc.

luos avatar luos commented on July 19, 2024

I think this is correct, this way Arrays are not serialised properly and if you try to send a sasl mechanism frame with this client it will be a deserialisation error on the other side. This makes it impossible to use this lib as a "server".

Unfortunately I could not find an easy way to fix this, because the serialiser can not serialise an array with type info and length prefixed to the contents, because there is no function on the Serialize trait to do something like write_raw_bytes. (And I am new to Rust and could not figure it out how to add it.)

Do you have any pointers how can this be worked around? Now I am just thinking that I will replace the whole Encoder part with one working directly with the different frames as dove does it.

from corda-rpc.

minghuaw avatar minghuaw commented on July 19, 2024

@luos I have a serde implementation of AMQP protocol, I was able to test exchanging AMQP frames with c#'s amqpnetlite. It is part of my hobby project trying to build an AMQP1.0 library, but it will be a standalone crate once everything is ready. I haven't made it public yet, and there is currently a lot of debugging messages, but I will be happy to remove those messages and publish a preview version on crates.io if you need that.

from corda-rpc.

luos avatar luos commented on July 19, 2024

Hi, thanks, my project is also only a hobby project (though a broker!), so no worries, I will implement it myself, I have to practice anyway. Thanks for the offer! 🙂

from corda-rpc.

Related Issues (2)

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.