Skip to content

Instantly share code, notes, and snippets.

const std = @import("std");
const os = std.os;
const net = std.net;
pub fn main() anyerror!void {
const address_all = net.Address.initIp4([_]u8{ 0, 0, 0, 0 }, 4040);
const address = net.Address.initIp4([_]u8{ 127, 0, 0, 1 }, 4040);
const address_target_ok = net.Address.initIp4([_]u8{ 127, 0, 0, 42 }, 4040);
const address_target_notok = net.Address.initIp4([_]u8{ 192, 168, 1, 1 }, 4040);
const std = @import("std");
const net = std.net;
const fs = std.fs;
const os = std.os;
pub const io_mode = .evented;
pub fn main() anyerror!void {
var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = &general_purpose_allocator.allocator;
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("pub", "src/pub.zig");
exe.setBuildMode(mode);
exe.addLibPath("/usr/lib64");
exe.linkSystemLibrary("zmq");
exe.install();
const std = @import("std");
const c = @cImport({
@cInclude("zmq.h");
});
pub fn main() anyerror!void {
std.debug.warn("All your base are belong to us.\n");
/* Copyright 2019 SiFive, Inc */
/* SPDX-License-Identifier: Apache-2.0 */
#include <stdio.h>
#include <metal/spi.h>
#include <metal/gpio.h>
struct metal_spi *spi = 0;
struct metal_gpio *gpio_device = 0;
/* Copyright 2019 SiFive, Inc */
/* SPDX-License-Identifier: Apache-2.0 */
#include <stdio.h>
#include <metal/spi.h>
#include <metal/gpio.h>
struct metal_spi *spi = 0;
struct metal_gpio *gpio_device = 0;