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

[Need help] gir has trouble with the sys bindings for Nemo-3.0 #1392

Open
ItzSwirlz opened this issue Oct 24, 2022 · 2 comments
Open

[Need help] gir has trouble with the sys bindings for Nemo-3.0 #1392

ItzSwirlz opened this issue Oct 24, 2022 · 2 comments

Comments

@ItzSwirlz
Copy link

Hi!

I'm trying to make bindings for the Nemo gir, or libnemo-extension. After a lot of fiddling (and wondering why creating a Nemo Column causes a double free), I realized that it made sense my test failed (I tried it on XApp and it worked) - gir cannot generate the sys. I see why-it generates functions that are used in the Nemo extension (Nemo extensions are .so files, so they are dynamic libs. Technically, a typical C extension is direct C sys calls and that's what I'm fighting with here)

Is someone able to guide me towards fixing sys generation errors?

Thanks

Nemo: https://github.com/Ubuntu-Cinnamon-Remix/nemo-rust
XApp: https://github.com/Ubuntu-Cinnamon-Remix/xapp-rust

(both repos have examples/me trying valiantly to test)

@bilelmoussaoui
Copy link
Member

Would you give more details about what fails exactly? any errors ?Which command you didn't run?

@ItzSwirlz
Copy link
Author

ItzSwirlz commented Nov 1, 2022

Sorry, I worded this poorly.

Would you give more details about what fails exactly? any errors ?Which command you didn't run?

cargo test

When generating the Rust side of the bindings, a few of the objects are missing mem management, but that's probably a fault in the Nemo source code.

I ran everything possible, I fiddled with the settings, the only fix would be to manually include the header files in the test folder.

I have had luck with another plugin library, similar to Nemo. Gedit's plugin system: https://github.com/Ubuntu-Cinnamon-Remix/gedit-rust . Since this Gir is also made with the intent of compiling to a dynamic library, this may just be because of the actual source code.

@ItzSwirlz ItzSwirlz changed the title [Need help] gir fails to generate for nemo extension library [Need help] gir has trouble with the sys bindings for Nemo-3.0 Nov 1, 2022
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