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

pyoxidizer: allow specifying an existing project crate #468

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dae
Copy link
Contributor

@dae dae commented Oct 21, 2021

While building directly with cargo is possible (#467), a lot of the convenience that pyoxidizer provides is lost - you need to construct rather long command lines, and manually bundle files up separately (#466). What if instead of an all-or-nothing approach, pyoxidizer provided limited support for building from an existing Rust crate?

With this PR, the user can build a project created with init-rust-project with a single short command line:

$ PYOXIDIZER_CRATE_FOLDER=$(pwd) pyoxidizer build

It also happens to be somewhat faster, as crates like jemalloc don't get recompiled each time.

It would come with caveats:

  • The user would be responsible for ensuring their crate sources are appropriate for the pyoxidizer version they are invoking
  • It may not work with more elaborate embedding use cases - but then, the user is still free to drop back to raw cargo.
  • I didn't encounter it in testing, but perhaps there might be cases where a stale build product could require the user to manually clear out their build folder?

What do you think?

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

Successfully merging this pull request may close these issues.

1 participant