Replies: 1 comment
-
I commented in #3659 showing how I accomplished it.
The bindings are still not perfect though, because runtime modules require a different binding format. This results in different code, or unoptimized code when using only parts of a module for versions that try to include a package manager like NPM as an optional build. I'm closing this though, because this answered my question. |
Beta Was this translation helpful? Give feedback.
-
I want to
Is there a good way to do this already?
I noticed when searching, it is possible to inline ESM modules by creating blobs in the browser then linking to them. I also think inlining the bundle as a &'static str might be a solution. (and there was an issue opened related to supporting that, but I don't think there was progress made)
I just want to create bindings that do not require someone using them to use a bundler. I think the easiest way at the moment is to just use a CDN, (I wrote bindings for someone else's question using a CDN as an example) but I would prefer to have them injected from rust because it seems more reliable.
Beta Was this translation helpful? Give feedback.
All reactions