Skip to content
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

Using Rust datatypes via RPC #10

Open
anfractuosity opened this issue Aug 19, 2015 · 1 comment
Open

Using Rust datatypes via RPC #10

anfractuosity opened this issue Aug 19, 2015 · 1 comment

Comments

@anfractuosity
Copy link

Hi,

I'm just wondering if you could point me in the right direction, on how to use non-standard
datatypes, such as those which are specific to Rust, such as bigints, via RPC.

Would I need to represent the data as say an array of bytes, then use
Rusts transmute feature to convert to a bigint somehow, or is there a better way?

cheers

Chris

@dwrensha
Copy link
Member

Using the Cap'n Proto Data type sounds sensible to me. However, I would shy away from using transmute(). It looks like BigInt has functions like from_bytes_le() that would be better suited for that purpose.

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