You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted in the README, the Rust API is kind of low level. Users need to construct internal structures like CollectingAssemblyEmit and call internal methods sleigh.decode(0).unwrap() (what does this do?) to get the results.
I guess the developer may expect Rust users to be skilled enough, so they can even develop fancier features based on those low level APIs?
How about also providing a higher level one, like shown in the Python/Nodejs bindings?
By the way, the implementation code contains many wrappers of XXXEmit, such as AssemblyEmit, RustAssemblyEmit, CollectingAssemblyEmit, and the Pcode-series emitters. They are basically doing similar things.
I guess the authors may want to provide a callback mechanism and also a default callback that collects the emitted code into a vector. But I think it is kind of over-designed.
Maybe a cleaner way is simply returning an interator, so users can iterate through the generated code and collect them in whatever way they want.
The text was updated successfully, but these errors were encountered:
As noted in the README, the Rust API is kind of low level. Users need to construct internal structures like
CollectingAssemblyEmit
and call internal methodssleigh.decode(0).unwrap()
(what does this do?) to get the results.I guess the developer may expect Rust users to be skilled enough, so they can even develop fancier features based on those low level APIs?
How about also providing a higher level one, like shown in the Python/Nodejs bindings?
By the way, the implementation code contains many wrappers of
XXXEmit
, such asAssemblyEmit
,RustAssemblyEmit
,CollectingAssemblyEmit
, and the Pcode-series emitters. They are basically doing similar things.I guess the authors may want to provide a callback mechanism and also a default callback that collects the emitted code into a vector. But I think it is kind of over-designed.
Maybe a cleaner way is simply returning an interator, so users can iterate through the generated code and collect them in whatever way they want.
The text was updated successfully, but these errors were encountered: