Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Check that Substrate/Polkadot fully compiles using distributed compilation #52

@Xanewok

Description

@Xanewok

The whole point of this PoC/fork is to speed up the Substrate/Polkadot builds, so we need to ensure that those project builds using sccache first.

Substrate compilation is blocked on #51 and on the following patch to the libp2p-wasm-ext crate:

diff --git a/transports/wasm-ext/src/lib.rs b/transports/wasm-ext/src/lib.rs
index 8c0e5012..f5be31f4 100644
--- a/transports/wasm-ext/src/lib.rs
+++ b/transports/wasm-ext/src/lib.rs
@@ -136,6 +136,11 @@ pub mod ffi {
     }
 }
 
+// Include the file in the dep-info, so that build accelerators such as sccache
+// can correctly prepare the required input files in order to compile the crate.
+#[cfg(feature = "websocket")]
+const _: &'static str = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/websockets.js"));
+
 /// Implementation of `Transport` whose implementation is handled by some FFI.
 pub struct ExtTransport {
     inner: SendWrapper<ffi::Transport>,

In general, we need a mechanism to track required files in the dep-info directly (rust-lang/rust#84029) but the diff above works around that by using an include_str hack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions