Skip to content

Overriding the Elements jet set with the --target parameter #224

@ivanlele

Description

@ivanlele

Project

compiler

Describe the feature

I propose adding a --target parameter to simc that specifies the jet set used for SimplicityHL compilation. Based on the passed argument, the compiler would load a different Jet trait implementation at runtime.

Such option would facilitate a development of projects which do not use standard jets. Practical exemple is SU.

The implementation can be carried out in a series of PRs:

  • Create JetHL trait that defines the interfaces for all additional jet specific compilation-related computations introduced in Simplicity HL, and not available in on rust-simplicity Jet trait.
  • Require ast::Program to accept a generic parameter for the implemented JetHL trait.
  • Add a --target option that loads a dynamic library at runtime, whose methods would be used internally by a new CustomJetHL type.

This should be enough to make the minimal version work, although we might need to make additional changes for it to also work with codegen and LSP.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions