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

Provide more guidance on which kind of bindings to use #1397

Closed
not-my-profile opened this issue Jan 8, 2023 · 5 comments
Closed

Provide more guidance on which kind of bindings to use #1397

not-my-profile opened this issue Jan 8, 2023 · 5 comments
Labels
documentation Documentation needs improvement

Comments

@not-my-profile
Copy link

Running maturin init or maturin new currently gives the following prompt:

? 🤷 Which kind of bindings to use? ›
❯ pyo3
  rust-cpython
  cffi
  uniffi
  bin

I think it would make sense to link some website that explains the differences (advantages/disadvantages) of these various bindings. Perhaps in a new section in the user guide? https://pyo3.rs/v0.17.3/rust_cpython.html would probably be a good page to link from that section but ideally the section would also explain (or link pages that explain) the differences between cffi, uniffi, etc.

Lastly as I understand it the bin option actually isn't a binding at all, so this should probably be better explained in the CLI prompt. And it also does not appear to be documented in the user guide.

@messense
Copy link
Member

messense commented Jan 9, 2023

@not-my-profile
Copy link
Author

not-my-profile commented Jan 9, 2023

Ah thanks, I did indeed miss that page. I mistakenly interpreted the sidebar of the user guide to be a table of contents for the current page (just because I saw "Contributing" to be the last section of both).

Ok great that page is indeed helpful but I think it could be more explanatory for people who are unfamiliar with the various binding technologies. And I still think that bin technically isn't a binding. I can look into improving that page but I'll have to familiarize myself firstly more with these various technologies since I don't have much experience with them.

What do you think should maturin init/new display a link to https://www.maturin.rs/bindings.html?

@messense
Copy link
Member

messense commented Jan 9, 2023

What do you think should maturin init/new display a link to https://www.maturin.rs/bindings.html?

Sure, added in #1403.

@messense
Copy link
Member

messense commented Jan 9, 2023

And I still think that bin technically isn't a binding. I

Yeah it's also getting complicated now that maturin also supports bin bindings that uses pyo3.

I'd like to do some refactoring after pushing out a 1.0 release.

@messense
Copy link
Member

Ok great that page is indeed helpful but I think it could be more explanatory for people who are unfamiliar with the various binding technologies.

Closing for now, feel free to send pull requests to improve the code or docs, thanks!

@messense messense added the documentation Documentation needs improvement label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation needs improvement
Projects
None yet
Development

No branches or pull requests

2 participants