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

Nautilus extensions written in Ruby #16

Open
ghost opened this issue Nov 5, 2011 · 1 comment
Open

Nautilus extensions written in Ruby #16

ghost opened this issue Nov 5, 2011 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Nov 5, 2011

I'd like develop some Nautilus extension in Ruby (not in C or Python). I wonder if I could do that with ruby-gir-ffi. I think I could use Nautilus objects but I don't know if I would need some kind of C-to-Ruby glue code.

Your project is great! Thank you!

Greetings.

@mvz
Copy link
Owner

mvz commented Nov 20, 2011

Hello pmros, thanks for the kind words.

I've taken a look at how the Python extensions for Nautilus work, and my conclusion is as follows:

  • Some glue code is needed because Nautilus finds extensions by loading C libraries. But, like the Python case, this can be generic for all Ruby Nautilus extensions.
  • This glue code will load the Ruby runtime and the Ruby file.
  • The classes defined in the Ruby file will need to have a GType associated with them. GirFFI should be able to handle this, but I haven't tried it yet.
  • Nautilus will have to be told about the classes defined in the file. This can be done by the glue code, and probably also from Ruby.
  • The Nautilus classes can be used from GirFFI, at least for Nautilus 3.

The biggest hurdle would probably be creating the glue code. That's definitely something for a separate project.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant