From d110c2db7c3bff1892493db937d00890854ae4e8 Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Sun, 8 May 2022 09:09:50 +0200 Subject: [PATCH] Move build script to separate directory This work-arounds a bug in Naersk which makes Naersk not run the build script when it's in standard location (build.rs). --- Cargo.toml | 1 + build.rs => buildSrc/build.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename build.rs => buildSrc/build.rs (94%) diff --git a/Cargo.toml b/Cargo.toml index 3e42df8..9097f42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" authors = ["Konrad Borowski "] edition = "2021" license = "AGPL-3.0-or-later" +build = "buildSrc/build.rs" [dependencies] ammonia = "3.1.1" diff --git a/build.rs b/buildSrc/build.rs similarity index 94% rename from build.rs rename to buildSrc/build.rs index 52cacf9..4e222a8 100644 --- a/build.rs +++ b/buildSrc/build.rs @@ -33,7 +33,7 @@ fn main() -> serde_json::Result<()> { let Manifest { index: Index { file, css: [css] }, - } = serde_json::from_str(include_str!("dist/manifest.json"))?; + } = serde_json::from_str(include_str!("../dist/manifest.json"))?; println!("cargo:rustc-env=ENTRY_FILE_PATH={}", file); println!("cargo:rustc-env=CSS_PATH={}", css); }