-
Notifications
You must be signed in to change notification settings - Fork 124
Enable ScriptBuilder to assemble account component libraries #1756
Copy link
Copy link
Labels
rustIssues that affect or pull requests that update Rust codeIssues that affect or pull requests that update Rust code
Milestone
Description
Based on the discussion in #1734, we should:
- Add a newtype wrapper:
pub struct AccountComponentCode(Library). We'd also want this to be convertible from and toLibrary. - Change
AccountComponentto containAccountComponentCodeinstead ofLibrary. This is so we can return that type from its getters instead ofLibrary. Otherwise, that type would internally be used as aLibrary. - Add
ScriptBuilder::compile_component_code, which may look like this:
pub fn compile_component_code(
self,
component_path: impl AsRef<str>, // <- e.g. `my_account::my_module`
component_code: impl AsRef<str>, // <- the MASM code
) -> Result<AccountComponentCode, ScriptBuilderError> { ... }- Replace usages of
TransactionKernel::assembler(and its variants) withScriptBuilder. The goal is to be able to remove all variants ofTransactionKernel::assemblerafter this. - Rename
ScriptBuilder(andScriptBuilderError) accordingly. Potential names:TransactionAssemblerProtocolAssemblerCodeBuilder
- Potentially rename
compile_*methods intoparse_*, to be in line with theCompiletrait rename toParsefrom Miden VM - though some discussion may be needed.
Original discussion: #1734 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
rustIssues that affect or pull requests that update Rust codeIssues that affect or pull requests that update Rust code