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

Unify static and dynamic codegen #793

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Conversation

jeffcharles
Copy link
Collaborator

Description of the change

The dynamic code generator has been augmented to handle static code generation and the original static code generator has been deleted. The bin build for javy-core has also been deleted since it's no longer necessary. I've also changed the way we send the runtime configuration into the provider to use stdin instead of an environment variable.

I've divided the PR into two commits, one moves the generator into mod.rs without changes, and the second commit makes the actual changes. I would suggest looking at the second commit to see the changes to the generator.

Why am I making this change?

Part of #768. To simplify plugin development, we only want plugin developers to have to build a Wasm cdylib as opposed to a cdylib and a binary Wasm module. Unifying the code generators into one code generator means we only need the cdylib now.

The change to how we propagate the runtime configuration into the provider is because I noticed that the value I was setting for the JS_RUNTIME_CONFIG environment variable was unexpectedly persisting across invocations of initialize_runtime. Using stdin appears to avoid the issue.

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 2ac7f2c into main Oct 24, 2024
7 checks passed
@jeffcharles jeffcharles deleted the jc.unify-static-and-dynamic-2 branch October 24, 2024 13:45
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