Skip to content

Conversation

@guibescos
Copy link
Contributor

@guibescos guibescos commented Aug 12, 2022

For one of the latest steps of the migration we're going to restrict the C code to the aggregation logic.
This requires exporting the function upd_aggregate from C to Rust. We're doing similar logic to exporting the c_entrypoint from oracle.c.

A subtle difficulty is that cargo test runs in the system architecture, so we need to compile upd_aggregate to this target as well. That's the goal of for_cargo_test/cpyth_test.c. This will allow using upd_aggregate in the tests.

Of course there's danger that our rust tests pass but our production code fails because they're compiling to different targets but this problem already existed with test_oracle.c which is also getting compiled to the system's target. Integration tests (currently pytest) should pick this up.

@guibescos guibescos marked this pull request as ready for review August 12, 2022 20:38
@guibescos guibescos merged commit 76e982d into main Aug 15, 2022
@guibescos guibescos deleted the export-upd branch August 15, 2022 15:56
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.

3 participants