Migrate to crafter-build project.cpp and restructure views

- Replace project.json + run.sh with a C++ project.cpp build descriptor
  (crafter-build), targeting wasm32-wasip1 with the Crafter.Graphics dep
- Add Catcrafts-Views implementation; drop Catcrafts-Component
- Add catcrafts-head.js (sets <title>/<link> tags at runtime)
- Update Blog/Root/main modules, README, and favicon

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-07-18 23:27:41 +02:00
commit 13a12c2a2c
15 changed files with 227 additions and 126 deletions

View file

@ -1,13 +1,13 @@
/*
catcrafts.net
Copyright (C) 2025 Catcrafts
Copyright (C) 2026 Catcrafts
The source code of this website is made available for viewing purposes only.
No permission is granted to copy, modify, distribute, or create derivative works.
*/
export module Catcrafts:Blog;
import Crafter.CppDOM;
import Crafter.Graphics;
import std;
using namespace Crafter;
@ -22,8 +22,8 @@ export namespace Catcrafts {
{
"In WASM, Exit doesn't mean done.",
"in-wasm-exit-doesnt-mean-done",
"2025-11-14",
R"(So if anyone looked at the source code for this website pefore this post you would have seen that every is allocated with new, for example this very blog was defined as <code>std::vector<BlogPost> posts = new std::vector<BlogPost>{...</code><br><br>
"2026-11-14",
R"(So if anyone looked at the source code for this website pefore this post you would have seen that everything was allocated with new, for example this very blog was defined as <code>std::vector&lt;BlogPost&gt; posts = new std::vector&lt;BlogPost&gt;{...};</code><br><br>
Reason for this was that everything became corrupted when callbacking from JS, not knowing sure as to why this was the fastest solution, but after debugging the problem became clear.<br><br>
@ -31,7 +31,7 @@ export namespace Catcrafts {
This caused all the memory corruption errors since everything was destructed.<br><br>
Luckily this is a very simple fix of adding <code>-fno-c++-static-destructors</code>, and things like this are is also the reason i use clang instead of gcc.<br><br>
Luckily this is a very simple fix of adding <code>-fno-c++-static-destructors</code>, and the ease of things like this is also one of the reasons i use clang instead of gcc.<br><br>
So now all examples and this site have been updated to use normal variables again.<br><br>
@ -40,12 +40,12 @@ export namespace Catcrafts {
{
"Hello World!",
"hello-world",
"2025-11-12",
"2026-11-12",
R"(Welcome to catcrafts.net!<br><br>
Here we believe optimization is everything and C++ is a gift from god.<br>
This blog will mostly be dedicated to random tidbits i come across while working on my Crafter series of libraries.<br><br>
Like this website which is fully written in C++ using the Crafter.CppDOM library.<br>
Like this website which is fully written in C++ using the Crafter.Graphics library.<br>
And source available too!<br>
<a href="https://forgejo.catcrafts.net/Catcrafts/catcrafts.net">https://forgejo.catcrafts.net/Catcrafts/catcrafts.net<a>)"
}