Skip to content

Commit

Permalink
Update submodule + Wasm-opt binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingTil committed Feb 24, 2024
1 parent de89214 commit 44c2648
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
comrak = "0.20.0"
comrak = "0.21.0"
gloo-utils = "0.2.0"
include_dir = "0.7.3"
once_cell = "1.17.1"
Expand Down
15 changes: 14 additions & 1 deletion build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Set option to exit on any error
set -e

# Install binaryen
sudo apt install binaryen

# Get Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Expand All @@ -12,8 +15,11 @@ source $HOME/.cargo/env
# Add wasm target
rustup target add wasm32-unknown-unknown

# Get cargo binstall
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

# Get trunk
cargo install --locked trunk
cargo binstall trunk

# Clean the project
trunk clean
Expand All @@ -30,3 +36,10 @@ cp -r $ROOT_DIR/fractal_rust/dist/* $ROOT_DIR/src/public/project_code/fractal_ru
# Then build the main project
cd $ROOT_DIR
trunk build --release

# Find all .wasm files in the current directory and subdirectories
find dist/ -name "*.wasm" | while read wasm_file; do
# Execute wasm-opt command on each file
wasm-opt -Oz -o "$wasm_file" "$wasm_file"
done

2 changes: 1 addition & 1 deletion fractal_rust
Submodule fractal_rust updated 5 files
+184 −194 Cargo.lock
+6 −3 Cargo.toml
+ fractal.webp
+65 −47 src/lib.rs
+7 −10 src/shader.wgsl
2 changes: 1 addition & 1 deletion src/components/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ pub fn ProjectPost(props: &ProjectCardProps) -> Html {
<h1 class="text-foreground-primary text-4xl font-bold mb-2">
{title.clone()}
</h1>
<h3 class="text-foreground-secondary text-2xl font-bold">
<h3 class="text-foreground-secondary text-2xl font-bold mb-2">
{tagline.clone()}
</h3>
<BadgesStrip tags={tags.clone()} scale={None} />
Expand Down

0 comments on commit 44c2648

Please sign in to comment.