-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7cd8355
commit b8a6cbd
Showing
7 changed files
with
111 additions
and
141 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
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,20 +1,28 @@ | ||
// ! this file just store some config meta data | ||
const std = @import("std"); | ||
const builtin = @import("builtin"); | ||
|
||
var allocator: std.mem.Allocator = undefined; | ||
var home_dir: []const u8 = undefined; | ||
/// global allocator | ||
pub var allocator: std.mem.Allocator = undefined; | ||
/// home dir environment variable | ||
pub var home_dir: []const u8 = undefined; | ||
|
||
/// zig meta data url | ||
pub const zig_meta_url: []const u8 = "https://ziglang.org/download/index.json"; | ||
/// zls meta data url | ||
pub const zls_meta_url: []const u8 = "https://zigtools-releases.nyc3.digitaloceanspaces.com/zls/index.json"; | ||
|
||
/// parsed zig url | ||
pub const zig_url = std.Uri.parse(zig_meta_url) catch unreachable; | ||
/// parsed zls url | ||
pub const zls_url = std.Uri.parse(zls_meta_url) catch unreachable; | ||
|
||
/// zig file name | ||
pub const zig_name = switch (builtin.os.tag) { | ||
.windows => "zig.exe", | ||
.linux => "zig", | ||
.macos => "zig", | ||
.linux, .macos => "zig", | ||
else => @compileError("not support current platform"), | ||
}; | ||
|
||
pub const archive_ext = if (builtin.os.tag == .windows) "zip" else "tar.xz"; | ||
/// zig archive_ext | ||
pub const zig_archive_ext = if (builtin.os.tag == .windows) "zip" else "tar.xz"; |
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
This file was deleted.
Oops, something went wrong.