Skip to content

Commit

Permalink
feat: add import&export macro and serialized data copy pass (#157)
Browse files Browse the repository at this point in the history
* feat: add #[callable_point] proc macro

* feat: add #[dynamic_link] proc macro

* fix: publiclize the memory module

using in #[callable_point] and #[dynamic_link]

* feat: add re-exports #[callable_point] and #[dynamic_link]

* feat: make tuple return by #[callable_point] and #[dynamic_link]

* feat: add copies region of args and return between env

The actual copy calls are executed by wasmvm.

* fix: disable return the tuple type

#156

* refactor: improve error handling with proc_macro_error

* feat: update sample contract for dynamic_link

* test: add unit test for copy_region_vals_between_env

* test: add integration test for callable_point macro

proc_macro cannot do normal unit tests.
Instead, it is replaced by the contract's integration test.

* test: add integration test for dynamic_link macro

proc_macro cannot do normal unit tests.
Instead, it is replaced by the contract's integration test.

* fix: unlimit the target_arch of memory module

When running the test with dynamic_link proc_macro,
it should be able to compile the memory module on other architectures as well.

* chore: cargo fmt

* chore: update cargo.lock for contracts

* fix: fix maximum size

* chore: cargo clippy

* test: add module name test condition for dynamic_link macro

* chore: fix reverted unused warnings in the contracts

* chore: fix typo

* chore: remove unnecessary prefix

* refactor: improve abort message

* refactor: change to use quote! and proc_macro2

proc_macro2 allows the implementation of separate modules.

* chore: update cargo.lock

* chore: disable clippy warning for abort_by!

* fix: add disallowed type by parameter

see: #152

* chore:cargo fmt

* chore: avoid false-positive of clippy

* chore: again avoid clippy

* chore: fix typo
  • Loading branch information
Jiyong Ha authored Mar 31, 2022
1 parent 5732a33 commit 5cfcf14
Show file tree
Hide file tree
Showing 35 changed files with 2,718 additions and 32 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions contracts/burner/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions contracts/crypto-verify/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions contracts/dynamic-callee-contract/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
integration-test = "test --test integration"
Loading

0 comments on commit 5cfcf14

Please sign in to comment.