From bd034e360d036d9634d8526a6eea73979b3ad9e1 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Mon, 28 Aug 2023 22:30:46 +0100 Subject: refactor(runtime): factor out code between build.rs and worker.rs (#20299) Adds `runtime/shared.rs` which is imported by both `build.rs` and the rest of the crate, containing utilities used by both. Renames the `snapshot_from_snapshot` feature to `exclude_runtime_main_js` since that's what it does and it's relevant outside of snapshotting when `__runtime_js_sources` is specified. --- runtime/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/lib.rs') diff --git a/runtime/lib.rs b/runtime/lib.rs index 248ef94de..bc49a2fef 100644 --- a/runtime/lib.rs +++ b/runtime/lib.rs @@ -34,6 +34,8 @@ pub mod web_worker; pub mod worker; mod worker_bootstrap; -pub use worker::runtime; pub use worker_bootstrap::BootstrapOptions; pub use worker_bootstrap::WorkerLogLevel; + +mod shared; +pub use shared::runtime; -- cgit v1.2.3