Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: self-hosted compiler progress #180

Closed
7 tasks done
slimsag opened this issue Mar 9, 2022 · 13 comments
Closed
7 tasks done

build: self-hosted compiler progress #180

slimsag opened this issue Mar 9, 2022 · 13 comments
Labels
Milestone

Comments

@slimsag
Copy link
Member

slimsag commented Mar 9, 2022

This is the tracking issue for getting all Mach examples/libraries working with the new self-hosted Zig compiler, which will be enabled by default in Zig v0.11 and is already enabled by default in all nightly Zig builds.

Status

  • aarch64-macos: tested 2022-09-09
  • x86_64-linux: tested 2022-09-08
  • x86_64-windows: tested 2022-09-09
aarch64-macos linux windows test
cd libs/ecs && zig build test -fno-stage1
cd libs/ecs && zig build test -fstage1
cd libs/gpu && zig build test
cd libs/gpu && zig build run-example
cd libs/glfw && zig build test
cd libs/sysaudio && zig build test
cd libs/sysaudio && zig build run-example-soundio-sine-wave
cd libs/freetype && zig build test
cd libs/freetype && zig build run-example-single-glyph -- 'a'
cd libs/freetype && zig build run-example-glyph-to-svg
cd libs/gpu-dawn && zig build
zig build-exe --main-pkg-path . ./tools/html-generator.zig
🍎 🍎 🍎 zig build run-example-triangle -fstage1 -Dtarget=wasm32-freestanding-musl
zig build run-shaderexp
zig build run-example-advanced-gen-texture-light
zig build run-example-boids
⚠️ ⚠️ ⚠️ zig build run-example-ecs-app
zig build run-example-fractal-cube
zig build run-example-gkurve
zig build run-example-image-blur
zig build run-example-instanced-cube
zig build run-example-map-async
zig build run-example-rotating-cube
zig build run-example-textured-cube
zig build run-example-triangle
zig build run-example-triangle-msaa
zig build run-example-two-cubes
zig build run-example-cubemap
zig build example-triangle -Dtarget=wasm32-freestanding-musl
🍎 🍎 🍎 zig build run-example-triangle -fstage1 -Dtarget=wasm32-freestanding-musl
⚠️ ⚠️ ⚠️ zig build example-sysaudio -Dtarget=wasm32-freestanding-musl
🍎 🍎 🍎 zig build run-example-sysaudio -fstage1 -Dtarget=wasm32-freestanding-musl
⚠️ ? ⚠️ zig build
zig build test

Known issues

  • The HTTP server we use for running WebAssembly examples, apple_pie, use async, so our WASM examples cannot auto-start a web server and open the browser anymore. Not the end of the world.

Zig issues we are blocked on

Zig issues we have hacky workarounds for

Search for TODO(self-hosted)

Zig issues that are problems for us, but haven't been filed yet

NOT YET FILED:

  1. Our map-async example (which does not use zig async) required adding a useless field to the App file struct (*App is treated as *const App for some reason otherwise, not sure why. Need to make a minimal repro and file a bug. error: expected type '*main.main', found '*const main.main') a4ddfb6
@kamidev

This comment was marked as outdated.

@slimsag

This comment was marked as resolved.

@kamidev

This comment was marked as resolved.

@slimsag slimsag changed the title begin testing Mach w/stage2 compiler to find issues soon Mach+stage2 progress Jun 12, 2022
@PiergiorgioZagaria

This comment was marked as outdated.

@iddev5

This comment was marked as resolved.

@slimsag slimsag added this to the Mach 0.2 milestone Jun 18, 2022
@PiergiorgioZagaria

This comment was marked as outdated.

@PiergiorgioZagaria
Copy link
Contributor

Solved the last error for compiling mach with glfw, basically _ = glfw.getProcAddress("foobar") was being called at compile time because GLproc, the return type of getProcAddress used the old function declaration.

Will test with the latest version of mach now and send a PR

@PiergiorgioZagaria

This comment was marked as outdated.

@PiergiorgioZagaria

This comment was marked as outdated.

@slimsag
Copy link
Member Author

slimsag commented Jul 4, 2022

@PiergiorgioZagaria nice work, thanks so much for continuing to dig into this. I updated the issue description just now with what (I think?) the status quo is w.r.t. stage2 support, let me know if I should update anything there

@PiergiorgioZagaria

This comment was marked as outdated.

@slimsag slimsag changed the title Mach+stage2 progress build: Mach+stage2 progress Aug 6, 2022
@slimsag slimsag added the build label Aug 6, 2022
@slimsag slimsag changed the title build: Mach+stage2 progress build: Mach+self-hosted compiler progress Aug 16, 2022
@slimsag

This comment was marked as outdated.

@slimsag slimsag changed the title build: Mach+self-hosted compiler progress self-hosted compiler progress Sep 2, 2022
@slimsag slimsag changed the title self-hosted compiler progress build: self-hosted compiler progress Sep 2, 2022
@slimsag slimsag pinned this issue Sep 2, 2022
slimsag added a commit that referenced this issue Sep 10, 2022
With almost all tests/examples working on all platforms now with the new compiler,
#180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit to hexops/mach-glfw that referenced this issue Sep 11, 2022
With almost all tests/examples working on all platforms now with the new compiler,
hexops/mach#180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit to hexops/mach-freetype that referenced this issue Sep 11, 2022
With almost all tests/examples working on all platforms now with the new compiler,
hexops/mach#180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit to hexops/mach-gpu that referenced this issue Sep 11, 2022
With almost all tests/examples working on all platforms now with the new compiler,
hexops/mach#180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
@slimsag
Copy link
Member Author

slimsag commented Oct 14, 2022

apple_pie has since been replaced with a web server dedicated to WASM serving: https://github.com/hexops/mach/tree/main/tools/wasmserve

We're now fully on the self-hosted compiler, so closing.

@slimsag slimsag closed this as completed Oct 14, 2022
@slimsag slimsag unpinned this issue Oct 14, 2022
slimsag added a commit to hexops/mach-ecs that referenced this issue Apr 5, 2023
With almost all tests/examples working on all platforms now with the new compiler,
hexops/mach#180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit to hexops/mach-gamemode that referenced this issue Apr 5, 2023
With almost all tests/examples working on all platforms now with the new compiler,
hexops/mach#180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit to hexops/mach-sysaudio that referenced this issue Apr 5, 2023
With almost all tests/examples working on all platforms now with the new compiler,
hexops/mach#180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit to hexops/mach-sysjs that referenced this issue Apr 5, 2023
With almost all tests/examples working on all platforms now with the new compiler,
hexops/mach#180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants