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

core!: move libxev and zig-aio event loops to USAGE.md #100

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
513 changes: 513 additions & 0 deletions USAGE.md

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const std = @import("std");

pub fn build(b: *std.Build) void {
const include_libxev = b.option(bool, "libxev", "Enable support for libxev library (default: true)") orelse true;
const include_images = b.option(bool, "images", "Enable support for images (default: true)") orelse true;
const include_aio = b.option(bool, "aio", "Enable support for zig-aio library (default: false)") orelse false;

const options = b.addOptions();
options.addOption(bool, "libxev", include_libxev);
options.addOption(bool, "images", include_images);
options.addOption(bool, "aio", include_aio);

const options_mod = options.createModule();

Expand All @@ -25,14 +21,6 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
.target = target,
}) else null;
const xev_dep = if (include_libxev) b.lazyDependency("libxev", .{
.optimize = optimize,
.target = target,
}) else null;
const aio_dep = if (include_aio) b.lazyDependency("aio", .{
.optimize = optimize,
.target = target,
}) else null;

// Module
const vaxis_mod = b.addModule("vaxis", .{
Expand All @@ -44,9 +32,6 @@ pub fn build(b: *std.Build) void {
vaxis_mod.addImport("grapheme", zg_dep.module("grapheme"));
vaxis_mod.addImport("DisplayWidth", zg_dep.module("DisplayWidth"));
if (zigimg_dep) |dep| vaxis_mod.addImport("zigimg", dep.module("zigimg"));
if (xev_dep) |dep| vaxis_mod.addImport("xev", dep.module("xev"));
if (aio_dep) |dep| vaxis_mod.addImport("aio", dep.module("aio"));
if (aio_dep) |dep| vaxis_mod.addImport("coro", dep.module("coro"));
vaxis_mod.addImport("build_options", options_mod);

// Examples
Expand Down Expand Up @@ -75,9 +60,6 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
example.root_module.addImport("vaxis", vaxis_mod);
if (xev_dep) |dep| example.root_module.addImport("xev", dep.module("xev"));
if (aio_dep) |dep| example.root_module.addImport("aio", dep.module("aio"));
if (aio_dep) |dep| example.root_module.addImport("coro", dep.module("coro"));

const example_run = b.addRunArtifact(example);
example_step.dependOn(&example_run.step);
Expand Down
10 changes: 0 additions & 10 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@
.url = "git+https://codeberg.org/dude_the_builder/zg#7ddce488e074c3f052949ba513a340446cea86e9",
.hash = "12205e2e7108385a1ec280b6365166e902a690d6a0e8fcc015fdea62d63cf79be8ec",
},
.libxev = .{
.url = "git+https://github.com/mitchellh/libxev#f6a672a78436d8efee1aa847a43a900ad773618b",
.hash = "12207b7a5b538ffb7fb18f954ae17d2f8490b6e3778a9e30564ad82c58ee8da52361",
.lazy = true,
},
.aio = .{
.url = "git+https://github.com/Cloudef/zig-aio#b5a407344379508466c5dcbe4c74438a6166e2ca",
.hash = "1220a55aedabdd10578d0c514719ea39ae1bc6d7ed990f508dc100db7f0ccf391437",
.lazy = true,
},
},
.paths = .{
"LICENSE",
Expand Down
172 changes: 0 additions & 172 deletions examples/aio.zig

This file was deleted.

127 changes: 0 additions & 127 deletions examples/xev.zig

This file was deleted.

Loading
Loading