[#25] New language: Zig
This commit is contained in:
parent
907715475d
commit
85d0a42371
|
@ -0,0 +1,44 @@
|
|||
id: "zig"
|
||||
name: "Zig"
|
||||
|
||||
info:
|
||||
year: 2016
|
||||
desc: "General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software"
|
||||
ext:
|
||||
- zig
|
||||
web:
|
||||
wiki: "https://en.wikipedia.org/wiki/Zig_(programming_language)"
|
||||
home: "https://ziglang.org/"
|
||||
source: "https://github.com/ziglang/zig"
|
||||
category: general
|
||||
mode: compiled
|
||||
platform: []
|
||||
syntax: lua
|
||||
typing: static
|
||||
paradigm:
|
||||
- imperative
|
||||
usage: []
|
||||
|
||||
install:
|
||||
prepare:
|
||||
apt:
|
||||
- squashfs-tools
|
||||
manual: |
|
||||
install -d "${pkg}/opt"
|
||||
install -d "${pkg}/usr/local/bin"
|
||||
|
||||
url="$(curl -fsSL -H "X-Ubuntu-Series: 16" "https://api.snapcraft.io/api/v1/snaps/details/zig?channel=beta" | jq .download_url -r)"
|
||||
wget "${url}" -O zip.snap
|
||||
unsquashfs -d "${pkg}/opt/zig" zip.snap
|
||||
ln -s /opt/zig/zig "${pkg}/usr/local/bin/"
|
||||
|
||||
main: main.zig
|
||||
template: |
|
||||
const std = @import("std");
|
||||
|
||||
pub fn main() anyerror!void {
|
||||
std.log.info("Hello, world!", .{});
|
||||
}
|
||||
|
||||
run: |
|
||||
zig run main.zig
|
Loading…
Reference in New Issue