Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Zig mount example #217

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Conversation

ereslibre
Copy link
Contributor

No description provided.

@@ -90,7 +97,7 @@ pub const Output = struct {
}

// prepare writer for json
var out_buf: [1024]u8 = undefined;
var out_buf: [4096]u8 = undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this merges I'm going to open an issue to need an allocator here instead of fixed sizes on the stack.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good 👍

@@ -129,7 +134,7 @@ fn base64Encode(data: []const u8) []const u8 {
// This initializing Base64Encoder throws weird error if not wrapped in function (maybe Zig bug?)
var enc = std.base64.Base64Encoder.init(std.base64.standard_alphabet_chars, '=');
var data_len = enc.calcSize(data.len);
var buf: [128]u8 = undefined;
var buf: [16384]u8 = undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this merges I'm going to open an issue to need an allocator here instead of fixed sizes on the stack.

Copy link
Contributor

@Angelmmiguel Angelmmiguel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -90,7 +97,7 @@ pub const Output = struct {
}

// prepare writer for json
var out_buf: [1024]u8 = undefined;
var out_buf: [4096]u8 = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good 👍

@ereslibre ereslibre merged commit be17854 into vmware-labs:main Sep 14, 2023
@ereslibre ereslibre deleted the zig-mount branch September 14, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants