Zig Build System & How to Build Software From Source • Andrew Kelley • GOTO 2023

preview_player
Показать описание
This presentation was recorded at GOTO Chicago 2023. #GOTOcon #GOTOchgo

Andrew Kelley - Creator of the Zig Programming Language

ORIGINAL TALK TITLE
How to Build Software From Source

RESOURCES

ABSTRACT
Building software from source can seem like arcane magic; a lost art of history. In fact, it is a skill that can be mastered by learning just a few basic concepts, and resisting the temptation to overcomplicate.

This talk will teach you some real world skills of building software from source, and then I'll take things in a completely different direction, by showing you how to rip apart a project's build system and replace it with the Zig Build System, making building things from source work effortlessly for more people and more platforms. [...]

TIMECODES
00:00 Intro
02:03 Agenda
02:35 Ways to obtain software
07:01 Core concepts
18:05 To-Don't list
21:39 Dependencies
23:11 Troubleshooting tips
24:55 Caching
28:05 Build systems
39:10 Summary
39:46 Outro

Download slides and read the full abstract here:

RECOMMENDED BOOKS

#Zig #Ziglang #ZigCode #ZigBuildSystem #SoftwareFromSource #Programming #ProgrammingLanguages #ProgrammingLanguage #ZigIntro #ZigTutorial #ZigSoftwareFoundation #Zigler #Elixir #FunctionalProrgramming #VFXPlugin #MicroZig #BoksOS #GeoCities

CHANNEL MEMBERSHIP BONUS
Join this channel to get early access to videos & other perks:

Looking for a unique learning experience?

SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily.
Рекомендации по теме
Комментарии
Автор

I remember being at this talk. Had lunch with Andrew and another conference attendee afterward. He was very kind to answer our questions about Zig and got us even more excited to give it a try!

joshaustintech
Автор

"Docker exists because people don't know how to build from source"... THANK YOU!

IgorGuerrero
Автор

"Software is an experience, a life style." - Andrew Kelley

weeb
Автор

G A M E
C H A N G E R

I've been crying about make/cmake/whatever being fundamentally cringe. Thank you man!

sudombd
Автор

Man, I wish this talk had been around when I started coding....

somepianoguy
Автор

don't take the road less traveled, but do fiddle with your default configs.

weeb
Автор

So, this guy figured out how a build system should work and how it should be presented to a programmer, despite the fact that he's 17.

programmerdvorak
Автор

correction: AFAIK it's DESTDIR that's what does what he talks about, not PREFIX. PREFIX will only affect the middle part which is typically /usr/local or /usr but paths like /etc or /opt are not affected by that. only DESTDIR (which defaults to /)

for example, if an app installs /usr/bin/myapp and /etc/myapp.conf, then setting PREFIX=/tmp/foo will have the installer create /tmp/foo/bin/myapp and /etc/myapp.conf! but setging PREFIX=/tmp/foo will create /tmp/foo/usr/local/bin/myapp and /tmp/foo/etc/myapp.conf

I'm not sure it's part of POSIX, IIRC I learned this from GNU guidelines (it might be GNU Make docs) but as far as I know it's adhered to in both Fedora and Debian.

AloisMahdal
Автор

38:07 What prefix does “zig build run” use?

AdrianBoyko
Автор

I am new in C world and i just recently learn make and its good for in system use but if I have to ship software, i will use zig for that cmake is very ugly in lot of ways don't want to learn that shit.

devshmsec
Автор

19:02 compiler Illuminati preventing us from knowing the truth

PatMaddox
Автор

I don’t really agree with the docker statement. You avoid almost all the dependency and version problems by making sure the environment is the same. How far should you go when recompiling your dependencies from source? The dependency chain can go on and on until you reach the compiler source code. So now your build step takes forever and you have to maintain a very complicated build pipeline for a lot of software because you didn’t want to have one abstraction layer (docker).

grnis
Автор

Talk should really be about hoe to build C/C++ code from source. Basically brings up all the pain points of make because it is a tool from the 60's. Maybe we should just build a better tool then make?

jscancella
Автор

Guix does a lot of these things in a Nix-like way. Just sayin'.

wlangstroth
Автор

People don't build things from sources because they don't live in Mama's house anymore, the day has only 24 hours, and they want to work with the apps, not on them. That are the real reasons!

martinmajewski
Автор

dont listen to him, he doesnt know what he is talking about

poleoluline
Автор

Makefiles are WAY MORE GENERIC than this. That's where the Zig build system fails completely.
It is painful to write a build.zig (that ultimately will be limited to build the software) while make files are easy to learn and use.
Make file rules are mostly intuitive while having to learn Zig to just build something is ridiculous.
Also, it doesn't matter what the compiler actually is, you can compile anything with a make file; I use it to build PureScript applications, verify my certificates and make packages for my system.

beauteetmusculation
Автор

Great Introductory talk but did not help AT ALL with my `build.zig` issues. Doc is scarce and I wish a core Zig member would info-dump all they know about `build.zig` in a blogpost or video one day. It has a bit of a confusing vocabulary. And tutorial code for it keeps breaking.

r.g.thesecond