Skip to content

How I can use crates? #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
verysimplenick opened this issue Aug 9, 2015 · 2 comments
Closed

How I can use crates? #174

verysimplenick opened this issue Aug 9, 2015 · 2 comments

Comments

@verysimplenick
Copy link

Hi, I use cargo for example test code from rmp crate:

extern crate rmp as msgpack;
extern crate rustc_serialize;

use rustc_serialize::Encodable;
use msgpack::Encoder;

fn main() {
    let val = (42u8, "the Answer");

    // The encoder borrows the bytearray buffer.
    let mut buf = [0u8; 13];

    val.encode(&mut Encoder::new(&mut &mut buf[..]));

    assert_eq!([0x92, 0x2a, 0xaa, 0x74, 0x68, 0x65, 0x20, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72], buf);
}

I add cargo.toml and this work fine from console, but how I can build project with visualrust? Maybe can add something like customising build process?

@verysimplenick
Copy link
Author

#162

@vosen
Copy link
Member

vosen commented Aug 10, 2015

Duplicate of #162

@vosen vosen closed this as completed Aug 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants