-
Notifications
You must be signed in to change notification settings - Fork 3
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
windows support [tracking issue] #10
Comments
Great project, I've forked the repo and I'll try to add windows support |
I briefly took a look at the current implementation and to be honest, it's a bit weird. Currently, symbolic links are used, and For env, we can use This means that simply using symbolic links is not user-friendly. Can we copy the file directly? |
And I checked other zig version managers, and the results don’t look ideal. |
Hi @jinzhongjia, Cool that you like the project! I'm thrilled to hear that you are working on adding Windows support. Contributions are greatly appreciated. Regarding the use of symbolic links, I agree that the current implementation poses challenges, especially on Windows where symbolic links require special permissions. Given zig's limited support for symlinks on Windows, my first suggestion is to consider using some native C libraries until Zig's api got better. This approach worked well for us with the extraction (libarchive) function in versions 0.1 and 0.2 of zvm. Feel free to reach out if you need any assistance or have more ideas to discuss. I'm happy to help! |
Native c library? Aha |
No, not for symlinks 😅 I meant more the general approach. I think your idea of copy/creating the file instead should work, something like this: const symlink = try std.fs.path.join(allocator, &[_][]const u8{ dir, "master" });
defer allocator.free(symlink);
if (builtin.os.tag == .windows) {
var file = try std.fs.createFileAbsolute(symlink, .{});
defer file.close();
try file.writer().writeAll(url.version);
} |
I get it |
Currently I'm stuck on decompressing the zip. I don't understand why zig's zip function is designed so strangely. |
It requires me to specify a decompress_size, strange behavior |
Ok I found some related examples and I will try it |
In addition, I wonder if we can expose the various functions of the whole to the outside world as modules? |
Could you please provide more specific details on what you mean by "exposing the various functions of the whole to the outside world as modules"? To ensure we address this properly, it would be helpful if you could open an issue with the detailed requirements and use cases. |
To put it simply, it just exposes the package to the outside world to facilitate third-party calls. |
tbd
The text was updated successfully, but these errors were encountered: