Commit graph

217 commits

Author SHA1 Message Date
Stephen Gutekanst
3359c6163b all: use mach-glfw via package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-07 06:32:36 -07:00
Stephen Gutekanst
2caffc8d35 gpu-dawn: remove xcode_frameworks submodule; Sdk type
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 23:55:28 -07:00
Stephen Gutekanst
5aa06c2234 glfw: remove xcode_frameworks submodule; Sdk type
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 23:48:39 -07:00
Stephen Gutekanst
0a20ba3169 sysaudio: eliminate Sdk type
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 23:38:49 -07:00
Stephen Gutekanst
78590b8950 mach: test only non-library code
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 23:35:58 -07:00
Stephen Gutekanst
d57a6d3b6d sysaudio: remove xcode_frameworks submodule
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 23:26:56 -07:00
Stephen Gutekanst
ffb7366fe3 core: prepare to use via package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 22:42:45 -07:00
Stephen Gutekanst
26fb85df1c gpu: prepare to use via package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 22:40:47 -07:00
Stephen Gutekanst
61a2ea91e6 gpu-dawn: prepare to use via package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 22:35:46 -07:00
Stephen Gutekanst
81ff09af6b glfw: prepare to use via package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 22:30:29 -07:00
Stephen Gutekanst
ee484e83ac sysaudio: prepare to use via package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-06 22:28:28 -07:00
Stephen Gutekanst
f4c72c3f27 all: update to latest mach-glfw build API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-03 22:11:06 -07:00
Stephen Gutekanst
02b9f7d132 all: pass xcode-frameworks dependency to gpu-dawn
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-03 20:19:00 -07:00
Stephen Gutekanst
906cdc19a1 {mach,core}: use inferred error sets during build
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-03 08:54:42 -07:00
Stephen Gutekanst
d1404e782f all: use mach-basisu via github.com/hexops/mach-basisu
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-02 11:47:27 -07:00
Stephen Gutekanst
6794b4b91b mach: remove model3d dependency for now
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-01 23:13:58 -07:00
Stephen Gutekanst
4a56244912 use mach-model3d via package manager
helps hexops/mach#721

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-01 22:33:35 -07:00
Stephen Gutekanst
37635992d7 mach: use pure-Zig mach-gamemode package
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-05-19 16:12:22 -07:00
Stephen Gutekanst
2fb8fde05c sysjs: now a standalone library at github.com/hexops/mach-sysjs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-05-19 08:38:06 -07:00
Stephen Gutekanst
dfcfc20db8 sysaudio: use mach-sysjs via package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-05-19 08:36:44 -07:00
Stephen Gutekanst
816b5101b3 core: use mach-sysjs via package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-05-19 08:21:31 -07:00
Stephen Gutekanst
e4e3da7e54 dusk: move project to https://github.com/hexops/mach-dusk
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-05-18 22:42:30 -07:00
Stephen Gutekanst
ff18122da9 mach: remove unused imports
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-04-28 16:10:46 -07:00
Stephen Gutekanst
1fbd36199a mach: depend on mach-ecs and mach-earcut standalone repositories
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-04-28 16:04:45 -07:00
Stephen Gutekanst
9c14e617c9 mach: fix building for wasm32 target
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-04-25 15:06:11 -07:00
Stephen Gutekanst
e4fd26c8e7 mach: update to latest Zig build API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-04-25 15:06:11 -07:00
Vivek Roy
ff0258f27d all: use std.Build.installArtifact 2023-04-25 15:06:11 -07:00
Ali Chraghi
60597f78d8
app: add mach CLI and integrate wasmserve (#738) 2023-04-02 12:37:05 -07:00
Ali Chraghi
b086bdee3a wasmserve: almost working 2023-03-26 09:31:05 -07:00
Ali Chraghi
edd2117174 all: build: update to zig version 0.11.0-dev.6883+da0509750 2023-03-24 23:22:59 -07:00
Stephen Gutekanst
4054c3ab80 mach: expose gpu_dawn / webgpu.h headers
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-16 07:29:21 -07:00
Stephen Gutekanst
6bd4d91932 all: cache module() returns to avoid duplicate modules
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-15 21:20:28 -07:00
Ali Chraghi
94fbc5d27f
Dusk (#715)
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-05 12:14:54 -07:00
Stephen Gutekanst
b69079127a mach: update to latest Zig build API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-02-12 10:05:03 -07:00
Andrew Gutekanst
3a095ca077 mach: update to latest core API 2023-02-07 19:00:36 -07:00
Stephen Gutekanst
b497a1bbeb mach: expose build step/etc info from App
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 21:57:42 -07:00
Stephen Gutekanst
3ff4bcc2a3 mach: finish splitting Core and Engine
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
9bbada90b2 {mach,core}: move core sources to libs/core
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Ali Chraghi
c6b8b979bc build: serve app on / 2023-01-23 00:20:54 -07:00
Ali Chraghi
3947e51025 build: set rdynamic=true to export symbols 2023-01-23 00:20:54 -07:00
Ali Chraghi
8a15fcd694 gpu-dawn: update for building latest dawn 2023-01-14 12:12:00 -07:00
Ali Chraghi
1d7cd4be80 mach: fundamental changes
- Core doesn't depend to `App` anymore
 - `setOptions` has replaced with some new functions (`setTitle`,
   `setSize`, etc)
   - and more
2023-01-12 01:54:48 -07:00
Stephen Gutekanst
a750e31d11 Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)"
This reverts commit a1fe671db8.

Lue suggested reverting #661 because ZLS worked around the issue of @src
being relative in that environment: https://github.com/zigtools/zls/pull/898

This is not a perfect solution (what zls did seems to be a workaround), but
is good enough for us until Zig gets an official package manager.
2023-01-10 01:57:52 -07:00
Lue
a1fe671db8
all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)
* all: build: fix sdkPath for relative @src.file

Prior to this commit, the build system heavily assumed that the result
`@src.file` would always be absolute, but this is no longer
guaranteed, likely due to there being no such thing as an "absolute
path" in WASI.

It appears that for normal invocations of `zig build`, it is safe to
assume that `@src.file` is absolute. However, when ZLS uses a custom
`build_runner.zig` to collect build configuration, `@src.file` is
actually relative to the current working directory, at least on my
system. For a while, this led to ZLS completions breaking entirely,
but presently it actually causes ZLS to crash!

The solution is not as simple as using relative `sdkPath` results
as-is, because the build system may attempt to resolve these paths
relative to build root, when the paths are actually relative to the
current working directory.

This leads to a sticky situation: the current working directory is a
runtime concept, but `@src.file` is resolved at compile time. However,
it appears that the build runner does not change current working
directory in between compilation and execution, so it is probably safe
to calculate `sdkPath` using runtime current working directory.

Still, this requires major changes with how `sdkPath` works, since
runtime computation and allocations are required. So pretty much
anything that relied on `sdkPath` being comptime-known has been
refactored in this commit.

The most severe result of this is that, for example, `gpu.pkg` can no
longer be a comptime-known constant: it has to be a runtime function
that takes a `*Builder` and returns a `Pkg`.

This commit deals with usages of `*.pkg` and `sdkPath` within Mach
itself, but projects that depend on Mach such as `mach-examples` will
almost certainly require changes as well.

* all: update README to reflect change in pkg usage

For details on updating your code to use this version, see: 88b1106953

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-02 01:23:46 -07:00
Ali Chraghi
c4842ea5c5 build: replace App.setBuildMode() with mode option 2022-12-27 12:53:00 -07:00
Ali Chraghi
2de36ad75b wasmserve: execute zig with acutal args 2022-12-25 13:36:03 -07:00
Ali Chraghi
061daa790f ci: remove compile-all step
examples are moved to a separate repo and `zig build` does the same
2022-12-25 13:36:03 -07:00
Aaron Winter
ef05d8ca69
mach: toOwnedSlice now returns an error union that needs to be handled (#635) 2022-12-10 15:26:16 -07:00
Keith Chambers
cb011d961b
mach: fix missing param when linking model3d (#617) 2022-11-14 18:15:16 -07:00
Keith Chambers
731e2b1287
{mach,model3d}: link model3d as static lib instead of adding C files to build step (#613)
This allows the library to link better with projects. Otherwise you can end up with a mix of conflicts over that compiler + version to use.

Also adds .use_model3d option to mach build system. If set to true, model3d will be linked in statically to target project.
2022-11-14 15:43:53 -07:00