Closed naps62 closed 3 years ago
Imageflow_abi is a cdylib, so it requires some extra work. I'll try to get an example working when I get back to my desk tomorrow.
Are you writing the bindings in Rust? Do you want a separate .dll for imageflow or do you want to statically compile it. If the latter, you could bind to imageflow_core instead which should just work.
Imageflow-node should be a good reference for static compilation.
On Sun, Nov 29, 2020, 12:26 PM Miguel Palhas notifications@github.com wrote:
I'm trying to use imageflow_abi to implement Elixir bindings, but I'm running into a weird error:
[image: image] https://user-images.githubusercontent.com/283819/100551111-aaeb2900-3276-11eb-898d-04c3dcaff662.png
Steps to reproduce:
- Create an empty cargo project
- Add imageflow_abi (pointing to main branch. Not sure if this is correct?)
- Add extern crate imageflow_abi to main.rs
Expected: It should compile correctly
What happens to me: It can't find the imageflow_abi, even though it is clearly being compiled, shows up in target/debug/build, and all other imageflow crates seem to import correctly
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH5LQPKK7GEJR27X5YLSSKN4VANCNFSM4UGWXR7Q .
@lilith Thanks for the help.
Yes, I intended to write the bindings in Rust rather than C, using [rustler[(https://github.com/rusterlium/rustler), which compiles the crate statically
I looked at imageflow-node first, but the integration there seemed to be a more complex there, and the readme here claimed "Imageflow has a simple C-compatible ABI, of which only 4 methods are needed to implement bindings"
, so I assumed it was a more high-level integration, and turned to imageflow-ruby instead
I'll use imageflow_core directly instead. Thank you!
Got a first draft working already. So I guess this issue is no longer needed. Sorry for the trouble :)
Would you be interested in open-sourcing the bindings? I would be up for reviewing the integration to look for gotchas, and might be able to find more contributors.
On Mon, Nov 30, 2020, 5:06 AM Miguel Palhas notifications@github.com wrote:
Closed #566 https://github.com/imazen/imageflow/issues/566.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/566#event-4051598485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH535YHVHZPIM2AVIGLSSODDLANCNFSM4UGWXR7Q .
@lilith it will be open source, of course!
I was actually planning on asking you to review a couple of details, yes. I'm still not that experienced when it comes to lifetimes, borrowing and a few other Rust stuff, so there are a couple of details in there that I'm not sure can be improved
I can let you know once the repo is ready (so far I was just putting things together. still need to polish the API and write some tests), but you can already see the current verions: https://github.com/naps62/imageflow_ex
I'll let you know once it's in a publishable state
@lilith The initial version is done and published on hex
I do still have a couple of rust questions, though. What would be the best way to ask you about those?
Anywhere is fine - I'm also on google hangouts at lilith@imazen.io
On Tue, Dec 1, 2020, 4:43 AM Miguel Palhas notifications@github.com wrote:
@lilith https://github.com/lilith The initial version is done and published on hex https://hex.pm/packages/imageflow
I do still have a couple of rust questions, though. What would be the best way to ask you about those?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/566#issuecomment-736485291, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH3HQSUQWGUOHFBSZUDSSTJEZANCNFSM4UGWXR7Q .
Thanks. I opened two issues in my repo, and tagged you there
Perfect. I will look at them soon.
On Tue, Dec 1, 2020, 11:51 AM Miguel Palhas notifications@github.com wrote:
Thanks. I opened two issues in my repo, and tagged you there
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/566#issuecomment-736748474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH574M2Z6COEDSPHIADSSU3LNANCNFSM4UGWXR7Q .
I'm trying to use imageflow_abi to implement Elixir bindings, but I'm running into a weird error:
Steps to reproduce:
main
branch. Not sure if this is correct?)extern crate imageflow_abi
tomain.rs
Expected: It should compile correctly
What happens to me: It can't find the imageflow_abi, even though it is clearly being compiled, shows up in
target/debug/build
, and all other imageflow crates seem to import correctly