Releases: zigzap/zap
release-0.0.22
ZAP Release release-0.0.22
Updates
- synced to std.json updates. Thx to @edyu for the PR!
- no more
-localhost
workaround releases 🥳 since the TLS bug is fixed in zig master!
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.22
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.22.tar.gz",
.hash = "12204761c4f94997c3bd26f420cf9060541c0c09514370dc129e04b35e58d9f3ae71",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.22
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.22.tar.gz",
.hash = "12204761c4f94997c3bd26f420cf9060541c0c09514370dc129e04b35e58d9f3ae71",
}
}
}
Then, in your build.zig
's build
function, add the following before
exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));
release-0.0.21-localhost
ZAP Release release-0.0.21-localhost
This is probably the last localhost release, as 14 hours ago Andrew fixed the bug causing the need for it. Unfortunately, it didn't make it into the last nightly build.
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.21-localhost
.zap = .{
.url = "http://127.0.0.1:8000/release-0.0.21-localhost.tar.gz",
.hash = "12207c67914fc9f69de6d614df75364e85bc2ebd847a659e8a904981bc7bb125c3cd",
}
$ # get dependency required by zap
$ wget https://github.com/zigzap/facil.io/archive/refs/tags/zap-0.0.8.tar.gz
$ # get zap itself
$ wget https://github.com/zigzap/zap/archive/refs/tags/release-0.0.21-localhost.tar.gz
$ # start a http server on port 8000
$ python -m http.server
This hosts the downloaded dependencies locally on port 8000. After the firstzig build
, you can stop the python http server with CTRL+C.
From then on, this release of ZAP and its dependency will remain in ZIG's global build cache. So you don't need to start an HTTP server on every build.
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.21-localhost
.zap = .{
.url = "http://127.0.0.1:8000/release-0.0.21-localhost.tar.gz",
.hash = "12207c67914fc9f69de6d614df75364e85bc2ebd847a659e8a904981bc7bb125c3cd",
}
}
}
Then, in your build.zig
's build
function, add the following before
exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));
release-0.0.21
ZAP Release release-0.0.21
Updates
Middleware support! Check out the readme for more info and pointers.
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.21
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.21.tar.gz",
.hash = "12202384c46e9e2059fb5082c61c42aae2421edff233cb8cecef682114cbbabf7197",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.21
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.21.tar.gz",
.hash = "12202384c46e9e2059fb5082c61c42aae2421edff233cb8cecef682114cbbabf7197",
}
}
}
Then, in your build.zig
's build
function, add the following before
exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));
release-0.0.20-localhost
Just a quick one: SimpleHttpListener's ListenerSettings define an on_request
. If provided, this function will be called if no endpoint was found for an incoming request. The endpoints example has been updated accordingly.
// zap release-0.0.20-localhost
.zap = .{
.url = "http://127.0.0.1/release-0.0.20-localhost.tar.gz",
.hash = "12204c663be7639e98af40ad738780014b18bcf35efbdb4c701aad51c7dec45abf4d",
}
$ # get dependency required by zap
$ wget https://github.com/zigzap/facil.io/archive/refs/tags/zap-0.0.8.tar.gz
$ # get zap itself
$ wget https://github.com/zigzap/zap/archive/refs/tags/release-0.0.20-localhost.tar.gz
$ # start a http server on port 8000
$ python -m http.server
This hosts the downloaded dependencies locally on port 8000. After the firstzig build
, you can stop the python http server with CTRL+C.
From then on, this release of ZAP and its dependency will remain in ZIG's global build cache. So you don't need to start an HTTP server on every build.
release-0.0.20
ZAP Release release-0.0.20
Updates
SimpleEndpointListener now uses the on_request
callback if no endpoint matches the requested URL. See the updated endpoint example.
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.20
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.20.tar.gz",
.hash = "12200772b594bc50bbdc18b14aa3c7461991a33179f9c254de05eb34d214662971da",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.20
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.20.tar.gz",
.hash = "12200772b594bc50bbdc18b14aa3c7461991a33179f9c254de05eb34d214662971da",
}
}
}
Then, in your build.zig
's build
function, add the following before
exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));
release-0.0.19-localhost
ZAP Release release-0.0.19-localhost
Latest zig-master has problems handling the recent GitHub redirects to codeload.github.com
. My work-around for this is as follows:
Change your build.zig.zon
zap dependency to localhost:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.19-localhost
.zap = .{
.url = "http://127.0.0.1:8000/release-0.0.19-localhost.tar.gz",
.hash = "12201fe4eca3c4b43245d4268c22e5056b5d1b273e44cc9724f807a43c16b9b7b36f",
}
}
}
$ # get dependency required by zap
$ wget https://github.com/zigzap/facil.io/archive/refs/tags/zap-0.0.8.tar.gz
$ # get zap itself
$ wget https://github.com/zigzap/zap/archive/refs/tags/release-0.0.19-localhost.tar.gz
$ # start a http server on port 8000
$ python -m http.server
This hosts the downloaded dependencies locally on port 8000. After the firstzig build
, you can stop the python http server with CTRL+C.
Generic
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.11-localhost
.zap = .{
.url = "http://127.0.0.1:8000/release-0.0.19-localhost.tar.gz",
.hash = "12201fe4eca3c4b43245d4268c22e5056b5d1b273e44cc9724f807a43c16b9b7b36f",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.11-localhost
.zap = .{
.url = "http://127.0.0.1:8000/release-0.0.19-localhost.tar.gz",
.hash = "12201fe4eca3c4b43245d4268c22e5056b5d1b273e44cc9724f807a43c16b9b7b36f",
}
}
}
Then, in your build.zig
's build
function, add the following before
exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));
release-0.0.19
ZAP Release release-0.0.19
Updates
SimpleRequest.sendFile()
- see the example mentioned in the README.
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.19
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.19.tar.gz",
.hash = "1220e8618ae2240e22e1e01c3f5f8c95f70291cd5ca98c92bdfb86b01e81a9d0314b",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.19
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.19.tar.gz",
.hash = "1220e8618ae2240e22e1e01c3f5f8c95f70291cd5ca98c92bdfb86b01e81a9d0314b",
}
}
}
Then, in your build.zig
's build
function, add the following before
exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));
release-0.0.18
ZAP Release release-0.0.18
Updates:
Just a little fix in debug-logging. Makes watching the UserPassSessionAuth introduced in the previous release more intuitive.
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.18
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.18.tar.gz",
.hash = "12202080c00d04324721ea58a5120031109165177e89c5612edc74494f2d119b2a78",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.18
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.18.tar.gz",
.hash = "12202080c00d04324721ea58a5120031109165177e89c5612edc74494f2d119b2a78",
}
}
}
Then, in your build.zig
's build
function, add the following before
exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));
release-0.0.17
ZAP Release release-0.0.17
Update
UserPassSession Authentication!!! See the README for a pointer to the example.
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.17
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.17.tar.gz",
.hash = "12204e63afe2c140de953b584f6b0eca26135c072a74de76ea9ff37ad59fc2031d32",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.17
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.17.tar.gz",
.hash = "12204e63afe2c140de953b584f6b0eca26135c072a74de76ea9ff37ad59fc2031d32",
}
}
}
Then, in your build.zig
's build
function, add the following before
exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));
release-0.0.16
ZAP Release release-0.0.16
Updates
- websockets
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.16
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.16.tar.gz",
.hash = "12204921426e5cdd4e91be5cd0594efe0aff86409d0db44a31b26e427a6736327c9f",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.16
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.16.tar.gz",
.hash = "12204921426e5cdd4e91be5cd0594efe0aff86409d0db44a31b26e427a6736327c9f",
}
}
}
Then, in your build.zig
's build
function, add the following before
exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));