Currently the compiled wasm code is loaded dynamically with an encoded string in lib.js. I believe you can replace that file and the init step in canvaskit.ts with a plain import if you are comfortable releasing a new version that is only compatible with deno 2.1+. I am mainly going off the information I see in this deno blogpost https://deno.com/blog/v2.1. It is possible that there is something more complicated about this module that will prevent this. At the very least though, it should remove an async init stage to canvas usage, which should help simplify usage.
Currently the compiled wasm code is loaded dynamically with an encoded string in lib.js. I believe you can replace that file and the init step in canvaskit.ts with a plain import if you are comfortable releasing a new version that is only compatible with deno 2.1+. I am mainly going off the information I see in this deno blogpost https://deno.com/blog/v2.1. It is possible that there is something more complicated about this module that will prevent this. At the very least though, it should remove an async init stage to canvas usage, which should help simplify usage.