-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Project
compiler
Describe the feature
Per a suggestion from @KyrylR, the SimplicityHL compiler should be able to generate Rust and/or other language code like the argument and witness generators in, for example
https://github.com/BlockstreamResearch/simplicity-contracts/tree/main/crates/contracts/src/options
This is likely to be inferrable from type annotations on witness fields in the SimplicityHL program, although it would be much easier (and more powerful) in SimplicityNG. I think the basic idea is that we enumerate all standard-looking references to saved state and witness fields in the SimplicityHL program, and then emit boilerplate code that could create the corresponding data structures based on how those references are annotated or used inside the SimplicityHL. @KyrylR can correct or clarify this.
This is relevant to wallet and app integration, and, in some settings, to obviating the need to make .wit files on disk.