Discard Executor (#1855)

closes #622 

Pros:
* simpler interface, just functions:
`create_runtime_from_artifact_bytes()` and `execute_artifact()`

Cons:
* extra overhead of constructing executor semantics each time

I could make it a combination of
* `create_runtime_config(params)` (such that we could clone the
constructed semantics)
* `create_runtime(blob, config)`
* `execute_artifact(blob, config, params)`

Not sure if it's worth it though.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
Julian EagerandBastian Köcher authored and GitHub committed 2023-10-14 23:06:00 +02:00
1 parent 7c87d61f5a
commit 9f7656df15
5 files changed
+77 -87

No files matched your search

@@ -33,6 +33,7 @@ pub(crate) fn weight_witness_warning(
if dev_mode {
return
}
let CallWeightDef::Immediate(w) = &method.weight else { return };
let partial_warning = Warning::new_deprecated("UncheckedWeightWitness")
@@ -64,6 +65,7 @@ pub(crate) fn weight_constant_warning(
if dev_mode {
return
}
let syn::Expr::Lit(lit) = weight else { return };
let warning = Warning::new_deprecated("ConstantWeight")