feat(wasm): supporting cached dependencies #3937
Beanow
started this conversation in
Ideas & suggestions
Replies: 1 comment
-
Are you having performance problems running the compiler without caching? How long is it taking to run for you? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently the WASM compiler only supports a root package without any dependencies.
The playground works around this by acting like the contents of
gleam_stdlib
are submodules of the package being compiled, rather than dependencies. This approach no longer works when you're trying to use more dependencies than one.Suggested changes
/lib
path in a similar way to thegleam-cli
compiler.gleam.toml
config.This would be a backwards-compatible incremental feature. And because this would reduce the "drift" between
gleam-cli
andgleam-wasm
should not introduce any controversial quirks specific to the WASM version.Alternative
One could also attempt to "build project" with the WASM compiler.
So rather than loading modules from build cache, compiling dependencies from a package source.
This is a larger effort though and seems more in scope for a breaking change to the WASM compiler.
Besides, you'd still want to support build caching and need to support loading the config file in that case.
Beta Was this translation helpful? Give feedback.
All reactions