Switch over to WebAssembly, Rust and Yew #35

Merged
BlakeRain merged 87 commits from yew-static into main 2023-08-30 18:01:40 +00:00
12 changed files with 44 additions and 47 deletions
Showing only changes of commit d8d9be3fa7 - Show all commits

View File

@ -6,8 +6,8 @@ tags:
- python
published: 2019-11-02T08:30:00.000Z
cover: /content/adding-search-to-ghost/cover.jpg
---
I wanted to add search functionality to the Ghost CMS. In this post I show the way that I achieved this.
excerpt: |
I wanted to add search functionality to the Ghost CMS. In this post I show the way that I achieved this.
---
**tl;dr** I added search with a couple of Python scripts ([here](https://github.com/HalfWayMan/blakerain.com/blob/master/populate-db.py) and [here](https://github.com/HalfWayMan/blakerain.com/blob/master/simple-search.py)).

View File

@ -6,11 +6,9 @@ tags:
- cpp
published: 2020-12-11T18:30:00.000Z
cover: /content/allocating-memory-for-dma-in-linux/cover.jpg
---
In this post we take a look at allocating memory on Linux using huge pages with the intention of
sharing that memory with PCIe devices that use DMA.
excerpt: |
In this post we take a look at allocating memory on Linux using huge pages with the intention of
sharing that memory with PCIe devices that use DMA.
---
I've recently had the pleasure of writing some user-space code that takes control of an Ethernet card specifically the [Intel i350](https://ark.intel.com/content/www/us/en/ark/products/59062/intel-ethernet-server-adapter-i350-t2.html) and it's kin. Part of the interface with the device requires sharing memory that contains packet descriptors and buffers. The device uses this memory for the communication of transmitted and received Ethernet packets.

View File

@ -5,8 +5,8 @@ tags:
- cpp
published: 2020-12-05T15:12:33.000Z
cover: /content/bitmap-tri-color-marking/cover.jpg
---
In this post I look at a simple tri-color marking implementation that uses bitmap operations to walk the heap.
excerpt: |
In this post I look at a simple tri-color marking implementation that uses bitmap operations to walk the heap.
---
Recently I've been experimenting with various garbage collection implementations, with an eye towards one of my possible future projects. This has lead me down all manner of paths, many of them false, and all of them great fun. One particular approach stuck with me for quite some time after I had abandoned it, so I thought I would share this approach.

View File

@ -5,8 +5,8 @@ tags:
- rust
published: 2022-02-07T20:04:44.000Z
cover: /content/moving-lambdas-to-rust/jay-heike-Fc-0gi4YylM-unsplash.jpg
---
My experience changing the AWS Lambda functions for this website from Python to Rust.
excerpt: |
My experience changing the AWS Lambda functions for this website from Python to Rust.
---
Since I've started using Rust quite a bit more at work and in some personal projects, I've been

View File

@ -4,9 +4,9 @@ tags:
- mastodon
published: 2022-11-13T15:38:33.000Z
cover: /content/moving-to-mastodon/cover.jpg
---
Much like a great number of other people, I have followed the trend towards Mastodon, and have
found it to be quite a wonderful experience.
excerpt: |
Much like a great number of other people, I have followed the trend towards Mastodon, and have
found it to be quite a wonderful experience.
---
This week one of my favourite actors [Stephen Fry] posted a final message to his now closed Twitter account and moved
@ -22,14 +22,15 @@ tweets were at times few and far between.
In the same Reddit thread I learned that he had already created an account on the [mastodonapp.uk] instance where, at
the time of writing, he has already amassed 51k followers.
<Bookmark
url="https://mastodonapp.uk/@stephenfry"
title="@stephenfry@mastodonapp.uk"
description="Stephen Fry on Mastodon"
author="Stephen Fry"
publisher="Mastodon"
thumbnail="/content/moving-to-mastodon/fry-mastodon.jpg"
icon="https://cdn.simpleicons.org/mastodon/6364FF" />
```bookmark
url: "https://mastodonapp.uk/@stephenfry"
title: @stephenfry@mastodonapp.uk
description: Stephen Fry on Mastodon
author: Stephen Fry
publisher: Mastodon
thumbnail: /content/moving-to-mastodon/fry-mastodon.jpg
icon: "https://cdn.simpleicons.org/mastodon/6364FF"
```
Not wanting to be left out of what appeared to be a growing trend, Fry's departure from Twitter provided the impetus for
me to give Mastodon a go. On Wednesday I decided to create my own Mastodon account, on the same [mastodonapp.uk]
@ -70,12 +71,15 @@ One of the people I found was Hugh Rundle. Hugh has made some interesting points
think is an important read to anybody moving to Mastodon from Twitter. Hugh tells an important part of the story that
I'm not sure is being considered.
<Quote author="Hugh Rundle" url="https://www.hughrundle.net/home-invasion/">
There's another, smaller group of people mourning a social media experience that was destroyed this week — the people
who were active on Mastodon and the broader fediverse prior to November 2022. The nightclub has a new brash owner, and
the dancefloor has emptied. People are pouring in to the quiet houseparty around the corner, cocktails still in hand,
demanding that the music be turned up, walking mud into the carpet, and yelling over the top of the quiet conversation.
</Quote>
```quote
author: Hugh Rundle
url: "https://www.hughrundle.net/home-invasion/"
quote: |
There's another, smaller group of people mourning a social media experience that was destroyed this week — the people
who were active on Mastodon and the broader fediverse prior to November 2022. The nightclub has a new brash owner, and
the dancefloor has emptied. People are pouring in to the quiet houseparty around the corner, cocktails still in hand,
demanding that the music be turned up, walking mud into the carpet, and yelling over the top of the quiet conversation.
```
I really hope that we can behave in a way that doesn't ruin the house party.

View File

@ -6,11 +6,9 @@ tags:
- react
published: 2021-08-01T17:41:22.000Z
cover: /content/moving-towards-jamstack-with-netlify/cover.jpg
---
In this post I outline the steps that I took to make this blog a static site, whilst still
maintaining some of the advantages of the Ghost CMS.
excerpt: |
In this post I outline the steps that I took to make this blog a static site, whilst still
maintaining some of the advantages of the Ghost CMS.
---
I've recently been tinkering with the serverless approach to application development and hosting. I decided to change this website to an entirely static site. However I didn't want to just use a GitHub repository of Markdown files, preferring to maintain some of the advantages of the Ghost CMS.

View File

@ -6,11 +6,9 @@ tags:
- aws
published: 2019-10-31T19:44:00.000Z
cover: /content/new-site-and-blog/cover.jpg
---
I have a new website and blog using the Ghost platform. Here I touch on the setup and the goals for
this site.
excerpt: |
I have a new website and blog using the Ghost platform. Here I touch on the setup and the goals for
this site.
---
**tl;dr** New website using [Ghost](https://ghost.org/) was easy to set up.

View File

@ -5,11 +5,9 @@ tags:
- gtk
published: 2021-01-14T21:27:19.000Z
cover: /content/overlays-with-custom-widgets-in-gtk/cover.png
---
In this post I show how to build a collapsible controls overlay in GTK, rendered over a simple
custom widget.
excerpt: |
In this post I show how to build a collapsible controls overlay in GTK, rendered over a simple
custom widget.
---
Recently I've been building a GTK application that includes a custom drawing widget for editing a simple 2D map. When elements are selected in the map I wanted a nice way to edit those elements within the map itself.

View File

@ -7,8 +7,8 @@ tags:
- react
published: 2020-11-27T18:40:09.000Z
cover: /content/updated-site-search/cover.png
---
In this post we look at an updated implementation of the site search feature.
excerpt: |
In this post we look at an updated implementation of the site search feature.
---
I decided to re-visit the search functionality that I [had added](http://localhost:2368/blog/adding-search-to-ghost/) to this site to provide a slightly better search mechanism. I had three objectives that I wanted to achieve:

View File

@ -42,12 +42,12 @@ impl PostInfo {
pub fn from_front_matter(
slug: String,
reading_time: Option<usize>,
excerpt: Option<String>,
FrontMatter {
title,
tags,
published,
cover,
excerpt,
}: FrontMatter,
) -> Self {
PostInfo {

View File

@ -12,6 +12,7 @@ pub struct FrontMatter {
)]
pub published: Option<OffsetDateTime>,
pub cover: Option<String>,
pub excerpt: Option<String>,
}
pub fn parse_front_matter(content: &[u8]) -> (Option<FrontMatter>, ParsedEntity) {

View File

@ -109,7 +109,7 @@ fn load_post(file: &File) -> Option<Post> {
let reading_time = words_count::count(&matter.content).words / 200;
Some(Post {
info: PostInfo::from_front_matter(slug, Some(reading_time), matter.excerpt, front_matter),
info: PostInfo::from_front_matter(slug, Some(reading_time), front_matter),
content: matter.content,
})
}