Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate distributing a non-WASM build #182

Open
mdaines opened this issue Aug 2, 2023 · 2 comments
Open

Investigate distributing a non-WASM build #182

mdaines opened this issue Aug 2, 2023 · 2 comments

Comments

@mdaines
Copy link
Owner

mdaines commented Aug 2, 2023

It's not possible to use WASM in some environments. For example, because of a Content Security Policy.

Emscripten can build a JavaScript-only version of Viz.js by using the setting WASM=0, so this seems to be mainly a matter of how to structure the build, and publish such a package.

@lborgman
Copy link

lborgman commented Oct 7, 2024

Did you try this?

@mdaines
Copy link
Owner Author

mdaines commented Oct 14, 2024

@lborgman Yes, thank you for reminding me. I took another look at this recently.

Emscripten has a setting that will output a fallback JS file for browsers than don't support WebAssembly (WASM=2). I was able to get Graphviz/Viz.js to build using this setting and successfully render graphs with the fallback.

It seems like a reasonable option, but I need to sort out how it would be packaged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants