No description
Find a file
iddev5 0ff8edebd9 mach: Add js-runtime as a dependency for wasm applications
This is a workaround for a limitation right now. The html-generator has
no way to dynamically add JS sources (and that can't be done without
using a preprocessor library) so we hardcode js-runtime in it.

In the future, I think the correct behavior would be to move tools/
inside js-runtime along with a wasm application building SDK and get rid
of any direct JS access we have today (which is just
src/platform/wasm.zig and src/platform/mach.js).
2022-07-07 04:35:19 -07:00
.github CI: ZIG_VERSION=0.10.0-dev.2439+c84f5a5f9 ./dev/update-zig.sh 2022-05-31 05:02:04 -07:00
audio audio: link against AudioToolbox on macOS (required at least with macOS 12+) 2022-07-01 19:05:27 -07:00
dev dev: CI: keep string terminator when updating Zig version for Windows 2022-05-31 05:01:34 -07:00
doc doc: add known issues 2022-03-27 12:03:13 -07:00
ecs ecs: initial systems & message sending functionality 2022-07-04 09:12:19 -07:00
examples mach: wasm: Build textured-cube and ecs-app examples 2022-07-06 05:55:04 -07:00
freetype freetype: Use @embedFile() 2022-07-06 05:52:56 -07:00
glfw glfw: update macOS system_sdk to include AudioToolbox 2022-07-01 19:05:27 -07:00
gpu gpu: remove Queue.WorkDownCallback lifetime footgun 2022-06-24 10:14:19 -07:00
gpu-dawn gpu-dawn: update to latest binary release 2022-06-27 06:54:48 +00:00
js-runtime js-runtime: Upload source code from upstream 2022-07-07 04:35:19 -07:00
shaderexp {examples,shaderexp}: make const App public 2022-07-04 21:32:38 -07:00
src mach: wasm: Use default log level 2022-07-06 05:55:04 -07:00
tools tools: add html-generator tools to automatically generate 2022-05-27 21:08:10 -07:00
www mach: Add js-runtime as a dependency for wasm applications 2022-07-07 04:35:19 -07:00
.gitattributes initialize repository 2021-07-04 10:36:34 -07:00
.gitignore gitignore: update to latest from ziglang/zig repo 2021-07-06 20:51:19 -07:00
.gitmodules audio: init 2022-06-28 21:57:13 -07:00
build.zig mach: Add js-runtime as a dependency for wasm applications 2022-07-07 04:35:19 -07:00
LICENSE LICENSE: note directories with a separate LICENSE file 2021-07-05 12:46:20 -07:00
LICENSE-APACHE initialize repository 2021-07-04 10:36:34 -07:00
LICENSE-MIT initialize repository 2021-07-04 10:36:34 -07:00
README.md README: fix animated image widths 2022-06-11 00:55:51 -07:00

Mach is still early stages - see what we have today and stay tuned

Mach: game engine & graphics toolkit for the future

Written in Zig, Mach is for creating games, graphical applications, and desktop/mobile apps:

  • Data-driven, tooling oriented
  • Composable
  • Competitive with Unity and Unreal in spirit (a fully fledged editor in the future, etc.)

example-advanced-gen-texture-light example-boids example-textured-cube

Example showcase

Cross-platform graphics in ~60 seconds

git clone https://github.com/hexops/mach
cd mach/
zig build run-example-boids

Cross-platform graphics, a unified shader language & compute shaders.

(Requires zig 0.10.x | known issues)

Libraries

Mach has many libraries you can use for game development in Zig - you don't have to use the entire engine. All our libraries aim to have the same zero-fuss installation, cross compilation, and platform support:

  • mach-glfw: Ziggified GLFW bindings with 100% API coverage
  • mach-freetype: Ziggified Freetype 2 & HarfBuzz bindings
  • mach-gpu-dawn: Google's Dawn WebGPU implementation, cross-compiled with Zig into a single static library
  • mach-system-sdk: More libraries for cross-compilation with Zig

Join the community

Contributors are very welcome! There are lots of places you can help out with little knowledge, so feel free to join the Matrix chat and say hi!

Sponsor development

No, its not Tom from myspace - its me, @slimsag! Its taken almost a year to get here - staring at broken CI pipelines, C++ compiler errors, buying hardware to test every OS+arch possible, and more.

There are few things in life that I am more serious about than this work. I dedicate ~48 hours/week to my dayjob, and ~50h/week to Zig building Mach and running zigmonthly.org. After three years of aggressively pushing for progress in this exact way, I have no plans to slow down anytime soon.

Supported platforms

Mach is still early stages, so far we have support for building from the following OS to the following targets:

Building for From macOS x86_64 From macOS M1/aarch64 From Linux x86_64 From Windows x86_64
macOS x86_64
macOS M1/aarch64
Linux x86_64
Windows x86_64
iOS 🏃 🏃 🏃 🏃
Android 🏃 🏃 🏃 🏃
Web (Wasm) 🏃 🏃 🏃 🏃
  • Tested and verified via CI.
  • ✔️ Should work, not tested via CI yet.
  • 🏃 Planned or in progress.
  • ⚠️ Implemented, but has known issues (e.g. bugs in Zig.)

Supported Zig version

Mach targets Zig nightly, binary releases are available at https://ziglang.org/download

Currently tested with: 0.10.0-dev.2439+c84f5a5f9

Contributing

Mach is maintained as a monorepo. When changes are merged to this repository, we use some git-fu to pick out the commits to subdirectories and push them to sub-repositories automagically. Changes to the glfw/ directory in this repository get pushed to the separate mach-glfw repository after being merged here, for example.

Please prefix commits / pull requests with the project name (glfw: fix an issue, gpu: fix an issue, examples: fix an issue, etc.) and if possible only one project per commit. If you don't know how to do this, no worries, we can help - just send your PR anyway!