Commit graph

50 commits

Author SHA1 Message Date
Ali Chraghi
edd2117174 all: build: update to zig version 0.11.0-dev.6883+da0509750 2023-03-24 23:22:59 -07:00
Wrench[bot]
d9bcb1e291 all: update Zig to version 0.11.0-dev.1987+a2c6ecd6d
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-03-16 09:47:25 -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
Wrench[bot]
6561c24df5
all: update Zig to version 0.11.0-dev.1824+a7a709aaa (#709)
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-03-05 12:15:06 -07:00
Stephen Gutekanst
34132c01b2 officially deprecate Matrix chat in favor of Discord
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-02-13 06:46:23 -07:00
Stephen Gutekanst
a2eb384eaf freetype: update to latest Zig build API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-02-12 10:05:03 -07:00
Wrench[bot]
3d769b9671 all: update Zig to version 0.11.0-dev.1605+abc9530a8
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-02-12 10:05:03 -07:00
Wrench[bot]
31a54cc9c5 all: update Zig to version 0.11.0-dev.1479+97b1a9bb6
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-28 17:07:04 -07:00
Ali Chraghi
320090ee42 freetype: ci: don't run tests when cross-compiling 2023-01-20 14:53:22 -07:00
Wrench[bot]
4681425f56 all: update Zig to version 0.11.0-dev.1350+bbab4beda
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-18 10:34:40 -07:00
Ali Chraghi
3e51dc0581 ci: remove git install step 2023-01-12 10:51:16 -07:00
Wrench[bot]
a19dcbbc19 all: update Zig to version 0.11.0-dev.1268+0e66df209
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-12 02:05:33 -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
Wrench[bot]
7d246e76b3 all: update Zig to version 0.11.0-dev.1247+87b223428
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-08 18:21:50 -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
Wrench[bot]
d5f37257c5 all: update Zig to version 0.11.0-dev.1023+1c711b0a6
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-01 02:40:57 -07:00
Wrench[bot]
a3a0417c21 all: update Zig to version 0.11.0-dev.1000+94780f7cd
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2022-12-30 12:52:31 -07:00
Ali Chraghi
5849304fba all: update zig version 2022-12-25 13:36:03 -07:00
Ali Chraghi
3b162fdd7c all: update zig version 2022-12-18 18:02:31 -07:00
Keith Chambers
81fce62133
freetype: fix incorrect font path in embedFile (#636) 2022-12-14 02:19:34 -07:00
David Vanderson
305fa7fa35
freetype: add option to build using separate zlib (#621) 2022-11-22 10:22:10 -07:00
Ali Chraghi
a2c6319bc4 freetype: set packed structs backing integer 2022-11-01 08:59:13 -07:00
BratishkaErik
aafb26189f
all: README: fix links to main repository (#600) 2022-10-28 10:22:23 -07:00
Stephen Gutekanst
628387764c all: CI: update to latest Zig master version
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-22 09:11:16 -07:00
Stephen Gutekanst
2c65845aed all: CI: update to latest Zig 0.10.0-dev.4333+f5f28e0d2
Produced via:

```
ZIG_VERSION=0.10.0-dev.4333+f5f28e0d2 ./dev/update-zig.sh
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-14 09:00:45 -07:00
Stephen Gutekanst
a977393648 freetype: update to latest upstream revision
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-14 08:31:01 -07:00
mlugg
ec8ced475f freetype: don't expose harfbuzz directly from freetype pkg
This declaration itself was nonsensical, as the file being imported was
from the harfbuzz package (instead users should import harfbuzz
directly). But as well as being nonsensical, this line was occasionally
triggering a stage2 bug which we haven't quite tracked down yet which
seems to be something to do with conflicting modules importing a file.
This issue meant that projects with a specific dependency pattern on
freetype and harfbuzz would sometimes randomly get a nonsensical
compilation error. This change works around that issue for
mach-freetype.
2022-09-30 12:25:19 -07:00
Ali Chraghi
77ee26d54e freetype: fix compilation errors 2022-09-30 12:24:14 -07:00
Ali Chraghi
82e10f4f28
all: build: thisDir improvements (#570)
* build:all: thisDir improvements

more performant output, usage code reducement and compileError for wrong usage

* glfw: update deprecated code
2022-09-29 08:41:46 -07:00
mlugg
2af8d5025b freetype/harfbuzz: correct Position struct layout
There's an undocumented private field in this struct which wasn't
replicated, meaning getGlyphPositions was returning garbage data.
2022-09-25 10:03:09 -07:00
Ali Chraghi
f3109b365c all: update zig version 2022-09-19 20:11:55 -07:00
Stephen Gutekanst
8113ca370d all: remove support for stage1
With almost all tests/examples working on all platforms now with the new compiler,
https://github.com/hexops/mach/issues/180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-10 00:09:30 -07:00
Stephen Gutekanst
b282641300 all: update to latest Zig nightly version
Performed via:

```sh
VERSION=0.10.0-dev.3952+9e070b653 ./dev/update-zig.sh
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-10 02:16:05 +00:00
NewbLuck
46c4ea4ebd
all: update to use latest Zig master APIs (#521)
Co-authored-by: Scott Johnson <scott.johnson@furniturerow.com>
2022-09-10 02:07:30 +00:00
Ali Chraghi
ad981944d4 all: revert cimport workaround 2022-09-07 21:24:47 -07:00
mlugg
0a32de381e freetype: correct return type of Face.availableSizes 2022-09-06 20:55:10 -07:00
NewbLuck
b7ea4aeb89
freetype: correct typo in previous fix (#509)
Co-authored-by: Scott Johnson <scott.johnson@furniturerow.com>
2022-09-02 09:44:46 -07:00
NewbLuck
2451d9e92b
freetype: Update padding size of packed structs (#507)
Co-authored-by: Ali Chraghi <63465728+alichraghi@users.noreply.github.com>
2022-09-01 23:57:41 -07:00
Ali Chraghi
1572ed7fc6 freetype: undepend to utils package 2022-08-29 05:59:52 -07:00
Ali Chraghi
af8310f2df freetype:build: don't run tests with zig build 2022-08-29 05:59:52 -07:00
Ali Chraghi
47bdb5ea03 build: don't install libs, fix glfw shared lib compilation,
standardilize `buildXXX` funcs
2022-08-28 10:45:09 -07:00
Ali Chraghi
16d4e374a9 freetype: drop c package 2022-08-28 10:45:09 -07:00
Stephen Gutekanst
1e0fa20622 all: employ self-hosted @cImport hack only on Darwin targets
This is an poor approximation for the host OS running Darwin, which
is good enough for now. In practice this means macOS works but can't
cross-compile (until the cImport issue is fixed in Zig itself), but
Windows/Linux are unaffected and should be able to build natively and
cross-compile.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-27 11:19:57 -07:00
Ali Chraghi
cb760cbbf6 freetype: complete *Scanline Converter* binding 2022-08-27 11:12:07 -07:00
Ali Chraghi
890668f488 freetype: add glyph-to-svg output to .gitignore 2022-08-27 11:05:36 -07:00
Ali Chraghi
b9e00fdbb6 build: fix memory leaks 2022-08-27 11:05:36 -07:00
Stephen Gutekanst
a4792f6e5a freetype: examples: add help/usage output to single-glyph if arg not specified
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-26 19:04:54 -07:00
Stephen Gutekanst
8019d55fe5 freetype: improve self-hosted compiler support (use darwin @cImport workaround)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-26 19:03:55 -07:00
Stephen Gutekanst
3011ed0ea4 all: update pull request template to reflect new libs/ dir
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-26 15:12:04 -07:00
Stephen Gutekanst
0645429df9 all: move standalone libraries to libs/ subdirectory
The root dir of our repository has grown quite a lot the past few months.

I'd like to make it more clear where the bulk of the engine lives (`src/`) and
also make it more clear which Mach libraries are consumable as standalone projects.

As for the name of this directory, `libs` was my first choice but there's a bit of
a convention of that being external libraries in Zig projects _today_, while these
are libraries maintained as part of Mach in this repository - not external ones.

We will name this directory `libs`, and if we have a need for external libraries
we will use `external` or `deps` for that directory name. I considered other names
such as `components`, `systems`, `modules` (which are bad as they overlap with
major ECS / engine concepts), and it seems likely the official Zig package manager
will break the convention of using a `libs` dir anyway.

Performed via:

```sh
mkdir libs/
git mv freetype libs/
git mv basisu libs/
git mv gamemode libs/
git mv glfw libs/
git mv gpu libs/
git mv gpu-dawn libs/
git mv sysaudio libs/
git mv sysjs libs/
git mv ecs libs/
```

git-subtree-dir: glfw
git-subtree-mainline: 0d5b853443
git-subtree-split: 572d1144f11b353abdb64fff828b25a4f0fbb7ca

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>

git mv ecs libs/

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-26 15:12:04 -07:00