Skip to content

Commit

Permalink
Add build in bundle behind autogate
Browse files Browse the repository at this point in the history
Co-authored-by: Hood Chatham <[email protected]>
  • Loading branch information
garrettgu10 and hoodmane committed Aug 5, 2024
1 parent 61fbfeb commit e556b73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/pyodide/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package(default_visibility = ["//visibility:public"])

load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
Expand Down
4 changes: 3 additions & 1 deletion src/workerd/server/workerd-api.c++
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,9 @@ void WorkerdApi::compileModules(
KJ_REQUIRE(featureFlags.getPythonWorkers(),
"The python_workers compatibility flag is required to use Python.");
// Inject Pyodide bundle
modules->addBuiltinBundle(KJ_ASSERT_NONNULL(pyodideBundleGlobal), kj::none);
if(util::Autogate::isEnabled(util::AutogateKey::PYODIDE_LOAD_EXTERNAL)) {
modules->addBuiltinBundle(KJ_ASSERT_NONNULL(pyodideBundleGlobal), kj::none);
}
// Inject pyodide bootstrap module (TODO: load this from the capnproto bundle?)
{
auto mainModule = confModules.begin();
Expand Down

0 comments on commit e556b73

Please sign in to comment.