add an example of how to compile a Rust project#467
add an example of how to compile a Rust project#467dae wants to merge 1 commit intoindygreg:mainfrom
Conversation
|
Thank you for looking into improving the Rust project building! It is an area of PyOxidizer that isn't very polished. Historically, the mean reason for that is the hacks that were required to get a custom libpython linked and for threading state through Cargo so everything just worked in In addition, in the unreleased In theory, the switch to PyO3 and the adoption of the Cargo 1.56 (released today) feature to have full control over linker arguments means that having a more natural Rust development workflow with PyOxidizer is now possible! But it will take some work to get there. I have various ideas floating around in my head and your PRs definitely touch on some of them! I'll probably comment on your other PRs eventually. I'm starting with this one because it seemed like a good place to start since documentation improvements are always welcome! |
indygreg
left a comment
There was a problem hiding this comment.
This seems mostly accurate. There are a few pieces that could be tweaked a little (such as encouraging use of PYO3_CONFIG_FILE instead). I'll likely commit this as-is or close to as-is then modify the text slightly in follow-up commits. This will involve me rebasing, so GitHub may not mark this PR as merged due to the Git commit SHA changing.
Thank you for taking the time to contribute your solution to the docs!
|
Appreciate you taking a look - will keep an eye out for your changes. |
|
I pushed your docs change. Then a few commits later I introduced a new command that specializes in writing out embedding artifacts in commit cdca2e6. This is documented at https://pyoxidizer.readthedocs.io/en/latest/pyoxidizer_rust_generic_embedding.html. I also touched up your docs to add more detail and cut down slightly on the complexity. Please let me know what you think of the new command and the workflows it enables! Still plenty of room for improvement. But I suspect it will make things vastly easier for people like you! |
It took me quite a few hours to figure out how to get a project building with cargo on 0.17, and then figuring out how to get the latest master branch working took time again. Hopefully these small changes make things easier for other people :-)
Related: #466, #439