0

I know some C# tools that help us list interface methods from C# libraries, where we can check the function names and, sometimes, structs and types they return.

Is there something alike for rust?

I am trying to build Hyperledger Ursa to use it on Node-ffi but the method I'm trying to expose is not found after I build it. My goal is to list the available methods and debug mine, to see why it's not being built/exported.

Eduardo Elias Saléh
  • 806
  • 1
  • 11
  • 23
  • What operating system are you using? The tools differ across OSes and toolchains. – bk2204 Jul 06 '20 at 23:25
  • C# assemblies contain [ECMA-335](https://www.ecma-international.org/publications/standards/Ecma-335.htm) compliant metadata to expose information about types and members. Unless you are using some sort of post-processing to recover that information, a compiled Rust binary doesn't provide anything comparable. – IInspectable Jul 07 '20 at 09:55
  • I don't think this should be a OS problem but I'm currently trying using Ubuntu 20.04, Windows 10 and Catalina. @IInspectable Thanks, I did not know that. I will have a look at post-processing tools for Rust. Thanks! :D – Eduardo Elias Saléh Jul 08 '20 at 11:17
  • Just to add to the thread, The problem I was facing was that the code I've produced was not being built, as the feature was not being selected. Changing Cargo.toml to add the feature I created made the methods be available at the web-assembly. But, the quest for a meta-data inspector holds... – Eduardo Elias Saléh Jul 08 '20 at 11:18

0 Answers0