Coder Social home page Coder Social logo

Comments (2)

MeguminSama avatar MeguminSama commented on June 24, 2024 1

Thanks for the quick response!

I was just looking into it and noticed the big move to libmem-sys (and that the properties are public on there).

I've switched over to libmem-sys for the time being, rather than making a fork - since the changes on my end were fairly minimal :)

Thanks!

from libmem.

rdbo avatar rdbo commented on June 24, 2024

The fields in the structs are not public because the Rust wrapper needs to do convertions between C strings and Rust strings, for example. I probably just forgot to do it at the time.
The newer bindings will separate further the C API from the Rust API, where there will be a crate called libmem-sys (raw C bindings) and just libmem which will be more rusty
Those bindings are not complete yet, but when 5.0.0 releases, you should expect to be able to access them normally.
For the time being, best option might be to do functions like this in a fork:

impl lm_inst_t {
    pub fn get_mnemonic() -> String {
        string_from_cstring(&self.mnemonic)
    }
    
    pub fn get_op_str() -> String {
        string_from_cstring(&self.op_str)
    }
}

from libmem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.