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

Set JS runtime config from CLI for static modules #736

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

jeffcharles
Copy link
Collaborator

Description of the change

Sets the JS runtime config for static Javy modules from the Javy CLI. Specifically it uses a WASI environment variable to pass the config bitflags when Wizer runs the initialization function. It uses the same Config:all() call as was in the main file for Core to initialize the configuration in the CLI.

Why am I making this change?

See #702. Specifically for the -J flags, I need a way to set the JS runtime configuration from the CLI.

I opted to use an environment variable because I need some way to pass the configuration into the initializer function. I'm open to other suggestions. Presumably we could use the same approach when emitting the provider for the emit provider command.

I'm opting not to bump the provider version in this PR because we're not changing the provider.

Checklist

  • I've updated the relevant CHANGELOG files if necessary. Changes to javy-cli and javy-core do not require updating CHANGELOG files.
  • I've updated the relevant crate versions if necessary. Versioning policy for library crates
  • I've updated documentation including crate documentation if necessary.

@jeffcharles jeffcharles merged commit eb7817e into main Aug 27, 2024
7 checks passed
@jeffcharles jeffcharles deleted the jc.set-runtime-config-from-cli branch August 27, 2024 13:54
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

Successfully merging this pull request may close these issues.

2 participants