Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasimmet/zig-meta-allyourcode
https://github.com/dasimmet/zig-meta-allyourcode
zig-package
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dasimmet/zig-meta-allyourcode
- Owner: dasimmet
- Created: 2024-07-11T18:59:04.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-12-20T15:38:33.000Z (16 days ago)
- Last Synced: 2024-12-20T16:35:25.640Z (16 days ago)
- Topics: zig-package
- Language: Zig
- Homepage:
- Size: 180 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# meta-allyourcode
lazy dependencies for zig build.
This repository is for writing `build.zig` configurations for other c/c++ projects## CMake
using the zig build system, this repository bootstraps `cmake` `3.30.1` without any system cmake
or the usual shellscript method. it takes a while and is only tested on x64 linux,
but can be used to build your C/C++ dependency libraries.the package also has a custom `CMakeStep` that will configure and build and install a cmake project,
and providdes a `.install(b, name)` function to get the artifacts:
```
zig fetch --save https://github.com/dasimmet/zig-meta-allyourcode/archive/refs/heads/master.tar.gz
```
build.zig (from [example](./example/build.zig)):
```
pub fn build() void {
const meta_import = b.lazyImport(@This(), "meta_allyourcode");if (meta_import) |meta_allyourcode| {}
const cmakeStep = meta_allyourcode.addCMakeStep(b, .{
.target = b.standardTargetOptions(.{}),
.name = "cmake",
.source_dir = b.path(""),
.defines = &.{
.{ "CMAKE_BUILD_TYPE", if (optimize == .Debug) "Debug" else "Release" },
},
});
cmakeStep.addCmakeDefine();
const install_step = cmakeStep.install(b, "");
b.getInstallStep().dependOn(&install_step.step);
}
```## integrated builds
- cmake (including custom build step?)
- β stage1 linux
- β running bootstrap `cmake` to reconfigure itself with `CC=zig cc`
- β use zig built `make` to rebuild `cmake`
- πββοΈ stage1 windows
- πββοΈ stage1 macos
- πββοΈtest building other cmake projects
- try to link cmake fully static
- test other architectures
- libgit2 β
- build for wasm32-wasi
- wabt
- β compile libwabt and wasm2wat
- β add build.zig include code