You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
emscripten has traditionally been configured by a config file
in the current users home directory. emsdk has an --embedded option
that puts the config file within the SDK itself. This is useful for
users who have multiple emscripten installations and/or checkout and
want to have different configuration file for each one.
We should search for .emscripten by default alongside the emscripten
source code, and use the local configuration if found. This will allow
emsdk and other packagers to ship config files inside the emscripten
directory. emsdk and other packages don't need or want a user config
file since they tend to package things in known paths.
The plan is to move towards embedded config (and cache for that matter)
in several stages:
Switch emsdk --embedded to store the config in the emscripten folder
directly rather than in the emsdk dir. This will allow a different
config for each emscripten version.
Have emscripten, by default, look for a local config file.
Make --embedded the default for emsdk.
Stop exporting EM_CONFIG in emsdk (since the config can be found
automatically now).
Have emscripten write the "new user" config file locally by default.
Default to a local "cache" directory in emscripten.
Do we want to support the case where the emscripten directory is read-only? Obviously by default for most users it will be fine to e.g. have a RO image or directory with an embedded config. We could force users who want a custom config to build their own SDK directory (even if it's just by copying from a prebuilt image), or we could allow some way of overriding (I guess --em-config still works?)
emsdk users: they have write access the emscripten tree and always want full embedded config. Doesn't make sense to use $HOME here at all. config/cache/etc should be SDK-local.
emscripten developers using git. Also have full write access. Also don't want to store config in home dir.
brew/debian/other packaged users. No write access. But also SDK should come preconfigured. So embedded read-only config makes sense, but cache in $HOME.
There might be a 4th category, which is those who package their own SDK which includes emscripten, or manage multiple installations (e.g. on CI). they might want to support installation of emscripten itself or their own SDK to readonly directories ("installation" can be a much heavier-weight operation with something like Unity that is bigger and doesn't release as frequently as we do).
I think this is actually probably the same as 3) though.
Some positive feedback on this work from the mailing list: No environment variables or additions to the PATH variables needed, only the absolute paths to the toolchain tools. It's perfect now :)
Activity
Support for embedded .emscripten config
Support for embedded .emscripten config
Support for embedded .emscripten config
Support for embedded .emscripten config (#9547)
dschuff commentedon Oct 10, 2019
Do we want to support the case where the emscripten directory is read-only? Obviously by default for most users it will be fine to e.g. have a RO image or directory with an embedded config. We could force users who want a custom config to build their own SDK directory (even if it's just by copying from a prebuilt image), or we could allow some way of overriding (I guess --em-config still works?)
sbc100 commentedon Oct 11, 2019
Yes, we do need to consider RO directories.
I see three main use cases:
sbc100 commentedon Oct 11, 2019
Did I miss any?
Use embedded configuration by default
Support emsdk --embedded mode
Use embedded configuration by default
Support emsdk --embedded mode
Support emsdk --embedded mode (#10935)
Use embedded configuration by default
Use embedded configuration by default
Use embedded configuration by default
5 remaining items
Default to storing emscripten cache locally
Default to storing emscripten cache locally
Default to storing emscripten cache locally
Default to storing emscripten cache locally (#11126)
dschuff commentedon May 11, 2020
There might be a 4th category, which is those who package their own SDK which includes emscripten, or manage multiple installations (e.g. on CI). they might want to support installation of emscripten itself or their own SDK to readonly directories ("installation" can be a much heavier-weight operation with something like Unity that is bigger and doesn't release as frequently as we do).
I think this is actually probably the same as 3) though.
sbc100 commentedon May 11, 2020
Yeah I think all "read-only" installs come under "3"... Maybe I'm missing how would something like unity would differ from homebrew?
sbc100 commentedon May 21, 2020
Some positive feedback on this work from the mailing list:
No environment variables or additions to the PATH variables needed, only the absolute paths to the toolchain tools. It's perfect now :)By default, store ports inside the cache
By default, store ports inside the cache
Use embedded configuration by default
By default, store ports inside the cache (#11270)
Use embedded configuration by default (#472)
Support for embedded .emscripten config (emscripten-core#9547)
Use embedded configuration by default (#472)