InfRandomness opened issue #4063:
Thanks for filing a feature request! Please fill out the TODOs below.
Feature
TODO: Brief description of the feature/improvement you'd like to see in
Cranelift/Wasmtime.I would like to see in cranelift-object (https://docs.rs/cranelift-object/0.82.3/cranelift_object/struct.ObjectProduct.html#method.emit), where we would create a new function called emit_to_file, essentially passing in a File, and that function would then call https://docs.rs/object/0.27.1/object/write/struct.Object.html#method.emit with the File's buffer.
I think this would be nice instead of having to call
ObjectProduct.emit()
, and then having to transform theVec<u8>
into a slice to be written into a file;This may very feel redundant, too
Implementation
TODO: Do you have an implementation plan, and/or ideas for data structures or
algorithms to use? YesAlternatives
TODO: What are the alternative implementation approaches or alternative ways to
solve the problem that this feature would solve? How do these alternatives
compare to this proposal?
Transform theVec<u8>
returned byObjectProduct.emit()
into a slice and write it to a file
bjorn3 commented on issue #4063:
You can call both product.object.emit() and product.object.write_stream() already.
InfRandomness closed issue #4063:
Thanks for filing a feature request! Please fill out the TODOs below.
Feature
TODO: Brief description of the feature/improvement you'd like to see in
Cranelift/Wasmtime.I would like to see in cranelift-object (https://docs.rs/cranelift-object/0.82.3/cranelift_object/struct.ObjectProduct.html#method.emit), where we would create a new function called emit_to_file, essentially passing in a File, and that function would then call https://docs.rs/object/0.27.1/object/write/struct.Object.html#method.emit with the File's buffer.
I think this would be nice instead of having to call
ObjectProduct.emit()
, and then having to transform theVec<u8>
into a slice to be written into a file;This may very feel redundant, too
Implementation
TODO: Do you have an implementation plan, and/or ideas for data structures or
algorithms to use? YesAlternatives
TODO: What are the alternative implementation approaches or alternative ways to
solve the problem that this feature would solve? How do these alternatives
compare to this proposal?
Transform theVec<u8>
returned byObjectProduct.emit()
into a slice and write it to a file
Last updated: Dec 23 2024 at 12:05 UTC