Do you think you'll use WASM as a target for the custom scripts in code form?
Zed has an interesting WASM-based extension APIN that makes it really easy to write extensions in Rust, it might be worth checking out for this project.
Custom code will be compiled to Wasm so it's sandboxed for security purposes. First-party code that ships with Graphite, or perhaps trusted authors in the future, will be able to use non-Wasm native code on desktop. But Wasm is still a very high percentage of native speed.