mirror of
https://git.robbyzambito.me/zaprus
synced 2026-02-05 00:44:51 +00:00
Compare commits
6 Commits
0.2.0
...
fix/no-int
| Author | SHA1 | Date | |
|---|---|---|---|
| e5cb8396d6 | |||
| e744a44317 | |||
| f202410f0d | |||
| 9dcbc44aa1 | |||
| d1fdf0c1be | |||
| f13221133d |
26
.tangled/workflows/build.yml
Normal file
26
.tangled/workflows/build.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
when:
|
||||||
|
- event: ["push", "pull_request", "manual"]
|
||||||
|
branch: ["dev", "master"]
|
||||||
|
tag: ["v*"]
|
||||||
|
|
||||||
|
engine: "nixery"
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
nixpkgs:
|
||||||
|
- rclone
|
||||||
|
git+https://github.com/mitchellh/zig-overlay:
|
||||||
|
- master
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Build"
|
||||||
|
command: "zig build -Doptimize=ReleaseSmall -Dcpu=baseline"
|
||||||
|
- name: "Publish"
|
||||||
|
command: |
|
||||||
|
rclone sync ./zig-out \
|
||||||
|
--webdav-url "$RELEASE_NEXTCLOUD_HOST/remote.php/dav/files/$RELEASE_NEXTCLOUD_USER/" \
|
||||||
|
--webdav-user "$RELEASE_NEXTCLOUD_USER" \
|
||||||
|
--webdav-pass "$RELEASE_NEXTCLOUD_PASS" \
|
||||||
|
--webdav-vendor nextcloud \
|
||||||
|
:webdav:"zaprus/zaprus-$TANGLED_REF_NAME" \
|
||||||
|
-q
|
||||||
|
|
||||||
@@ -3,4 +3,9 @@
|
|||||||
This is an implementation of the [Saprus protocol](https://gitlab.com/c2-games/red-team/saprus) in Zig.
|
This is an implementation of the [Saprus protocol](https://gitlab.com/c2-games/red-team/saprus) in Zig.
|
||||||
It is useful for developing clients either in Zig, or in any other language using the C bindings.
|
It is useful for developing clients either in Zig, or in any other language using the C bindings.
|
||||||
|
|
||||||
Binary releases can be downloaded [here](https://cloud.zambito.xyz/s/cNaLeDz38W5ZcZs).
|
Binary releases can be downloaded [here](https://cloud.zambito.xyz/s/7jJPTm68Zp3mN8F).
|
||||||
|
|
||||||
|
The code for this can be found here:
|
||||||
|
|
||||||
|
- https://tangled.org/zambyte.robbyzambito.me/zaprus
|
||||||
|
- https://git.robbyzambito.me/zaprus
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ const std = @import("std");
|
|||||||
// build runner to parallelize the build automatically (and the cache system to
|
// build runner to parallelize the build automatically (and the cache system to
|
||||||
// know when a step doesn't need to be re-run).
|
// know when a step doesn't need to be re-run).
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
|
// Ensure the license is included in the output directory
|
||||||
|
b.installFile("LICENSE.md", "LICENSE.md");
|
||||||
|
b.installFile("README.md", "README.md");
|
||||||
// Standard target options allow the person running `zig build` to choose
|
// Standard target options allow the person running `zig build` to choose
|
||||||
// what target to build for. Here we do not override the defaults, which
|
// what target to build for. Here we do not override the defaults, which
|
||||||
// means any target is allowed, and the default is native. Other options
|
// means any target is allowed, and the default is native. Other options
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
// This is a [Semantic Version](https://semver.org/).
|
// This is a [Semantic Version](https://semver.org/).
|
||||||
// In a future version of Zig it will be used for package deduplication.
|
// In a future version of Zig it will be used for package deduplication.
|
||||||
.version = "0.1.0",
|
.version = "0.0.0",
|
||||||
|
|
||||||
// Together with name, this represents a globally unique package
|
// Together with name, this represents a globally unique package
|
||||||
// identifier. This field is generated by the Zig toolchain when the
|
// identifier. This field is generated by the Zig toolchain when the
|
||||||
|
|||||||
@@ -146,7 +146,13 @@ pub fn main(init: std.process.Init) !void {
|
|||||||
|
|
||||||
if (flags.connect != null) {
|
if (flags.connect != null) {
|
||||||
reconnect: while (true) {
|
reconnect: while (true) {
|
||||||
client = try .init();
|
client = SaprusClient.init() catch |err| switch (err) {
|
||||||
|
error.NoInterfaceFound => {
|
||||||
|
try init.io.sleep(.fromMilliseconds(100), .boot);
|
||||||
|
continue :reconnect;
|
||||||
|
},
|
||||||
|
else => |e| return e,
|
||||||
|
};
|
||||||
defer client.deinit();
|
defer client.deinit();
|
||||||
log.debug("Starting connection", .{});
|
log.debug("Starting connection", .{});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user