evmc icon indicating copy to clipboard operation
evmc copied to clipboard

Add rust binding client

Open CaptainVincent opened this issue 4 years ago • 1 comments

Part of #476.

  1. Add rust client binding base on EVMC 7.4.0.
  2. ~~f8466c7 is a temporary workaround for evmc_host_context cannot be instantiated.~~ cherry-pick b0c40df4f3ced6cac21bd45328334ba1ecd924a6 from #524
  3. Update all files' license to Apache 2.0.

I am not yet add any unit test for this module ~~but it work fine with Hera.~~ ~~https://github.com/second-state/rust-ssvm/tree/upgrade-evmc-client~~ ~~Use this branch follow original example section.~~
~~(I add hera as submodule, replace build.rs to build and link libhera.so and update dummy host function in example)~~ but it already applied on https://github.com/second-state/rust-ssvm/tree/evmc-7 could run example with SSVM.

CaptainVincent avatar Jun 26 '20 07:06 CaptainVincent

I saw some ci issues come from my evmc_host_context workaround as below.

  1. /home/circleci/project/include/evmc/evmc.h:164:8: error: struct has no members [-Werror=pedantic]
  2. error: empty struct is a GNU extension [-Werror,-Wgnu-empty-struct]

struct evmc_host_context {};

  1. Code format
-struct evmc_host_context {};
+struct evmc_host_context
+{
+};
  1. bindings-go-latest fail reason unknown.

I think I need some suggestions for pass these tests. Thanks.

CaptainVincent avatar Jun 26 '20 07:06 CaptainVincent