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

Explanation of scope #1031

Closed
tiffany352 opened this issue Nov 17, 2016 · 1 comment
Closed

Explanation of scope #1031

tiffany352 opened this issue Nov 17, 2016 · 1 comment
Labels
cranelift:documentation Areas that need better documentation. cranelift Issues related to the Cranelift code generator

Comments

@tiffany352
Copy link

The readme says that cretonne is supposed to be a code generator for WebAssembly, but it's a bit unclear what that means, seeing how there doesn't appear to be anything to actually do with wasm in the code.

  • I heard that cretonne is meant to have inter-procedural optimizations as another layer built over top. Is this true, and always going to be the case?
  • Does another tool to translate wasm to cretonne IR need to be built in order to generate code for wasm?
  • Is it in scope for cretonne to output to wasm, or is it only intended to output to native code? (e.g. will I be able to use cretonne as a pure-rust binaryen alternative?)
  • Is cretonne meant to be useful in both JIT and AOT configurations?

Preferably, the readme or documentation should be able to answer these questions.

@alexcrichton alexcrichton transferred this issue from bytecodealliance/cranelift Feb 28, 2020
@alexcrichton alexcrichton added cranelift:documentation Areas that need better documentation. cranelift Issues related to the Cranelift code generator labels Feb 28, 2020
@sunfishcode
Copy link
Member

Cranelift (formerly Cretonne) is currently focusing on "backend" compilation, however if it is successful, we hope to extend it some day with high-level inter-procedural optimizations.

While Cranelift includes the cranelift-wasm crate for translating wasm, it isn't sufficient for complete wasm compilation. One needs additional support, such as the support now provided by Wasmtime.

It is theoretically possible that Cranelift could output to wasm some day, however it is not set up to do so right now.

Cranelift is indeed meant to be useful in both JIT and AOT configurations. Lucet and rustc_codegen_cranelift are examples of using it in an AOT configuration, and Wasmtime is an example of using it in a JIT configuration.

If you have any further questions, please re-open this issue or file a new one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:documentation Areas that need better documentation. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

No branches or pull requests

3 participants