Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

msgpack-rpc #53

Open
anfractuosity opened this issue Jul 15, 2015 · 5 comments
Open

msgpack-rpc #53

anfractuosity opened this issue Jul 15, 2015 · 5 comments

Comments

@anfractuosity
Copy link

I'm just wondering how to use the msgpack-rpc code that's in the repository, or
if that's a work-in-progress?

@euclio
Copy link

euclio commented Jul 17, 2015

I don't think it's ready to go yet. I'm currently working on a project that would make use of this however, @mneumann, what needs to be done?

@mneumann
Copy link
Owner

@anfractuosity , @euclio It only parses the RPC messages, but it does not implement the socket infrastructure and the dispatch. Should be easy to do... If you don't need interoperability between different languages, you might also take a look at https://github.com/pcwalton/ipc-channel.

@anfractuosity
Copy link
Author

I just had a go at compiling with the RPC module included but got the following error messages, which I'll take a go at fixing.

But I'm wondering after fixing those, roughly what would I need to do to use it? As in how would I define an RPC server interface for clients to call methods from?

   Compiling msgpack v0.1.0 (file:///home/chris/Repositories/rust-msgpack)
src/rpc.rs:2:17: 2:26 error: unresolved import `serialize::Encodable`. Maybe a missing `extern crate serialize`?
src/rpc.rs:2 use serialize::{Encodable, Decodable, Encoder, Decoder};
                             ^~~~~~~~~
src/rpc.rs:2:28: 2:37 error: unresolved import `serialize::Decodable`. Maybe a missing `extern crate serialize`?
src/rpc.rs:2 use serialize::{Encodable, Decodable, Encoder, Decoder};
                                        ^~~~~~~~~
src/rpc.rs:2:39: 2:48 error: unresolved import `serialize::Encoder`. Maybe a missing `extern crate serialize`?
src/rpc.rs:2 use serialize::{Encodable, Decodable, Encoder, Decoder};
                                                   ^~~~~~~~~
src/rpc.rs:2:48: 2:57 error: unresolved import `serialize::Decoder`. Maybe a missing `extern crate serialize`?
src/rpc.rs:2 use serialize::{Encodable, Decodable, Encoder, Decoder};
                                                            ^~~~~~~~~
src/rpc.rs:3:19: 3:26 error: unresolved import `std::old_io::IoError`. Could not find `old_io` in `std`
src/rpc.rs:3 use std::old_io::{IoError, IoResult};
                               ^~~~~~~
src/rpc.rs:3:28: 3:36 error: unresolved import `std::old_io::IoResult`. Could not find `old_io` in `std`
src/rpc.rs:3 use std::old_io::{IoError, IoResult};
                                        ^~~~~~~~
error: aborting due to 6 previous errors
Could not compile `msgpack`.

@euclio
Copy link

euclio commented Jul 18, 2015

I mucked around in it a little bit but I'm not familiar with rust serialization at all. After updating the old types it seems that it's using an old interface as well? Or needs more super imports?

@mneumann
Copy link
Owner

I see. It's still using very old interfaces. At first, serialize is now rustc_serialize. Then of course old_io is gone. I think you should use MsgpackResult instead of IoResult. You will probably find some examples here: https://github.com/rust-lang/rustc-serialize.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants