Skip to content

Update Rust code generation to produce the jet environment separately#334

Open
ivanlele wants to merge 1 commit intoBlockstreamResearch:masterfrom
ivanlele:feature/separate-env-from-jet-trait
Open

Update Rust code generation to produce the jet environment separately#334
ivanlele wants to merge 1 commit intoBlockstreamResearch:masterfrom
ivanlele:feature/separate-env-from-jet-trait

Conversation

@ivanlele
Copy link

Generates a jet implementation for the updated jet trait introduced in BlockstreamResearch/rust-simplicity#351

@ivanlele
Copy link
Author

haven't touched Haskell in two years, @claude was very helpful with this PR

@apoelstra
Copy link
Collaborator

In 03feaa3:

I think we should drop the rustJetEnvImpl entirely -- this generates a short block like impl JetEnvironment for BitcoinEnv { ... } but (a) it's short, and (b) neither the BitcoinEnv struct nor the JetEnvironment trait are autogenerated.

So let's just get rid of the impl entirely, or rather, move it to normal non-generated rust-simplicity code.

@ivanlele ivanlele force-pushed the feature/separate-env-from-jet-trait branch from 03feaa3 to 2ee52e3 Compare March 24, 2026 16:56
@ivanlele
Copy link
Author

In 03feaa3:

I think we should drop the rustJetEnvImpl entirely -- this generates a short block like impl JetEnvironment for BitcoinEnv { ... } but (a) it's short, and (b) neither the BitcoinEnv struct nor the JetEnvironment trait are autogenerated.

So let's just get rid of the impl entirely, or rather, move it to normal non-generated rust-simplicity code.

It should be clearer now. I've also updated BlockstreamResearch/rust-simplicity#351 accordingly

@apoelstra
Copy link
Collaborator

Awesome, looks good. I tested with rust-simplicity that this seems to work (there are no syntax errors at least :P)

Copy link
Collaborator

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 2ee52e3; successfully ran local tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants