crust / Part 13 - Summary

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

A brief wrap up, a few thoughts and where to next.


crust / Part 12 - iOS

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we will create a new Xcode project and implement the crust-build pipeline for building the iOS target platform. This will let us run crust on an iPhone - such that it could also be published to the Apple App Store - though you would need an active Apple Developer subscription to do that. We will:

  • Create a new Xcode iOS project which invokes crust-build as part of its build pipeline
  • Fill in the implementation of the iOS build target in our crust-build project

crust / Part 11 - MacOS Desktop

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we will create a new Xcode project and implement the crust-build pipeline for building the MacOS Dekstop target platform. This will let us run crust as a bundled MacOS application - such that it could also be published to the Apple Mac App Store - though you would need an active Apple Developer subscription to do that. We will:

  • Create a new Xcode MacOS Desktop project which invokes crust-build as part of its build pipeline
  • Fill in the implementation of the MacOS Desktop build target in our crust-build project

crust / Part 10 - Android

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we will implement the crust-build pipeline for building out the Android target platform. This will let us run crust on Android mobile devices. We will:

  • Create an Android Studio project for our Android application
  • Fill in the implementation of the Android build target in our crust-build project to orchestrate the build
  • Update the crust-main source code with a few tweaks to make things run properly on mobile devices such as Android

Note: Our crust-build implementation for Android will be cross platform - meaning you will be able to do an Android target build on either Windows or MacOS.


crust / Part 9 - Emscripten

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we will implement the crust-build pipeline for building out the Emscripten target platform. This gives us a web brower compatible version of crust - letting us run our application embedded in a web page! We will:

  • Fill in the implementation of the Emscripten build target in our crust-build project to orchestrate the build steps to prepare and perform.
  • Update the crust-main source code to become Emscripten aware - there are a few things we have to do differently to run our main loop and know about the display size for Emscripten.

Note: Our crust-build implementation for Emscripten will be cross platform - meaning you will be able to do an Emscripten target build on either Windows or MacOS.


crust / Part 8 - OpenGL engine

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we will implement the remainder of our OpenGL engine such that we can start rendering some 3D models in the main scene. The main tasks we need to complete are:

  • Transformation of MeshData component into OpenGL mesh resources
  • Transformation of TextureData component into OpenGL texture resources
  • Caching of resources
  • Creation of a default shader pipeline using the shader asset resources
  • Updating the main scene to create and render models using the shader pipeline

crust / Part 7 - Components and assets

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we will implement the ability to load and store 3D models and resources for our scene. We will represent these resources in an abstracted way, avoiding the use of any vendor specific code such as OpenGL. This allows us to write our scene code in an agnostic fashion and describe 3D models and structures in a portable way.

Our engine implementation will be responsible for translating these abstractions into appropriate native resources - in our case OpenGL resources - though this could be other vendor technologies such as Vulkan.


crust / Part 6 - OpenGL window

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we will add a main loop to our application and display an OpenGL window. We will also stub out the basics for a scene with user input handling.


crust / Part 5 - Init SDL

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we are going to write some of the core parts of crust-main which gets us to the point of being able to initialise the SDL system. We will focus our energy on Windows and MacOS, leaving the other target platforms for later once our main application code has matured, though we will sprinkle a tiny bit of forward thinking as we go to make later parts of the series easier.

We will also need to grow our crust-build application to download non Rust related dependencies and process them into our target platform build code.


crust / Part 4 - Launch debugger

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we will add enough code to our crust-build application to launch the crust-main application and debug it on Windows and MacOS Console.


crust / Part 3 - Build core

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we will start filling in our crust-build project, writing the core set of utilities and data structures to support the build operations we’ll be performing and to stub out the skeleton for building each of our target platforms.

This also demonstrates how to create a Rust command line interface application (CLI) which could be a useful thing to know if you wanted to use Rust for authoring general command line tool systems applications.


crust / Part 2 - Foundation setup

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

In this article we are going to lay out the foundation structure for our Rust project and get to a stage where we can launch a basic version of our main application via Visual Studio Code on both MacOS and Windows.


crust / Part 1 - Introduction

>>> Read full article

Rusty boat: attribution https://www.pexels.com/photo/a-rusty-boat-on-the-seashore-9816335/

Welcome to another research series! Toward the end of 2020 I wanted to learn something new again and was almost going to look into the latest version of C++ but something in the back of my brain reminded me of a programming language I’d heard of but didn’t know much about: Rust.

After a bit of basic research, Rust looked like it could be an interesting language to learn because it is designed for high performance but can also be compiled for many different platforms. The Rust language also seems to be picking up steam in popularity and usage in mainstream software and the language itself on the surface looked relatively pleasant to program in (compared to, say C/C++).

I decided to go for it and see what I could do with Rust - I chose to re-implement my older research project A Simple Triangle with Rust to see if I could build a cross platform code base that I could deploy on mobile phones as well as desktop machines.

We will refer to the Rust project in this series as crust (Cross platform Rust) because, it sounds kinda catchy and easy to remember and type!