-
Notifications
You must be signed in to change notification settings - Fork 3
Change SSH backend interface to a structure for pubkey/password authentication #62
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
base: master
Are you sure you want to change the base?
Conversation
Thanks a lot! But your code is diffrent from my policy a little. I'm developing libspecinfra like this: Phase 1In this phase, I don't think about other languages at all. I write code for using by Rust itself. You consider about other languages from first. But it brings complexity. I've made this PR #63 according to this policy. Please see it. Phase 2In this phase, I write wrapper functions for FFI. I use only primitives(char, int and so on) and a pointer as arguments and return values. I don't use C struct. From other languages, Rust struct is just only pointer. Other languages don't know the struct fields behind the pointer. You use C struct in this PR. This also brings complexity. I'd like to avoid this complexity. I will write code and make PR according to this policy later. Phase 3In this phase, I write other languages bindings. Rust way and other languages ways are different. Language bindings should absorb the difference and provide API which is easy to use for users of the language. |
Thank you for your review. It's very suggestive and informative!! But we decided the argument of |
I said that without deep thinking, sorry.
I will write code. Please wait a little. |
Done. This is specinfra core. This is Ruby binding. Examples using Ruby binding. If we don't use C struct in Rust, we don't need to define the struct in other language bindings. |
I got it! I think that it is very simple and nice policy 👍
Thanks a lot!! |
Close #43
Change the argument of
backend_ssh_new
to a structure with hostname, user and key file or password.If you do not give some properties, use the empty string.
Sample Code (Python binding)
Note : #59 (My thought process. Sorry for writing in Japanese)