Skip to content

Commit 90a6623

Browse files
MirsarioAfirium
authored andcommitted
Updated build & code for 0.14.0 release.
1 parent 95354c7 commit 90a6623

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

build.zig.zon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.{
2-
.name = "wasmer_zig_api",
2+
.fingerprint = 0xadae4aecca466a13,
3+
.name = .wasmer_zig_api,
34
.version = "0.2.0",
45
.minimum_zig_version = "0.14.0",
56
.paths = .{

src/wasmer.zig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ pub fn detectWasmerLibDir(allocator: std.mem.Allocator) !?[]const u8 {
3333
var child = std.process.Child.init(&argv, allocator);
3434
child.stdout_behavior = .Pipe;
3535
child.stderr_behavior = .Pipe;
36-
var stdout = std.ArrayList(u8).init(allocator);
37-
var stderr = std.ArrayList(u8).init(allocator);
36+
var stdout = std.ArrayListUnmanaged(u8) {};
37+
var stderr = std.ArrayListUnmanaged(u8) {};
3838
defer {
39-
stdout.deinit();
40-
stderr.deinit();
39+
stdout.deinit(allocator);
40+
stderr.deinit(allocator);
4141
}
4242

4343
try child.spawn();
44-
try child.collectOutput(&stdout, &stderr, OS_PATH_MAX);
44+
try child.collectOutput(allocator, &stdout, &stderr, OS_PATH_MAX);
4545

4646
const term = try child.wait();
4747

4848
if (stderr.items.len != 0 or term.Exited != 0) return null;
4949

50-
const stdout_res = try stdout.toOwnedSlice();
50+
const stdout_res = try stdout.toOwnedSlice(allocator);
5151
defer allocator.free(stdout_res);
5252

5353
return try allocator.dupe(u8, std.mem.trimRight(u8, stdout_res, "\r\n"));

0 commit comments

Comments
 (0)