diff --git a/assets/mach/basisu-dark.svg b/assets/mach/basisu-dark.svg deleted file mode 100644 index 24c6e02..0000000 --- a/assets/mach/basisu-dark.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/mach/basisu-full-dark.svg b/assets/mach/basisu-full-dark.svg deleted file mode 100644 index fcbe137..0000000 --- a/assets/mach/basisu-full-dark.svg +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/mach/basisu-full-light.svg b/assets/mach/basisu-full-light.svg deleted file mode 100644 index 3d0bf64..0000000 --- a/assets/mach/basisu-full-light.svg +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/mach/basisu-icon-dark.svg b/assets/mach/basisu-icon-dark.svg deleted file mode 100644 index 8307dda..0000000 --- a/assets/mach/basisu-icon-dark.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/assets/mach/basisu-icon-light.svg b/assets/mach/basisu-icon-light.svg deleted file mode 100644 index 5d7b559..0000000 --- a/assets/mach/basisu-icon-light.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/assets/mach/basisu-light.svg b/assets/mach/basisu-light.svg deleted file mode 100644 index dc0f758..0000000 --- a/assets/mach/basisu-light.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/index.html b/index.html index b02de02..0463200 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,6 @@ mach-glfw mach-freetype mach-gamemode -mach-basisu mach-sysgpu mach-flac mach-opus
Mach

Mach engine (coming soon)

Mach engine is not ready for use yet and is in very early-stages of development.
FAQ: "Can I use Mach to make a simple 2D game?"

Competitive with other engines

Our ultimate aim is for Mach engine to be a full modern engine, with a full GUI editor and all. A custom UI library, rendering engine, physics & more are all in scope and will be built out incrementally over the coming years.

Deeply rooted in modularity

Unlike the monolithic engines of today, we aim for Mach to be deeply modular, data & tooling driven. Essentially, our entity component system will be more opinionated than others and will employ a unique message passing system, which will enable deep editor integration, debug tooling, and more. The ECS will act as a shared integration point for _modules_, which will all be optional, so that you can easily plug-and-play different modules for making UIs, rendering 2D sprites, 3D models, physics, etc.

Roadmap

There is a long road ahead, it's going to require a lot of work to get to where we are going.

We've been working on Mach for ~2 years now, primarily building out the Zig gamedev ecosystem and building foundational packages that we needed for Mach core and the engine. As a result, we've really just broken ground on the engine side of things.

See our roadmap for a general idea of what we're up to today.

Open source, always & forever

Apache or MIT licensed, at your choosing.

There are few things in life I am more passionate about than Mach. I've been working on it double-time for over two years now, and dreaming of it for a decade before that. Today, I am building my first real game using it and I'm excited to explore how much more intuitive gamedev tooling can be.

FOSS is in my roots and I believe we should own our tools, they should empower us-not be part of the 'open source' game which is all too prevelant today (even among 'open source' engines.) Mach needs to be for people like you and me-it needs to genuinely be software you can love.

My dream is one day to live a simple, modest, future earning a living building Mach for you and creating high-quality games for everyone. Please consider sponsoring my work!

- Stephen Gutekanst, BDFL of Mach

Community

GitHub diff --git a/index.xml b/index.xml index aede3b8..7a1ad43 100644 --- a/index.xml +++ b/index.xml @@ -1,7 +1,7 @@ Mach on Mach: zig game engine & graphics toolkithttps://machengine.org/Recent content in Mach on Mach: zig game engine & graphics toolkitHugo -- gohugo.ioen-usC packageshttps://machengine.org/pkg/c/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/c/C libraries & headers packaged via the Zig build system Mach provides an ecosystem of C libraries via the Zig package manager. These aren’t Zig bindings to these libraries (which we have separately), but instead are just forks of the actual project with their build system replaced by build.zig so you can depend on them and build them using the Zig package manager. Pure forks with build.zig: -brotli harfbuzz freetype glfw basisu opus opusfile opusenc flac ogg spirv-tools spirv-cross Header packages:Coordinate systemhttps://machengine.org/engine/math/coordinate-system/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/engine/math/coordinate-system/Coordinate system This page briefly covers Mach’s coordinate systems; then it delves into traversing coordinate systems explaining at a high-level (and with very minimal maths) how e.g. a polygon in a 3D model in the scene goes through a bunch of coordinate system transforms before finally ending up as a pixel on the screen. +brotli harfbuzz freetype glfw opus opusfile opusenc flac ogg spirv-tools spirv-cross Header packages:Coordinate systemhttps://machengine.org/engine/math/coordinate-system/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/engine/math/coordinate-system/Coordinate system This page briefly covers Mach’s coordinate systems; then it delves into traversing coordinate systems explaining at a high-level (and with very minimal maths) how e.g. a polygon in a 3D model in the scene goes through a bunch of coordinate system transforms before finally ending up as a pixel on the screen. You don’t have to read this whole page, but it might be worth skimming and taking a look at the diagrams!Core exampleshttps://machengine.org/core/examples/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/core/examples/Mach core examples All examples require this nominated Zig version | known issues gen-texture-light Generates a brick texture at comptime, uses Blinn-Phong lighting, and several pipelines. Move camera with arrow keys / WASD. git clone https://github.com/hexops/mach cd mach/ zig build run-core-gen-texture-light ~800 lines of code procedural-primitives Procedurally generated geometry, implements a few different shapes (use arrow keys to switch between them.) git clone https://github.com/hexops/mach cd mach/ zig build run-core-procedural-primitives ~600 lines of code pixel-post-process A post-processing effect which pixelates the entire screen.Discord communityhttps://machengine.org/discord/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/discord/Redirecting you to https://discord.gg/XNG3NZgCqpEngine modularityhttps://machengine.org/engine/modularity/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/engine/modularity/Modularity Historically, we believe there are three types of approaches to game development: @@ -20,11 +20,9 @@ Error scopes A concept of error scopes is used, where you can push an error scop As Zig developers, we have no qualms with explicit memory management, but GPU memory is perhaps one of the best use-cases for reference counting. GPU objects are reference-counted handles CPU-side, much like a file handle, but often hold references to eachother - while the actual memory lives on the GPU.Known issueshttps://machengine.org/about/known-issues/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/about/known-issues/Known issues If you’re trying to run the Mach examples or similar, you may be running into one of these known issues. nixOS If you are using nixOS, we have tips on how to use Mach with it here. Windows File not found If you encounter an error like this: -Windows does not have symlinks enabled, or Git is not configured to use them. This is very annoying and has been reported to Microsoft.mach basisuhttps://machengine.org/pkg/mach-basisu/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-basisu/GitHub repository | Issue tracker basis universal (supercompressed textures) for Zig -Experimental This is an experimental project according to our stability guarantees: -When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst. -Tracking issue: https://github.com/hexops/mach/issues/965 -Getting started Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash):mach duskhttps://machengine.org/pkg/mach-dusk/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-dusk/This page has moved: Mach sysgpumach dxcompilerhttps://machengine.org/pkg/mach-dxcompiler/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-dxcompiler/mach-dxcompiler The DirectX shader compiler, built better. GitHub repository | Issue tracker See ‘Building the DirectX shader compiler better than Microsoft?’ for details/background information. +Windows does not have symlinks enabled, or Git is not configured to use them. This is very annoying and has been reported to Microsoft.mach basisuhttps://machengine.org/pkg/mach-basisu/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-basisu/No longer supported as an official Mach project. The code has moved to github.com/slimsag/mach-basisu and may not be maintained to the same standard as official Mach projects. +Additional details: https://github.com/hexops/mach/issues/965 +View the older v0.3 documentation: https://machengine.org/v0.3/pkg/mach-basisumach duskhttps://machengine.org/pkg/mach-dusk/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-dusk/This page has moved: Mach sysgpumach dxcompilerhttps://machengine.org/pkg/mach-dxcompiler/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-dxcompiler/mach-dxcompiler The DirectX shader compiler, built better. GitHub repository | Issue tracker See ‘Building the DirectX shader compiler better than Microsoft?’ for details/background information. Features Statically linked dxcompiler library and dxc executables. Zero dependency on proprietary dxil.dll code-signing blob (see: Mach Siegbert Vogt DXCSA) Built using build.zig instead of 10k+ LOC CMake build system. Prebuilt binaries provided for many OS/arch. Binaries for macOS and aarch64 Linux (first ever in history), among others.mach earcuthttps://machengine.org/pkg/mach-earcut/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-earcut/No longer supported as an official Mach project. The code has moved to github.com/slimsag/mach-earcut and may not be maintained to the same standard as official Mach projects. Additional details: https://github.com/hexops/mach/issues/967 View the older v0.2 documentation: https://machengine.org/v0.2/pkg/mach-earcutmach ecshttps://machengine.org/pkg/mach-ecs/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-ecs/GitHub repository | Issue tracker The Mach entity component system, written from first-principles and designed for deep tooling capabilities. diff --git a/pkg/c/index.html b/pkg/c/index.html index a1e85a3..923fbc6 100644 --- a/pkg/c/index.html +++ b/pkg/c/index.html @@ -5,4 +5,4 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement

C libraries & headers packaged via the Zig build system

Mach provides an ecosystem of C libraries via the Zig package manager.

These aren’t Zig bindings to these libraries (which we have separately), but instead are just forks of the actual project with their build system replaced by build.zig so you can depend on them and build them using the Zig package manager.

Pure forks with build.zig:

Header packages:

Special cases:

\ No newline at end of file + Donate
Mach v0.3 has been released! For all the details check out the announcement

C libraries & headers packaged via the Zig build system

Mach provides an ecosystem of C libraries via the Zig package manager.

These aren’t Zig bindings to these libraries (which we have separately), but instead are just forks of the actual project with their build system replaced by build.zig so you can depend on them and build them using the Zig package manager.

Pure forks with build.zig:

Header packages:

Special cases:

\ No newline at end of file diff --git a/pkg/fastfilter/index.html b/pkg/fastfilter/index.html index deb3a26..e3eed7b 100644 --- a/pkg/fastfilter/index.html +++ b/pkg/fastfilter/index.html @@ -5,7 +5,7 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement

fastfilter

Binary fuse & xor filters for Zig (faster and smaller than bloom filters)

+ Donate
Mach v0.3 has been released! For all the details check out the announcement

fastfilter

Binary fuse & xor filters for Zig (faster and smaller than bloom filters)

GitHub repository | Issue tracker

Getting started

Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash):

.{
     .name = "mypkg",
     .version = "0.1.0",
diff --git a/pkg/index.html b/pkg/index.html
index 93aaa00..7b1fe1c 100644
--- a/pkg/index.html
+++ b/pkg/index.html
@@ -5,14 +5,13 @@
 GitHub
 Discord
 
Mach v0.3 has been released! For all the details check out the announcement

Standalone Zig gamedev packages

Mach provides an ecosystem of 100% standalone, high-quality Zig gamedev packages - and they all feature zero-fuss installation, cross-compilation at the flip of a switch, and broad platform support.

The ecosystem

mach-gpu + Donate
Mach v0.3 has been released! For all the details check out the announcement

Standalone Zig gamedev packages

Mach provides an ecosystem of 100% standalone, high-quality Zig gamedev packages - and they all feature zero-fuss installation, cross-compilation at the flip of a switch, and broad platform support.

The ecosystem

mach-gpu mach-ecs mach-sysaudio mach-sysjs mach-glfw mach-freetype mach-gamemode -mach-basisu mach-sysgpu mach-flac mach-opus

Who are these for?

Generally speaking, if you are using Mach engine you won’t be using these - as they require you to wire up everything yourself. Instead, you would be using engine modules which would let you more seamlessly integrate these into your project.

If you use Mach core - or are just looking for high-quality standalone Zig packages, then you’d consider using these.

Additionally, we provide C libraries & headers packaged via the Zig build system which are not Zig wrappers but rather just build the respective C library and package them via the Zig build system.

C bindings vs. pure Zig

We’re not just aimlessly wrapping C libraries, here. We use C libraries generally when:

a. It is a low-level library that most Mach users would have zero need to dive into the internals of. diff --git a/pkg/index.xml b/pkg/index.xml index 3f46549..6f94ab4 100644 --- a/pkg/index.xml +++ b/pkg/index.xml @@ -1,13 +1,11 @@ Standalone packages on Mach: zig game engine & graphics toolkithttps://machengine.org/pkg/Recent content in Standalone packages on Mach: zig game engine & graphics toolkitHugo -- gohugo.ioen-usC packageshttps://machengine.org/pkg/c/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/c/C libraries & headers packaged via the Zig build system Mach provides an ecosystem of C libraries via the Zig package manager. These aren’t Zig bindings to these libraries (which we have separately), but instead are just forks of the actual project with their build system replaced by build.zig so you can depend on them and build them using the Zig package manager. Pure forks with build.zig: -brotli harfbuzz freetype glfw basisu opus opusfile opusenc flac ogg spirv-tools spirv-cross Header packages:fastfilterhttps://machengine.org/pkg/fastfilter/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/fastfilter/fastfilter Binary fuse & xor filters for Zig (faster and smaller than bloom filters) +brotli harfbuzz freetype glfw opus opusfile opusenc flac ogg spirv-tools spirv-cross Header packages:fastfilterhttps://machengine.org/pkg/fastfilter/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/fastfilter/fastfilter Binary fuse & xor filters for Zig (faster and smaller than bloom filters) GitHub repository | Issue tracker Getting started Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash): -.{ .name = "mypkg", .version = "0.1.0", .dependencies = .{ .fastfilter = .{ .url = "https://pkg.machengine.org/fastfilter/LATEST_COMMIT.tar.gz", }, }, } Run zig build in your project, and the compiler will instruct you to add a .hash = ".mach basisuhttps://machengine.org/pkg/mach-basisu/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-basisu/GitHub repository | Issue tracker basis universal (supercompressed textures) for Zig -Experimental This is an experimental project according to our stability guarantees: -When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst. -Tracking issue: https://github.com/hexops/mach/issues/965 -Getting started Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash):mach duskhttps://machengine.org/pkg/mach-dusk/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-dusk/This page has moved: Mach sysgpumach dxcompilerhttps://machengine.org/pkg/mach-dxcompiler/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-dxcompiler/mach-dxcompiler The DirectX shader compiler, built better. GitHub repository | Issue tracker See ‘Building the DirectX shader compiler better than Microsoft?’ for details/background information. +.{ .name = "mypkg", .version = "0.1.0", .dependencies = .{ .fastfilter = .{ .url = "https://pkg.machengine.org/fastfilter/LATEST_COMMIT.tar.gz", }, }, } Run zig build in your project, and the compiler will instruct you to add a .hash = ".mach basisuhttps://machengine.org/pkg/mach-basisu/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-basisu/No longer supported as an official Mach project. The code has moved to github.com/slimsag/mach-basisu and may not be maintained to the same standard as official Mach projects. +Additional details: https://github.com/hexops/mach/issues/965 +View the older v0.3 documentation: https://machengine.org/v0.3/pkg/mach-basisumach duskhttps://machengine.org/pkg/mach-dusk/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-dusk/This page has moved: Mach sysgpumach dxcompilerhttps://machengine.org/pkg/mach-dxcompiler/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-dxcompiler/mach-dxcompiler The DirectX shader compiler, built better. GitHub repository | Issue tracker See ‘Building the DirectX shader compiler better than Microsoft?’ for details/background information. Features Statically linked dxcompiler library and dxc executables. Zero dependency on proprietary dxil.dll code-signing blob (see: Mach Siegbert Vogt DXCSA) Built using build.zig instead of 10k+ LOC CMake build system. Prebuilt binaries provided for many OS/arch. Binaries for macOS and aarch64 Linux (first ever in history), among others.mach earcuthttps://machengine.org/pkg/mach-earcut/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-earcut/No longer supported as an official Mach project. The code has moved to github.com/slimsag/mach-earcut and may not be maintained to the same standard as official Mach projects. Additional details: https://github.com/hexops/mach/issues/967 View the older v0.2 documentation: https://machengine.org/v0.2/pkg/mach-earcutmach ecshttps://machengine.org/pkg/mach-ecs/Mon, 01 Jan 0001 00:00:00 +0000https://machengine.org/pkg/mach-ecs/GitHub repository | Issue tracker The Mach entity component system, written from first-principles and designed for deep tooling capabilities. diff --git a/pkg/mach-basisu/index.html b/pkg/mach-basisu/index.html index 8e22400..17489cd 100644 --- a/pkg/mach-basisu/index.html +++ b/pkg/mach-basisu/index.html @@ -5,23 +5,4 @@ GitHub Discord

Mach v0.3 has been released! For all the details check out the announcement

basis universal (supercompressed textures) for Zig

Experimental

This is an experimental project according to our stability guarantees:

When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst.

Tracking issue: https://github.com/hexops/mach/issues/965

Getting started

Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash):

.{
-    .name = "mypkg",
-    .version = "0.1.0",
-    .dependencies = .{
-        .mach_basisu = .{
-            .url = "https://pkg.machengine.org/mach-basisu/LATEST_COMMIT.tar.gz",
-        },
-    },
-}
-

Run zig build in your project, and the compiler will instruct you to add a .hash = "..." field next to .url:

note: expected .hash = "12209838fcfb7a77d2d6931efdc7448c033a1b7dad11d082c94bbeeba9d1038cd311",
-

Then use the dependency in your build.zig:

pub fn build(b: *std.Build) void {
-    ...
-    exe.root_module.addImport("mach-basisu", b.dependency("mach_basisu", .{
-        .target = target,
-        .optimize = optimize,
-    }).module("mach-basisu"));
-}
-

You can now use it in your src/main.zig file:

const basisu = @import("mach-basisu");
-

See this test for usage.

Ran into trouble?

Triple-check you followed the build.zig.zon instructions correctly, it’s easy to mess that part up.

Feel free to join the Mach Discord community for help.

\ No newline at end of file + Donate
Mach v0.3 has been released! For all the details check out the announcement

No longer supported as an official Mach project. The code has moved to github.com/slimsag/mach-basisu and may not be maintained to the same standard as official Mach projects.

Additional details: https://github.com/hexops/mach/issues/965

View the older v0.3 documentation: https://machengine.org/v0.3/pkg/mach-basisu

\ No newline at end of file diff --git a/pkg/mach-dusk/index.html b/pkg/mach-dusk/index.html index 2c4c999..f4f9353 100644 --- a/pkg/mach-dusk/index.html +++ b/pkg/mach-dusk/index.html @@ -5,4 +5,4 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement

This page has moved: Mach sysgpu

\ No newline at end of file + Donate
Mach v0.3 has been released! For all the details check out the announcement

This page has moved: Mach sysgpu

\ No newline at end of file diff --git a/pkg/mach-dxcompiler/index.html b/pkg/mach-dxcompiler/index.html index b351d7c..eaa64b1 100644 --- a/pkg/mach-dxcompiler/index.html +++ b/pkg/mach-dxcompiler/index.html @@ -5,7 +5,7 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement

mach-dxcompiler

The DirectX shader compiler, built better.

GitHub repository | Issue tracker

See ‘Building the DirectX shader compiler better than Microsoft?’ for details/background information.

Features

  • Statically linked dxcompiler library and dxc executables.
  • Zero dependency on proprietary dxil.dll code-signing blob (see: Mach Siegbert Vogt DXCSA)
  • Built using build.zig instead of 10k+ LOC CMake build system.
  • Prebuilt binaries provided for many OS/arch.
  • Binaries for macOS and aarch64 Linux (first ever in history), among others.
  • Simple C API bundled into library as an alternative to the traditional COM API.

Building from source

Specify the -Dfrom_source build option to produce a build from source (the default is to fetch a prebuilt binary produced from our CI pipelines):

zig build -Dfrom_source -Doptimize=ReleaseFast -Dtarget=aarch64-macos
+ Donate
Mach v0.3 has been released! For all the details check out the announcement

mach-dxcompiler

The DirectX shader compiler, built better.

GitHub repository | Issue tracker

See ‘Building the DirectX shader compiler better than Microsoft?’ for details/background information.

Features

  • Statically linked dxcompiler library and dxc executables.
  • Zero dependency on proprietary dxil.dll code-signing blob (see: Mach Siegbert Vogt DXCSA)
  • Built using build.zig instead of 10k+ LOC CMake build system.
  • Prebuilt binaries provided for many OS/arch.
  • Binaries for macOS and aarch64 Linux (first ever in history), among others.
  • Simple C API bundled into library as an alternative to the traditional COM API.

Building from source

Specify the -Dfrom_source build option to produce a build from source (the default is to fetch a prebuilt binary produced from our CI pipelines):

zig build -Dfrom_source -Doptimize=ReleaseFast -Dtarget=aarch64-macos
 zig build -Dfrom_source -Doptimize=ReleaseFast -Dtarget=x86_64-windows-gnu -Dcpu=x86_64_v2
 zig build -Dfrom_source -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu -Dcpu=x86_64_v2
 

Getting started (Zig package)

First zig init to create a new Zig project. Then add the dependency (change LATEST_COMMIT to the actual latest commit hash from the repository):

zig fetch --save https://pkg.machengine.org/mach-dxcompiler/LATEST_COMMIT.tar.gz
diff --git a/pkg/mach-earcut/index.html b/pkg/mach-earcut/index.html
index 58679ff..2fab9aa 100644
--- a/pkg/mach-earcut/index.html
+++ b/pkg/mach-earcut/index.html
@@ -5,4 +5,4 @@
 GitHub
 Discord
 
Mach v0.3 has been released! For all the details check out the announcement

No longer supported as an official Mach project. The code has moved to github.com/slimsag/mach-earcut and may not be maintained to the same standard as official Mach projects.

Additional details: https://github.com/hexops/mach/issues/967

View the older v0.2 documentation: https://machengine.org/v0.2/pkg/mach-earcut

\ No newline at end of file + Donate
Mach v0.3 has been released! For all the details check out the announcement

No longer supported as an official Mach project. The code has moved to github.com/slimsag/mach-earcut and may not be maintained to the same standard as official Mach projects.

Additional details: https://github.com/hexops/mach/issues/967

View the older v0.2 documentation: https://machengine.org/v0.2/pkg/mach-earcut

\ No newline at end of file diff --git a/pkg/mach-ecs/index.html b/pkg/mach-ecs/index.html index 3ea4c15..77a8cab 100644 --- a/pkg/mach-ecs/index.html +++ b/pkg/mach-ecs/index.html @@ -5,5 +5,5 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

The Mach entity component system, written from first-principles and designed for deep tooling capabilities.

  • Initially a 100% clean-room implementation, working from first-principles; later informed by research into how other open-source ECS work.
  • Enable deep tooling to provide tracing, editors, visualizers, profilers, etc.
  • Fast, optimal for CPU caches, multi-threaded, leverage comptime for type safety.
  • Dynamic, allow for very flexible runtime capabilities.

We’re publishing a blog series “Let’s build an Entity Component System from scatch” as we go.

Experimental

This is an experimental project according to our stability guarantees:

When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst.

Tracking issue: https://github.com/hexops/mach/issues/968

Table of contents

\ No newline at end of file diff --git a/pkg/mach-flac/index.html b/pkg/mach-flac/index.html index 53dac46..175ae3a 100644 --- a/pkg/mach-flac/index.html +++ b/pkg/mach-flac/index.html @@ -5,7 +5,7 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

FLAC audio decoding and encoding for Zig via the battle-hardened xiph.org libflac

Experimental

This is an experimental project according to our stability guarantees:

When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst.

Tracking issue: https://github.com/hexops/mach/issues/959

Getting started

Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash):

.{
     .name = "mypkg",
     .version = "0.1.0",
diff --git a/pkg/mach-freetype/index.html b/pkg/mach-freetype/index.html
index a061f19..5513c4f 100644
--- a/pkg/mach-freetype/index.html
+++ b/pkg/mach-freetype/index.html
@@ -5,7 +5,7 @@
 GitHub
 Discord
 
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

Ziggified Freetype 2 bindings with zero-fuss installation, cross compilation, and more.

Getting started

Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash):

.{
     .name = "mypkg",
     .version = "0.1.0",
diff --git a/pkg/mach-gamemode/index.html b/pkg/mach-gamemode/index.html
index 6b76bbe..5aad4fd 100644
--- a/pkg/mach-gamemode/index.html
+++ b/pkg/mach-gamemode/index.html
@@ -5,7 +5,7 @@
 GitHub
 Discord
 
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

Make your Linux games go brrr

Enables Linux games written in Zig to request gamemode be enabled, opting in to various CPU, GPU, and kernel optimizations. If the user’s machine doesn’t have gamemode, it simply does nothing. There are no dependencies and your game will still run without it normally.

This is preferred as it means your game will automatically invoke gamemode for the user when running, rather than them having to manually enable it.

What is Linux GameMode?

Used by titles such as DiRT 4, many Tomb Raider and Total War games, GameMode is a daemon/lib combo for Linux that allows games to request a set of optimisations be temporarily applied to the host OS and/or a game process, including:

CPU governor
 I/O priority
 Process niceness
diff --git a/pkg/mach-glfw/index.html b/pkg/mach-glfw/index.html
index 81bca62..83295da 100644
--- a/pkg/mach-glfw/index.html
+++ b/pkg/mach-glfw/index.html
@@ -5,7 +5,7 @@
 GitHub
 Discord
 
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

Perfected GLFW bindings for Zig, with 100% API coverage, zero-fuss installation, cross compilation, and more.

What does a ziggified GLFW API offer?

  • Enums, always know what value a GLFW function can accept as everything is strictly typed. And use the nice Zig syntax to access enums, like window.getKey(.escape) instead of c.glfwGetKey(window, c.GLFW_KEY_ESCAPE)
  • Slices instead of C pointers and lengths.
  • Generics, so you can just use window.hint instead of glfwWindowHint, glfwWindowHintString, etc.
  • packed structs represent bit masks, so you can use if (joystick.down and joystick.right) instead of if (joystick & c.GLFW_HAT_DOWN and joystick & c.GLFW_HAT_RIGHT), etc.
  • Methods, e.g. my_window.hint(...) instead of glfwWindowHint(my_window, ...)
  • true and false instead of c.GLFW_TRUE and c.GLFW_FALSE constants.

How do I use OpenGL, Vulkan, WebGPU, etc. with this?

You’ll need to bring your own library, e.g.:

Getting started

First zig init-exe to create a Zig project. Then you will need to create a new build.zig.zon file, and update your build.zig and src/main.zig files:

build.zig.zon

mach-glfw uses the Zig package manager. Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash):

.mach_glfw = .{
     .url = "https://pkg.machengine.org/mach-glfw/LATEST_COMMIT.tar.gz",
 },
diff --git a/pkg/mach-gpu-dawn/index.html b/pkg/mach-gpu-dawn/index.html
index bd3b83a..96fa9ae 100644
--- a/pkg/mach-gpu-dawn/index.html
+++ b/pkg/mach-gpu-dawn/index.html
@@ -5,6 +5,6 @@
 GitHub
 Discord
 
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

Google’s Dawn WebGPU implementation, cross-compiled with Zig into a single static library, requiring nothing more than zig and git to build and cross-compile a static Dawn library for every OS:

  • No cmake
  • No ninja
  • No gn
  • No system dependencies (xcode, etc.)
  • Automagic cross compilation out of the box with nothing more than zig and git!
  • Builds a single static libdawn.a

Building from source

This will take ~10 minutes to finish, so by default when using this package a prebuilt binary version of Dawn (see the ‘binary releases’ section below) but you can always build Dawn from source using:

DAWN_FROM_SOURCE=true zig build dawn
 

Binary releases

Dawn (specifically all the shader compilers, and the DirectXShaderCompiler) is a large C++ codebase and takes 5-10 minutes to build on a modern laptop. Since waiting is no fun, we also have binary releases produced by our GitHub actions:

View binary releases

Here’s how to read the downloads provided:

  • _debug.tar.gz and _release-fast.tar.gz are tarballs of the static library + headers for each OS and debug/release mode, respectively.
  • headers.json.gz is a JSON archive of all the Dawn/WebGPU headers.
  • Files ending in .a.gz and .lib.gz are the individual static libdawn.a and dawn.lib (Windows) gzippped and distributed. These are provided as individual downloads so there is no need to extract a tarball.

Important: Building WebGPU API symbols

Dawn and other WebGPU implementations (like the Rust one) do not agree on a standard webgpu.h API. Aspirationally, they aim to target the same https://github.com/webgpu-native/webgpu-headers header, but in practice they expose different APIs which are not ABI compatible.

When you call a Dawn webgpu.h function, Dawn internally diverts this call through a vtable which must be initialized using a call to dawnProcSetProcs.

mach/gpu-dawn builds since Oct 17th 2022 no longer include the webgpu.h symbols by default. If you intend to actually call the WebGPU API, you should build these two source files as part of your application:

  1. dawn_proc.c
  2. webgpu_dawn_native_proc.cpp

And call dawnProcSetProcs to set up the proc table.

A warning about API stability

You should be aware:

  • WebGPU’s API is not formalized yet.
  • Dawn’s API is still changing.
  • The webgpu.h API is still changing
  • Dawn and gfx-rs/wgpu, although both try to implement webgpu.h, do not exactly implement the same interface. There are subtle differences in device discovery & creation for example.

Generated code

Dawn itself relies on a fairly large amount of dependencies, generated code, etc. To avoid having any dependency on Google build tools, code generation, etc. we maintain a minor fork of Dawn which has generated code and third-party dependencies comitted in “generated” branches. We are usually up-to-date with the upstream within a few weeks on average.

It also provides a few small patches to enable building Dawn with the Zig compiler which we plan to upstream soon, as well as some patches to build the DirectXShaderCompiler with Zig.

\ No newline at end of file diff --git a/pkg/mach-gpu/index.html b/pkg/mach-gpu/index.html index a13ac5c..271b704 100644 --- a/pkg/mach-gpu/index.html +++ b/pkg/mach-gpu/index.html @@ -5,7 +5,7 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

The WebGPU interface for Zig, featuring:

  • Zero-fuss installation, cross-compilation at the flip of a switch, and broad platform support.
  • 100% API coverage. Every function, type, constant, etc. has been exposed in a ziggified API.
  • Desktop, Steam Deck, (soon) web, and (future) mobile support.
  • A modern graphics API similar to Metal, Vulkan, and DirectX 12.
  • Cross-platform shading language
  • Compute shaders
  • Advanced GPU features where hardware support is available.

Benefits of mach/gpu and WebGPU

mach/gpu is a zero-cost idiomatic Zig interface to the next-generation WebGPU API, which supersedes WebGL and exposes the common denominator between the latest low-level graphics APIs (Vulkan, Metal, D3D12) in the web.

Despite its name, WebGPU was built with native support in mind and has substantial investment from Mozilla, Google, Microsoft, Intel, and Apple.

When targeting WebAssembly, mach/gpu merely calls into the browser’s native WebGPU implementation.

When targeting native platforms, we build Google Chrome’s WebGPU implementation, Dawn using Zig as the C/C++ compiler toolchain. We bypass the client-server sandboxing model, and use zig build (plus a lot of hand-holding) to support zero-fuss cross compilation & installation without any third-party Google tools, libraries, etc. Just zig and git needed, nothing else.

Perfecting WebGPU for Zig

There is a detailed write-up of how we’ve been perfecting WebGPU for Zig.

Usage

On your own, this involves creating a window (using GLFW, and other APIs if you want Web, Mobile, or other platform support), using Dawn’s API to create a device and bind it to that window, using OS-specific APIs to get the window handle to bind, etc. examples/main.zig demonstrates how to do this. There’s a fair amount of setup code involved.

You may also want to consider using Mach core.

Goals

  • Allow comptime-defined interception of WebGPU API requests (comptime interfaces.)
  • Expose a standard Dawn webgpu.h-compliant C ABI, which routes through Zig comptime interfaces.
  • Support Dawn and Browser (via WASM/JS) implementations of WebGPU.
  • Broad platform support: desktop, mobile, web, consoles.
  • First-class Linux support (Wayland, OpenGL and OpenGL ES fallbacks, etc.)

Non-goals

  • Support non-Dawn (e.g. Rust WebGPU) implementations if they don’t match the same webgpu.h as Dawn.
  • Maintain backwards compatibility with deprecated webgpu.h methods.

Getting started

Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash):

.{
     .name = "mypkg",
     .version = "0.1.0",
diff --git a/pkg/mach-model3d/index.html b/pkg/mach-model3d/index.html
index c839841..50c19c2 100644
--- a/pkg/mach-model3d/index.html
+++ b/pkg/mach-model3d/index.html
@@ -5,4 +5,4 @@
 GitHub
 Discord
 
Mach v0.3 has been released! For all the details check out the announcement

No longer supported as an official Mach project. The code has moved to github.com/slimsag/mach-model3d and may not be maintained to the same standard as official Mach projects.

Additional details: https://github.com/hexops/mach/issues/969

View the older v0.3 documentation: https://machengine.org/v0.3/pkg/mach-model3d

\ No newline at end of file + Donate
Mach v0.3 has been released! For all the details check out the announcement

No longer supported as an official Mach project. The code has moved to github.com/slimsag/mach-model3d and may not be maintained to the same standard as official Mach projects.

Additional details: https://github.com/hexops/mach/issues/969

View the older v0.3 documentation: https://machengine.org/v0.3/pkg/mach-model3d

\ No newline at end of file diff --git a/pkg/mach-opus/index.html b/pkg/mach-opus/index.html index f095081..5ed10d3 100644 --- a/pkg/mach-opus/index.html +++ b/pkg/mach-opus/index.html @@ -5,7 +5,7 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

Opus audio decoding and encoding for Zig via the battle-hardened xiph.org libopus and libopusfile

Experimental

This is an experimental project according to our stability guarantees:

When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst.

Tracking issue: https://github.com/hexops/mach/issues/961

Getting started

Create a build.zig.zon in your project (replace LATEST_COMMIT with the latest commit hash):

.{
     .name = "mypkg",
     .version = "0.1.0",
diff --git a/pkg/mach-sysaudio/index.html b/pkg/mach-sysaudio/index.html
index 717ce45..ef04730 100644
--- a/pkg/mach-sysaudio/index.html
+++ b/pkg/mach-sysaudio/index.html
@@ -5,5 +5,5 @@
 GitHub
 Discord
 
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

Truly cross-platform, low-level, audio IO in Zig - playback and recording with backends for:

  • Linux
    • PulseAudio
    • PipeWire
    • Jack
    • ALSA
  • Windows: WASAPI
  • macOS/iOS: CoreAudio
  • WebAssembly: WebAudio

Getting started

First add the Mach standard library to your project so you can @import("mach").sysaudio.

Then check out some example code for usage.

Ran into trouble?

Feel free to join the Mach Discord community for help.

\ No newline at end of file diff --git a/pkg/mach-sysgpu/index.html b/pkg/mach-sysgpu/index.html index 1bb96d4..ebe7cbf 100644 --- a/pkg/mach-sysgpu/index.html +++ b/pkg/mach-sysgpu/index.html @@ -5,5 +5,5 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

Highly experimental, blazingly fast, lean & mean descendant/successor of WebGPU native written in Zig.

Experimental

This is an experimental project according to our stability guarantees:

When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst.

Tracking issue: https://github.com/hexops/mach/issues/966

History

In Mach v0.2 we announced an experiment to write a WebGPU implementation in Zig.

In Mach v0.3 we talked about how the project has since grown to have the goal of superseding WebGPU for native applications. Although the API is still greatly inspired by WebGPU, and cozy to those familiar with it, sysgpu stands on its own today - with a goal of being a descendant/successor of WebGPU native.

Goals

Modern graphics API

Competitive with other modern graphics abstraction APIs like WebGPU, SDL3, sokol_gfx, etc. Feel cozy to devs familiar with WebGPU, ‘a better WebGPU [native]’ - targeting:

  • Windows: Direct3D 12
  • Linux: Vulkan
  • macOS: Metal
  • iOS: Metal
  • Android: Vulkan
  • Browser: WebGPU

With an OpenGL fallback.

Alleviate pain points of WebGPU

  • Better approach to pipeline creation / descriptors, with an API that supports push constants / optimization when available.
  • More integrated approach to binding resources to shaders, type-correctness, etc.

More modern, performant, and featureful

  • WebGPU must support all hardware released in the last 8-12 years, sysgpu only targets hardware in the last 5 years, making our ‘baseline’ API much more modern.
  • WebGPU/Browsers cannot add new features or make breaking changes without committee quorum, implementations in multiple browsers, etc. We can move faster because sysgpu is an implementation, not a specification.
  • Support modern functionality as optional extensions, e.g. bindless resources, ray tracing, push constants, multiple queues/async, etc. and graduate them to non-extensions when hardware support is wide enough.

Offline shader compilation

  • Compile shaders fully offline for better runtime performance, and also so you do not have to ship large shader compilation stacks with your binaries.

Viable for modern desktop/mobile apps

Not just for games. We will provide e.g. an OpenGL fallback on platforms like Linux where functional drivers may not exist so that it is viable for modern desktop/mobile apps.

Other goals

  • C API support
  • Improved shading language (think: #include support, better integration with Zig for type safety, etc.)

Non-goals

  • “WebGPU compatibility mode” equivalent, i.e. support for very old/outdated/underpowered hardware / embedded devices. We’ll support a broad range of laptop, desktop, and mobile hardware.
  • Patching and/or working around bad/insecure graphics drivers (browsers/WebGPU must do this for security and maintain e.g. denylists of drivers.)
  • Browser-level security; our target is native application development, not being the graphics API a browser provides.
  • Pure software rendering, e.g. WebGPU/Dawn falls back to a Vulkan software renderer in some cases.
  • Bringing your own shading language (via SPIRV or otherwise), we’ll bless one shading language and it will be integrated nicely.
  • Supporting more than 1 (max 2) backend APIs per platform; in general we will have one backend using the platform’s modern-and-widely-supported API, and sometimes one backend as a fallback for systems that have great divergence. We won’t officially support a myriad of backends per platform.

Experimental, not ready for general use

sysgpu is coming along very nicely, with functional backends capable of running all the mach-core examples already via D3D 12, Metal, and Vulkan backends today. An OpenGL fallback backend is also largely functional.

We have a functional WGSL parser/compiler/transpiler which is quite correct, but shader compilation is an open area of exploration and we are considering replacing WGSL with Zig itself as the shading language instead.

Currently it is a nearly fully-functional implementation of webgpu.h, but numerous improvements to the actual API are planned.

Join the Mach Discord community for discussion, or keep tabs on open issues and wait for an announcement that it is generally ready for use.

\ No newline at end of file diff --git a/pkg/mach-sysjs/index.html b/pkg/mach-sysjs/index.html index 9008365..d92ef5c 100644 --- a/pkg/mach-sysjs/index.html +++ b/pkg/mach-sysjs/index.html @@ -5,5 +5,5 @@ GitHub Discord
Mach v0.3 has been released! For all the details check out the announcement
Mach v0.3 has been released! For all the details check out the announcement

Enables Zig <-> JS interoperability via code generation, with complex type support.

Experimental

This is an experimental project according to our stability guarantees:

When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst.

Tracking issue: https://github.com/hexops/mach/issues/970

Table of contents

\ No newline at end of file