-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hi there, I updated this project to build on zig 0.13, would happily contribute. protocol.py is updated, build scripts updated, examples work, tests pass --------- Co-authored-by: Jacek Pospychala <[email protected]> Co-authored-by: Malcolm Still <[email protected]>
- Loading branch information
1 parent
6f2ae20
commit 4b54931
Showing
24 changed files
with
507 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,12 @@ example.o | |
bin/ | ||
|
||
zig-cache/ | ||
zig-out/ | ||
|
||
inject.sh | ||
|
||
*.xcf | ||
|
||
TOUR.md | ||
src/example.zig | ||
src/example.zig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,31 @@ | ||
const Builder = @import("std").build.Builder; | ||
const std = @import("std"); | ||
|
||
pub fn build(b: *Builder) void { | ||
const mode = b.standardReleaseOptions(); | ||
const lib = b.addStaticLibrary("zig-amqp", "src/amqp.zig"); | ||
lib.setBuildMode(mode); | ||
lib.install(); | ||
pub fn build(b: *std.Build) void { | ||
const target = b.standardTargetOptions(.{}); | ||
const optimize = b.standardOptimizeOption(.{}); | ||
|
||
var main_tests = b.addTest("src/amqp.zig"); | ||
main_tests.setBuildMode(mode); | ||
const lib = b.addStaticLibrary(.{ | ||
.name = "zig-amqp", | ||
.root_source_file = .{ .path = "src/amqp.zig" }, | ||
.target = target, | ||
.optimize = optimize, | ||
}); | ||
b.installArtifact(lib); | ||
|
||
_ = b.addModule("amqp", .{ | ||
.root_source_file = .{ .path = "src/amqp.zig" }, | ||
.target = target, | ||
.optimize = optimize, | ||
}); | ||
|
||
const main_tests = b.addTest(.{ | ||
.root_source_file = .{ .path = "src/amqp.zig" }, | ||
.target = target, | ||
.optimize = optimize, | ||
}); | ||
|
||
const run_lib_unit_tests = b.addRunArtifact(main_tests); | ||
|
||
const test_step = b.step("test", "Run library tests"); | ||
test_step.dependOn(&main_tests.step); | ||
test_step.dependOn(&run_lib_unit_tests.step); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.{ | ||
.name = "amqp", | ||
.version = "0.0.0", | ||
|
||
.dependencies = .{}, | ||
|
||
.paths = .{ | ||
"build.zig", | ||
"build.zig.zon", | ||
"src", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.{ | ||
.name = "simple_consumer", | ||
.version = "0.0.0", | ||
|
||
.dependencies = .{ | ||
.amqp = .{ | ||
.url = "../../", | ||
.hash = "12201e2af5138be09dec4dfdd163cf8ef3c15c7c39e202661b64d71c6271a9d0886e", | ||
}, | ||
}, | ||
|
||
.paths = .{ | ||
"", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.{ | ||
.name = "simple_consume_two_channels", | ||
// This is a [Semantic Version](https://semver.org/). | ||
// In a future version of Zig it will be used for package deduplication. | ||
.version = "0.0.0", | ||
|
||
// This field is optional. | ||
// This is currently advisory only; Zig does not yet do anything | ||
// with this value. | ||
//.minimum_zig_version = "0.11.0", | ||
|
||
// This field is optional. | ||
// Each dependency must either provide a `url` and `hash`, or a `path`. | ||
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively. | ||
// Once all dependencies are fetched, `zig build` no longer requires | ||
// internet connectivity. | ||
.dependencies = .{ | ||
.amqp = .{ | ||
.url = "../../", | ||
.hash = "12201e2af5138be09dec4dfdd163cf8ef3c15c7c39e202661b64d71c6271a9d0886e", | ||
}, | ||
}, | ||
.paths = .{ | ||
// This makes *all* files, recursively, included in this package. It is generally | ||
// better to explicitly list the files and directories instead, to insure that | ||
// fetching from tarballs, file system paths, and version control all result | ||
// in the same contents hash. | ||
"", | ||
// For example... | ||
//"build.zig", | ||
//"build.zig.zon", | ||
//"src", | ||
//"LICENSE", | ||
//"README.md", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.{ | ||
.name = "simple_publish", | ||
// This is a [Semantic Version](https://semver.org/). | ||
// In a future version of Zig it will be used for package deduplication. | ||
.version = "0.0.0", | ||
|
||
// This field is optional. | ||
// This is currently advisory only; Zig does not yet do anything | ||
// with this value. | ||
//.minimum_zig_version = "0.11.0", | ||
|
||
// This field is optional. | ||
// Each dependency must either provide a `url` and `hash`, or a `path`. | ||
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively. | ||
// Once all dependencies are fetched, `zig build` no longer requires | ||
// internet connectivity. | ||
.dependencies = .{ | ||
.amqp = .{ | ||
.url = "../../", | ||
.hash = "12201e2af5138be09dec4dfdd163cf8ef3c15c7c39e202661b64d71c6271a9d0886e", | ||
}, | ||
}, | ||
.paths = .{ | ||
// This makes *all* files, recursively, included in this package. It is generally | ||
// better to explicitly list the files and directories instead, to insure that | ||
// fetching from tarballs, file system paths, and version control all result | ||
// in the same contents hash. | ||
"", | ||
// For example... | ||
//"build.zig", | ||
//"build.zig.zon", | ||
//"src", | ||
//"LICENSE", | ||
//"README.md", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.