• Stars
    star
    123
  • Rank 290,145 (Top 6 %)
  • Language
    Zig
  • License
    The Unlicense
  • Created over 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Minimal build.zig for targeting iOS

zig-ios-example

Minimal build.zig for targeting iOS with Zig toolchain.

Building

For iOS Simulator on Apple Silicon Mac:

zig build -Dtarget=aarch64-ios-simulator

For iOS Simulator on Intel Mac:

zig build -Dtarget=x86_64-ios-simulator

If you are building natively on macOS and have Apple SDKs installed for Apple platforms, the path to the SDK will be autodetected for you as part of the build script. You can still manually set the path to the SDK via --sysroot flag.

If you are cross-compiling from a different host such as Linux, or you don't have Apple SDKs installed on macOS, you will need to provide the appropriate Apple SDK such as iphoneos if targeting hardware devices or iphonesimulator if targeting the simulator. In this case, you will need to provide the path to the SDK explicitly using the --sysroot flag.

Setting the sysroot looks like this

zig build --sysroot <path_to_sdk> -Dtarget=aarch64-ios-simulator

Running in iPhone Simulator

Fire up the simulator, and then install the app with

xcrun simctl install booted zig-out/bin/MadeWithZig.app

You can run the app with

xcrun simctl launch booted madewithzig

WIP: running on an iPhone

This is more of a roadmap what I'd like the process to look like. For now, this only works for me locally as I am in possession of Jakub's secret sauce! However, I am working hard on making both zignature and zig-deploy more complete and actually functional for others, so stay tuned for updates!

zig build -Dtarget=aarch64-ios.15.4...15.4
zignature -s <path-to-cert> --entitlement <path-to-entitlements.plist> zig-out/bin/MadeWithZig.app
zig-deploy -n <name-of-your-device> zig-out/bin/MadeWithZig.app

More Repositories

1

zld

Zig's ld drop-in replacement
Zig
237
star
2

zig-yaml

YAML parser for Zig
Zig
125
star
3

rust-wasi-tutorial

Rust version of the excellent WASI tutorial https://github.com/CraneStation/wasmtime/blob/master/docs/WASI-tutorial.md
Rust
81
star
4

ZigKit

Zig bindings for low-level macOS frameworks
Zig
64
star
5

zig-snapshots

Preview Zig's incremental linker state in interactive HTML
Zig
42
star
6

protozig

The protozig(uana), or protocol buffers implementation in Zig
Zig
42
star
7

zacho

Zig's Mach-O parser
Zig
37
star
8

zig-dis-x86_64

x86_64 disassembler library written in Zig
Zig
34
star
9

powercrust

Original implementation of powercrust algorithm by N. Amenta
C
32
star
10

zcoff

Like dumpbin.exe but cross-platform
Zig
32
star
11

zdb

Simple debugger in Zig for Zig
C
28
star
12

zig-deploy

Deploy your iOS apps written with Zig!
Zig
28
star
13

zignature

codesign your Apple apps with Zig!
Zig
27
star
14

zig-dwarfdump

dwarfdump utility but in Zig
Zig
26
star
15

zig-wasi-tutorial

Zig version of WASI tutorial https://github.com/bytecodealliance/wasmtime/blob/master/docs/WASI-tutorial.md
Zig
24
star
16

zelf

Zig's ELF parser utility
Zig
20
star
17

zig-hcs-client

A simple REPL for controlling Zig's hot-code swapping compilation mode
Zig
20
star
18

syclld

SYCL 2023 - linker workshop
Zig
11
star
19

zig-objdump

objdump but in Zig and for Zig
Zig
11
star
20

py-game-theory

Python library implementing algorithms for solving games (as defined in game theory), written in py3k.
Python
8
star
21

gmm

My implementation of the Gaussian Mixture Model (GMM).
Python
8
star
22

wasi-compute

Experimental minimal example of deterministic compute functions in WASI
Rust
6
star
23

hotcode-macos

Hotcode reloading on macOS, or first steps at writing a debugger from scratch on macOS
Zig
4
star
24

wiggle

Experimental wig implementation
Rust
4
star
25

calctax

Simple tax calculator for employees in Poland after Nowy Lad changes in 2022
Zig
4
star
26

espresso-zig

Zig bindings for espresso C library
Zig
4
star
27

Thesis

Thesis repo
TeX
3
star
28

dotfiles

dot dot dot
Vim Script
3
star
29

zig-pdbdump

Zig
3
star
30

wasmtime-bench

Simple wasmtime vs native benchmarks
Rust
2
star
31

string-matching

Some toy implementations of string matching algorithms in Rust
Rust
2
star
32

espresso

Espresso fork packaged as a static library with Zig
C
2
star
33

des-in-python

Discrete Event Simulation (DES) in py3k
Python
2
star
34

checkmem

Wrapper around ChildProcess to get the max rss out
Zig
2
star
35

deqnap

Simple utility for removing extraneous files created by QNAP's rename merging policy
Rust
1
star
36

kmeans

My attempts at implementation of K-Means algorithm (and its variants)
Python
1
star
37

Phd-python

Python scripts
Python
1
star
38

kubkon.github.com

My weblog
HTML
1
star
39

kalman

Kalman filtering and smoothing in Rust.
Rust
1
star
40

DM-Simulator

Discrete-event simulator for the Digital Marketplace written in py3k.
Python
1
star
41

hkmeans

Simple implementation of K-Means clustering algorithm in Haskell
Haskell
1
star
42

Footsteps

An iOS 6 app which records and displays historical locations of the user on the Apple Map.
Objective-C
1
star
43

DM-Numerical

Scripts for numerical analysis of the Digital Marketplace
Python
1
star
44

gitrev

A simple command line utility that is meant to serve as a replacement for SubWCRev.exe on Windows
Rust
1
star
45

email-chattifier

Google Chrome extension that re-formats your email conversation
CoffeeScript
1
star
46

ee106-additional-material

Additional coding examples for EE106 class.
Python
1
star
47

conduit-persistent-example

This code demonstrates how to use Conduit together with Persistent to stream data in constant memory in Haskell.
Haskell
1
star