-
Notifications
You must be signed in to change notification settings - Fork 19
Jets FFI #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jets FFI #47
Conversation
Ealier this was a dev dependency because it was only used for testing
This module is assuming bitcoin jets that are not implemented/unspecified. Comment this out, this will be renabled later in a separate PR after we have all the jets
Add a new function to_type that outputs Type
This commit also does a couple other things. 1) Makes modification to bitmachine that allows to skip assertions in test cfg. Useful for creating states of bitmachine wihtout creating a program. 2) Removes all existing jets that were implemented in rust. This is really not a good idea because the definitions of certain jets are hard to emulate and have special corner/wierd cases. We are best to directly use the FFI bindings. 3) Adds test for checking FFI with/without env
51fffed to
8c622d4
Compare
|
I like the design. Adding My only real remark is that we should separate the C jet pointers in Besides that, maybe we can remove the unsafe code in |
Rename CTxEnv -> CElementsTxEnv Add CTxEnv as a enum to capture all environments
|
Overall this looks great. I think we should break it apart into a couple smaller PRs. In particular the 1st and 3rd and 5th commits (update underlying Simplicity library; add Then 479472b and 8de5acc and c33c3dc (which add C getters/setters for the structs; adds the actual jet FFI bindings; tweak the enviroment pointers) could be a separate PR which we could iterate on which does the actual FFI binding. Then the remaining PRs would be a "actually use the FFI bindings in this library" PR, which initially we'd just use as a reference while we debated the other ones. I've only briefly skimmed this. I have a few comments but my overall impression is that this PR is way too big to effectively review :). |
|
@apoelstra. Cleaned some code, Fixed CI, and split into #48, #49, and #50 |
|
Thank you!! Let's close this one then. |
This PR aims to settle on a structure for automatically generated files for jets execution. As per the current design, we would need the files:
The tests here would fail because we are updating simplicity and a lot of jets are implemented. This should PR should pass once we have all the generated files. The goal is to get an ACK on the design.