Skip to content
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

rust: add support for imported functions #782

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

Conversation

axic
Copy link
Member

@axic axic commented Apr 7, 2021

No description provided.

@@ -617,6 +619,11 @@ FizzyInstance* fizzy_instantiate(const FizzyModule* module,
set_success(error);
return wrap(instance.release());
}
catch (fizzy::instantiate_error const& e)
{
std::cout << e.what() << std::endl;
Copy link
Member Author

Choose a reason for hiding this comment

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

These was my error reporting prior to us adding proper support 😅

}
}

fn create_function_import_list(
Copy link
Member Author

Choose a reason for hiding this comment

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

Still need to figure out what is the best API defining host functions, but at least this semi-finished translation layer works.

@codecov
Copy link

codecov bot commented Apr 7, 2021

Codecov Report

Merging #782 (8763a7f) into master (2bd08ab) will decrease coverage by 0.70%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #782      +/-   ##
==========================================
- Coverage   99.27%   98.57%   -0.71%     
==========================================
  Files          88        2      -86     
  Lines       13296     1053   -12243     
==========================================
- Hits        13200     1038   -12162     
+ Misses         96       15      -81     
Flag Coverage Δ
rust 98.57% <100.00%> (+0.09%) ⬆️
spectests ?
unittests ?
unittests-32 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bindings/rust/src/lib.rs 98.84% <100.00%> (+0.07%) ⬆️
lib/fizzy/capi.cpp
lib/fizzy/instantiate.cpp
test/utils/hex.hpp
lib/fizzy/asserts.cpp
test/unittests/utf8_test.cpp
test/unittests/execute_death_test.cpp
test/unittests/typed_value_test.cpp
test/utils/hex.cpp
test/unittests/parser_expr_test.cpp
... and 77 more

@axic axic changed the base branch from master to rust-test May 23, 2022 21:18
@axic axic mentioned this pull request May 24, 2022
16 tasks
Base automatically changed from rust-test to master May 24, 2022 10:08
@axic axic force-pushed the rust-host-funcs branch 2 times, most recently from aff29d7 to f38b6ea Compare May 27, 2022 15:59
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.

1 participant