diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-02-23 16:10:38 +0000 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-02-23 16:13:41 +0000 |
| commit | 3bc9fdbc0c55f29a851073e348d6dcaa19234ab8 (patch) | |
| tree | a40413830562c49ac20b3b67be565a3a58425048 | |
| parent | build(add a toolchain.toml file) (diff) | |
| download | sl0ppij-3bc9fdbc0c55f29a851073e348d6dcaa19234ab8.tar.gz sl0ppij-3bc9fdbc0c55f29a851073e348d6dcaa19234ab8.tar.xz sl0ppij-3bc9fdbc0c55f29a851073e348d6dcaa19234ab8.zip | |
build(simplify and fix build system, removing the binary assets)
| -rw-r--r-- | assets/plugins/status-bar.wasm | bin | 436470 -> 0 bytes | |||
| -rw-r--r-- | assets/plugins/strider.wasm | bin | 527289 -> 0 bytes | |||
| -rwxr-xr-x | build-all.sh | 4 | ||||
| -rw-r--r-- | build.rs | 2 | ||||
| -rw-r--r-- | rust-toolchain (renamed from rust-toolchain.toml) | 4 | ||||
| -rw-r--r-- | src/common/install.rs | 2 | ||||
| -rw-r--r-- | src/main.rs | 8 |
7 files changed, 10 insertions, 10 deletions
diff --git a/assets/plugins/status-bar.wasm b/assets/plugins/status-bar.wasm Binary files differdeleted file mode 100644 index 1b82a5c0..00000000 --- a/assets/plugins/status-bar.wasm +++ /dev/null diff --git a/assets/plugins/strider.wasm b/assets/plugins/strider.wasm Binary files differdeleted file mode 100644 index 46f272eb..00000000 --- a/assets/plugins/strider.wasm +++ /dev/null diff --git a/build-all.sh b/build-all.sh index 41f90870..67e36071 100755 --- a/build-all.sh +++ b/build-all.sh @@ -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 $@
\ No newline at end of file @@ -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()); } diff --git a/rust-toolchain.toml b/rust-toolchain index fa54aff1..89459e2c 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain @@ -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"] diff --git a/src/common/install.rs b/src/common/install.rs index 4e3f5c5d..bd11e8f9 100644 --- a/src/common/install.rs +++ b/src/common/install.rs @@ -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 } diff --git a/src/main.rs b/src/main.rs index 27036e3d..82881219 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 { |
