refactor(core): introduce wren-core-base
module to collect the common structs and utilities
#1003
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
close #1000
Description
To reduce the maintenance cost of the manifest struct, I tried to unify the structs for both Rust and Python. The new module,
wren-core-base
, collects the common utilities or structs for the wren core-related module.wren-manifest-macro
ModuleAll the manifest struct is defined using Rust macro (powered by
proc_macro
). Ifpython-binding
feature is enabled, thepyo3
attribute will be added for them and the required functions.wren-manifest-macro
is aproc-macro
library. Only be used bywren-core-base
.wren-core-base
ModuleI tried to minimize the dependency of the base module. It should only use serde-related or binding-related crates. The DataFusion-related behaviors shouldn't be defined here.