Skip to content

Commit

Permalink
Merge pull request #1357 from KBVE/dev
Browse files Browse the repository at this point in the history
Staging refs/heads/dev into Main
  • Loading branch information
h0lybyte authored Jan 23, 2025
2 parents 22e1f90 + 5b3a339 commit d123b5b
Show file tree
Hide file tree
Showing 20 changed files with 112 additions and 13 deletions.
63 changes: 63 additions & 0 deletions docs/data/scripts/emscripten/install_emsdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash

EMSDK_DIR="$HOME/emsdk"

set -e

## Format

info() {
echo -e "\033[1;32m[INFO]\033[0m $1"
}

error() {
echo -e "\033[1;31m[ERROR]\033[0m $1" >&2
exit 1
}

## Pre Reqs.

if ! command -v git &> /dev/null; then
error "Git is not installed. Please install Git and try again."
fi

if ! command -v python3 &> /dev/null; then
error "Python 3 is not installed. Please install Python 3 and try again."
fi

## Clone

if [ -d "$EMSDK_DIR" ]; then
info "Emsdk directory already exists. Pulling the latest changes."
cd "$EMSDK_DIR"
git pull
else
info "Cloning the Emscripten SDK repository."
git clone https://github.com/emscripten-core/emsdk.git "$EMSDK_DIR"
cd "$EMSDK_DIR"
fi

info "Installing the latest Emscripten SDK."
./emsdk install latest

info "Activating the latest Emscripten SDK."
./emsdk activate latest

info "Setting up environment variables."
echo "source $EMSDK_DIR/emsdk_env.sh" >> ~/.bashrc
source "$EMSDK_DIR/emsdk_env.sh"

info "Verifying Emscripten installation."
if command -v emcc &> /dev/null; then
EMCC_VERSION=$(emcc --version | head -n 1)
info "Emscripten installed successfully: $EMCC_VERSION"
else
error "Emscripten installation failed. Please check the logs."
fi


# git clone https://github.com/emscripten-core/emsdk.git
# cd emsdk
#./emsdk install latest
#./emsdk activate latest
# source ./emsdk_env.sh
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@
<Fragment set:html={rating} />
</p> --> </div> <div class="text-sm text-neutral-800 dark:text-neutral-200 sm:ps-5"> <p>
Latest Commit by <a href="https://github.com/h0lybyte" class="font-bold underline text-cyan-600 dark:text-cyan-400"> h0lybyte </a>:
</p> <p><em>"Merge pull request #3775 from KBVE/beta
</p> <p><em>"Merge pull request #3810 from KBVE/beta

Preparing Release Branch"</em></p> <p>
On: <time datetime="2025-01-20T06:49:39Z"> 1/20/2025 </time> </p> <p>
View this commit on <a href="https://github.com/KBVE/kbve/commit/622a2d6e98c4a3572811fba05817597d7f28183a" class="underline text-blue-600 hover:text-blue-800 visited:text-purple-600">
On: <time datetime="2025-01-22T05:55:36Z"> 1/22/2025 </time> </p> <p>
View this commit on <a href="https://github.com/KBVE/kbve/commit/87c46abc147777004938a3d58cbc89c02b97d353" class="underline text-blue-600 hover:text-blue-800 visited:text-purple-600">
GitHub
</a>.
</p> </div> </div> </div> </div> </div> </div> <!-- Hero Image Section --> <div class="flex w-full"> <div class=""> <!--
Expand Down
25 changes: 25 additions & 0 deletions docs/journal/01-20/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,31 @@
</script> <!--Import the necessary Collapse and Overlay plugins--> <!--https://preline.co/plugins/html/collapse.html--> <!--https://preline.co/plugins/html/overlay.html--> <script src="/scripts/vendor/preline/collapse/index.js"></script> <script src="/scripts/vendor/preline/overlay/index.js"></script> <main class="astro-ouamjn2i"> <section class="py-6 sm:py-8 lg:py-12"> <div class="mx-auto max-w-screen-xl px-4 md:px-8"> <div class="grid gap-8 md:grid-cols-2 lg:gap-12"> <div> <div class="h-64 overflow-hidden rounded-lg shadow-lg md:h-auto"> <img class="h-full w-full object-cover object-center" src="https://images.unsplash.com/photo-1704189125621-55e8c6cfd166?crop=entropy&cs=srgb&fm=jpg&ixid=MnwzNjM5Nzd8MHwxfHJhbmRvbXx8fHx8fHx8fDE2ODE3NDg2ODY&ixlib=rb-4.0.3&q=85" alt="Daily Post Image from Upsplash" draggable="false"> </div> <div id="progress-mobile" class="fixed left-0 top-0 h-2 w-full bg-gradient-to-r from-orange-400/30 to-orange-400 md:hidden"></div> <div id="pin" class="mt-10 hidden space-y-4 md:block"> <div class="h-px w-full overflow-hidden bg-neutral-300 dark:bg-neutral-700"> <div id="progress" class="h-px w-full bg-gradient-to-r from-orange-400/30 to-orange-400"></div> </div> <p class="text-pretty text-sm font-light text-neutral-500">
Table of Contents:
</p> <div id="toc" class=""> <ul class="space-y-2 text-pretty text-base text-neutral-700 transition duration-300 dark:text-neutral-400"></ul> </div> </div> </div> <div class="md:pt-8"> <h1 class="mb-4 text-balance text-center text-2xl font-bold text-neutral-800 dark:text-neutral-200 sm:text-3xl md:mb-6 md:text-left"> January: 20 </h1> <article class="text-pretty text-lg text-neutral-700 dark:text-neutral-300"> <h2 id="notes">Notes</h2>
<h2 id="2025">2025</h2>
<ul>
<li>
<p><strong>President</strong></p>
<p>10:00AM</p>
<p>The new president is taking office, well I guess not really new but it is what it is.
I am wondering how the markets will react tomorrow, since they are closed today.</p>
</li>
<li>
<p><strong>GoDot</strong></p>
<p>09:05PM</p>
<p>Updating the rust ffi into the godot wasm build, going to try the first build and see where it goes from there.
The reference issue that I was using is here <a href="https://github.com/godot-rust/gdext/issues/438" rel="nofollow noopener noreferrer" target="_blank">438</a>.
The target will be using a <code>-z</code> flag , so we need to setup the nightly.</p>
<pre class="astro-code dracula" style="background-color:#282A36;color:#F8F8F2;overflow-x:auto;white-space:pre-wrap;word-wrap:break-word" tabindex="0" data-language="shell"><code><span class="line"></span>
<span class="line"><span style="color:#50FA7B">rustup</span><span style="color:#F1FA8C"> toolchain</span><span style="color:#F1FA8C"> install</span><span style="color:#F1FA8C"> nightly</span></span>
<span class="line"><span style="color:#50FA7B">rustup</span><span style="color:#F1FA8C"> component</span><span style="color:#F1FA8C"> add</span><span style="color:#F1FA8C"> rust-src</span><span style="color:#BD93F9"> --toolchain</span><span style="color:#F1FA8C"> nightly</span></span>
<span class="line"><span style="color:#50FA7B">rustup</span><span style="color:#F1FA8C"> target</span><span style="color:#F1FA8C"> add</span><span style="color:#F1FA8C"> wasm32-unknown-emscripten</span><span style="color:#BD93F9"> --toolchain</span><span style="color:#F1FA8C"> nightly</span></span>
<span class="line"></span>
<span class="line"></span></code></pre>
<p>Next we need to add the emscripten to our WSL instance!
For this, I created a custom script that we can invoke with <code>./tools/scripts/public/emscripten/install_emsdk.sh</code>.
We also want to make sure that the rustup has a wasm32 nightly added <code>rustup target add wasm32-unknown-emscripten --toolchain nightly</code></p>
</li>
</ul>
<h3 id="2024">2024</h3>
<ul>
<li>
Expand Down
13 changes: 12 additions & 1 deletion docs/journal/01-21/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,18 @@
</script> <!--Import the necessary Collapse and Overlay plugins--> <!--https://preline.co/plugins/html/collapse.html--> <!--https://preline.co/plugins/html/overlay.html--> <script src="/scripts/vendor/preline/collapse/index.js"></script> <script src="/scripts/vendor/preline/overlay/index.js"></script> <main class="astro-ouamjn2i"> <section class="py-6 sm:py-8 lg:py-12"> <div class="mx-auto max-w-screen-xl px-4 md:px-8"> <div class="grid gap-8 md:grid-cols-2 lg:gap-12"> <div> <div class="h-64 overflow-hidden rounded-lg shadow-lg md:h-auto"> <img class="h-full w-full object-cover object-center" src="https://images.unsplash.com/photo-1704189125621-55e8c6cfd166?crop=entropy&cs=srgb&fm=jpg&ixid=MnwzNjM5Nzd8MHwxfHJhbmRvbXx8fHx8fHx8fDE2ODE3NDg2ODY&ixlib=rb-4.0.3&q=85" alt="Daily Post Image from Upsplash" draggable="false"> </div> <div id="progress-mobile" class="fixed left-0 top-0 h-2 w-full bg-gradient-to-r from-orange-400/30 to-orange-400 md:hidden"></div> <div id="pin" class="mt-10 hidden space-y-4 md:block"> <div class="h-px w-full overflow-hidden bg-neutral-300 dark:bg-neutral-700"> <div id="progress" class="h-px w-full bg-gradient-to-r from-orange-400/30 to-orange-400"></div> </div> <p class="text-pretty text-sm font-light text-neutral-500">
Table of Contents:
</p> <div id="toc" class=""> <ul class="space-y-2 text-pretty text-base text-neutral-700 transition duration-300 dark:text-neutral-400"></ul> </div> </div> </div> <div class="md:pt-8"> <h1 class="mb-4 text-balance text-center text-2xl font-bold text-neutral-800 dark:text-neutral-200 sm:text-3xl md:mb-6 md:text-left"> January: 21 </h1> <article class="text-pretty text-lg text-neutral-700 dark:text-neutral-300"> <h2 id="notes">Notes</h2>
<h3 id="2024">2024</h3>
<h2 id="2025">2025</h2>
<ul>
<li>
<p><strong>Rust</strong></p>
<p>12:23AM</p>
<p>Preparing the rust integration with the godot project.
To build the wasm, we would run this command:</p>
</li>
</ul>
<pre class="astro-code dracula" style="background-color:#282A36;color:#F8F8F2;overflow-x:auto;white-space:pre-wrap;word-wrap:break-word" tabindex="0" data-language="shell"><code><span class="line"><span style="color:#50FA7B"> ./kbve.sh</span><span style="color:#BD93F9"> -nx</span><span style="color:#F1FA8C"> rust_godot_towerdefense:build-wasm</span></span>
<span class="line"></span></code></pre>
<h2 id="2024">2024</h2>
<p>2:40pm - <code>Food</code></p>
<h4 id="food">Food</h4>
<p>Went on a sleepless adventure to restock my empty fridge, the lack of healthy food in my diet and the overall lack of sleep are both a dangerous combo.
Expand Down
Loading

0 comments on commit d123b5b

Please sign in to comment.