mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-22 22:26:54 +03:00
build(simplify and fix build system, removing the binary assets)
This commit is contained in:
parent
4d21e8f357
commit
3bc9fdbc0c
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ cd ../strider
|
|||||||
cargo build --release
|
cargo build --release
|
||||||
echo "Optimising WASM executables (4/5)..."
|
echo "Optimising WASM executables (4/5)..."
|
||||||
cd ../..
|
cd ../..
|
||||||
wasm-opt -O target/wasm32-wasi/release/status-bar.wasm -o assets/plugins/status-bar.wasm
|
wasm-opt -O target/wasm32-wasi/release/status-bar.wasm -o target/status-bar.wasm
|
||||||
wasm-opt -O target/wasm32-wasi/release/strider.wasm -o assets/plugins/strider.wasm
|
wasm-opt -O target/wasm32-wasi/release/strider.wasm -o target/strider.wasm
|
||||||
echo "Building zellij (5/5)..."
|
echo "Building zellij (5/5)..."
|
||||||
cargo build $@
|
cargo build $@
|
2
build.rs
2
build.rs
@ -24,7 +24,7 @@ fn main() {
|
|||||||
clap_app.gen_completions(BIN_NAME, Shell::Fish, &out_dir);
|
clap_app.gen_completions(BIN_NAME, Shell::Fish, &out_dir);
|
||||||
|
|
||||||
// Clear Default Plugins and Layouts
|
// Clear Default Plugins and Layouts
|
||||||
for entry in WalkDir::new("assets/") {
|
for entry in WalkDir::new("assets/layouts") {
|
||||||
let entry = entry.unwrap();
|
let entry = entry.unwrap();
|
||||||
println!("cargo:rerun-if-changed={}", entry.path().to_string_lossy());
|
println!("cargo:rerun-if-changed={}", entry.path().to_string_lossy());
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
# can be further pinned eg:
|
# can be further pinned eg:
|
||||||
# date: "stable-2020-07-10"
|
# date: "stable-2020-07-10"
|
||||||
# version: "nightly-1.0.0"
|
# version: "nightly-1.0.0"
|
||||||
channel = "stable"
|
channel = "1.49.0"
|
||||||
components = [ "rustfmt", "rust-src", "clippy", "rust-analysis"]
|
components = [ "rustfmt", "rust-src", "clippy", "rust-analysis"]
|
||||||
# targets = [ ]
|
targets = ["wasm32-wasi"]
|
@ -4,7 +4,7 @@ macro_rules! asset_map {
|
|||||||
{
|
{
|
||||||
let mut assets = std::collections::HashMap::new();
|
let mut assets = std::collections::HashMap::new();
|
||||||
$(
|
$(
|
||||||
assets.insert($path, include_bytes!(concat!("../assets/", $path)).to_vec());
|
assets.insert($path, include_bytes!(concat!("../", $path)).to_vec());
|
||||||
)+
|
)+
|
||||||
assets
|
assets
|
||||||
}
|
}
|
||||||
|
@ -32,10 +32,10 @@ pub fn main() {
|
|||||||
let project_dirs = ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap();
|
let project_dirs = ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap();
|
||||||
let data_dir = project_dirs.data_dir();
|
let data_dir = project_dirs.data_dir();
|
||||||
let assets = asset_map! {
|
let assets = asset_map! {
|
||||||
"plugins/status-bar.wasm",
|
"target/status-bar.wasm",
|
||||||
"plugins/strider.wasm",
|
"target/strider.wasm",
|
||||||
"layouts/default.yaml",
|
"assets/layouts/default.yaml",
|
||||||
"layouts/strider.yaml"
|
"assets/layouts/strider.yaml"
|
||||||
};
|
};
|
||||||
|
|
||||||
for (path, bytes) in assets {
|
for (path, bytes) in assets {
|
||||||
|
Loading…
Reference in New Issue
Block a user