Rust capabilities

I'm coming from the Java world and wondered if Rust has 1) Something like the BigInteger class and 2) RMI of Java? (And no, I haven't read any of the Rust tutorials yet.)
Thanks for your help.

Yes

Not that I know of. But there's support for gRPC, which is something comparable to RMI?

1 Like

In response to 2), as an alternative to gRPC, there is also tarpc, which is simpler and a pure Rust solution.

1 Like

For arbitrary precision integers, feel free to look at this crate: num_bigint - Rust, which is also part of the larger num crate. (Same as @jofas also linked already in the mean-time.)

I'm not aware of any direct analogies of Javaʼs remote method invocation, and a direct analogue would probably be hard, since Rust doesn't have a runtime and generally more lightweight types with less capabilities than general Java objects. Also, last time I heard of it, I remember hearing that RMI is not really used all that much in practice; my personal interaction with it was only in university anyways. Of course Rust can be used for inter-process and/or network communication of various types, and with serialization provided by serde that's not all that inconvenient to use either.

2 Likes

JNDI/RMI was the key component of the Log4J RCE vulnerability that was popular in last year. It had been a popular attack vector even before the said CVE.

I believe it's clear at this point that "allow RPC for every classes" was mistake. Nowadays RPC frameworks focus on defining interfaces that are intended to be called remotely. And only local code can be executed from it.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.