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
|
||||
echo "Optimising WASM executables (4/5)..."
|
||||
cd ../..
|
||||
wasm-opt -O target/wasm32-wasi/release/status-bar.wasm -o assets/plugins/status-bar.wasm
|
||||
wasm-opt -O target/wasm32-wasi/release/strider.wasm -o assets/plugins/strider.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 target/strider.wasm
|
||||
echo "Building zellij (5/5)..."
|
||||
cargo build $@
|
2
build.rs
2
build.rs
@ -24,7 +24,7 @@ fn main() {
|
||||
clap_app.gen_completions(BIN_NAME, Shell::Fish, &out_dir);
|
||||
|
||||
// Clear Default Plugins and Layouts
|
||||
for entry in WalkDir::new("assets/") {
|
||||
for entry in WalkDir::new("assets/layouts") {
|
||||
let entry = entry.unwrap();
|
||||
println!("cargo:rerun-if-changed={}", entry.path().to_string_lossy());
|
||||
}
|
||||
|
@ -3,6 +3,6 @@
|
||||
# can be further pinned eg:
|
||||
# date: "stable-2020-07-10"
|
||||
# version: "nightly-1.0.0"
|
||||
channel = "stable"
|
||||
channel = "1.49.0"
|
||||
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();
|
||||
$(
|
||||
assets.insert($path, include_bytes!(concat!("../assets/", $path)).to_vec());
|
||||
assets.insert($path, include_bytes!(concat!("../", $path)).to_vec());
|
||||
)+
|
||||
assets
|
||||
}
|
||||
|
@ -32,10 +32,10 @@ pub fn main() {
|
||||
let project_dirs = ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap();
|
||||
let data_dir = project_dirs.data_dir();
|
||||
let assets = asset_map! {
|
||||
"plugins/status-bar.wasm",
|
||||
"plugins/strider.wasm",
|
||||
"layouts/default.yaml",
|
||||
"layouts/strider.yaml"
|
||||
"target/status-bar.wasm",
|
||||
"target/strider.wasm",
|
||||
"assets/layouts/default.yaml",
|
||||
"assets/layouts/strider.yaml"
|
||||
};
|
||||
|
||||
for (path, bytes) in assets {
|
||||
|
Loading…
Reference in New Issue
Block a user