FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

SimplicityHL/codegen at master · BlockstreamResearch/SimplicityHL · GitHub

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Code and documentation generation

Generate Rust code

Generate Rust modules, like in this repository:

cargo run --bin codegen -- modules --out-dir modules/

Generate Jet documentation in a JSON file

Generate JSON file containing jet information:

cargo run --bin codegen -- docs elements.json

This JSON file contains an array of jets, each of which includes the following information:

  • "haskell_name" -- The name of the jet used in the Haskell and Rust code.
  • "simplicityhl_name" -- The name of the jet as it is used in SimplicityHL.
  • "section" -- The category to which the jet belongs.
  • "input_type" -- The input types represented as a vector of AliasedTypes in SimplicityHL, separated by comma.
  • "output_type" -- The output type represented as an AliasedType in SimplicityHL.
  • "description" -- A description of the jet's functionality.
  • "deprecated" (optional) -- Indicates if jet is deprecated.

Note

Structure of generated JSON similar to file in simplicity-lang-org repo, but it contains only array, without an object elements above.

Installation

Install simplicityhl via cargo with docs feature -- simplicityhl-codegen would be installed alongside simc:

cargo install simplicityhl --features docs

Or install from local repository:

cargo install --path ./ --features docs

Back | FazBrowse Home | New Git URL