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

cranelift: expand umbrella crate with more crates #8634

Merged
merged 2 commits into from
May 17, 2024

Conversation

tertsdiepraam
Copy link
Contributor

Closes #7772

This adds the interpreter, jit, module, native & object crates to the umbrella crate. All crates (including the existing codegen and frontend crates) are feature gated. However, codegen and frontend are default features, so backwards compatibility is retained if default features is not set to false. I wasn't quite sure which crates to include, but in my own project, I already depend on jit, module and native. Based on their descriptions, interpreter and object also seemed relevant as public API. I might have missed some other important crate.

I figured this would be an easy fix, although I understand if the umbrella crate should not have all these crates. In that case, feel free to close this PR :)

@tertsdiepraam tertsdiepraam requested review from a team as code owners May 16, 2024 14:21
@tertsdiepraam tertsdiepraam requested review from abrown and removed request for a team May 16, 2024 14:21
@@ -12,10 +12,30 @@ keywords = ["compile", "compiler", "jit"]
edition.workspace = true

[dependencies]
cranelift-codegen = { workspace = true }
cranelift-frontend = { workspace = true }
cranelift-codegen = { workspace = true, optional = true }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other crates depend on cranelift-codegen, so I don't see any reason why you should be able to disable it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Updated!

@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label May 16, 2024
Copy link
Member

@elliottt elliottt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all seems reasonable to me, thanks for fixing this!

@elliottt elliottt added this pull request to the merge queue May 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 16, 2024
@elliottt
Copy link
Member

The publish step is failing because cranelift-jit has a dev-dependency on cranelift for its examples. Can we move the jit examples out of cranelift-jit to break this cycle? Perhaps the umbrella crate would be a better place to centralize stuff like this now.

@elliottt
Copy link
Member

(@alexcrichton mentioned that the cycle could be broken by using a { path = ... } version instead, so I went ahead and pushed that change. I'll merge this once it passes branch CI)

@elliottt elliottt added this pull request to the merge queue May 17, 2024
Merged via the queue into bytecodealliance:main with commit c73f8de May 17, 2024
35 checks passed
alexcrichton pushed a commit to alexcrichton/wasmtime that referenced this pull request May 20, 2024
)

* cranelift: expand umbrella crate with more crates

* Break the dependency cycle between cranelift-jit and cranelift

---------

Co-authored-by: Trevor Elliott <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cranelift: add all Cranelift crates to cranelift umbrella crate
3 participants