From 0b24f2f1889a335a6367bad3ebf113a4a4b9c5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Catarino=20Fran=C3=A7a?= Date: Thu, 10 Aug 2023 16:32:30 -0300 Subject: [PATCH] Zig build --- README.md | 27 ++++----- assets/img/zig-console.png | Bin 0 -> 11413 bytes templates.json | 21 +++++++ zigConsole/.conf/deps.json | 8 +++ zigConsole/.conf/id_rsa | 27 +++++++++ zigConsole/.conf/id_rsa.pub | 1 + zigConsole/.conf/update.json | 6 ++ zigConsole/.dockerignore | 1 + zigConsole/.gitignore | 1 + zigConsole/Dockerfile | 106 ++++++++++++++++++++++++++++++++++ zigConsole/Dockerfile.debug | 94 ++++++++++++++++++++++++++++++ zigConsole/Dockerfile.sdk | 34 +++++++++++ zigConsole/build.zig | 38 ++++++++++++ zigConsole/docker-compose.yml | 15 +++++ zigConsole/src/main.zig | 12 ++++ 15 files changed, 378 insertions(+), 13 deletions(-) create mode 100644 assets/img/zig-console.png create mode 100644 zigConsole/.conf/deps.json create mode 100644 zigConsole/.conf/id_rsa create mode 100644 zigConsole/.conf/id_rsa.pub create mode 100644 zigConsole/.conf/update.json create mode 100644 zigConsole/.dockerignore create mode 100644 zigConsole/.gitignore create mode 100644 zigConsole/Dockerfile create mode 100644 zigConsole/Dockerfile.debug create mode 100644 zigConsole/Dockerfile.sdk create mode 100644 zigConsole/build.zig create mode 100644 zigConsole/docker-compose.yml create mode 100644 zigConsole/src/main.zig diff --git a/README.md b/README.md index e251a964e..4a01315e2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This repository maintains the templates used in conjunction with the [VS Code To | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | ----------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/cppconsole.png?raw=true) | C++ Console Application | libc | C++ | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/riscv64.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/x8664.png?raw=true) | [cppConsole](./cppConsole) | | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/qt6qml.png?raw=true) | C++ Qt 6 QML Application | Qt 6 | C++ / QML | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true)  ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/x8664.png?raw=true) | [cppQML](./cppQML) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/dotnetconsole.png?raw=true) | .NET 6 C# Console Application | .NET 6.0 | C# | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true)  ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/x8664.png?raw=true) | [dotnetConsole](./dotnetConsole) | +| ![](assets/img/dotnetconsole.png?raw=true) | .NET 6 C# Console Application | .NET 6.0 | C# | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true)  ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/x8664.png?raw=true) | [dotnetConsole](./dotnetConsole) | | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/unogtk.png?raw=true) | .NET 6 C# Uno Platform Skia.GTK | .NET 6.0 | C# | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true)  ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/x8664.png?raw=true) | [dotnetUno](./dotnetUno) | | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/aspnetblazor.png?raw=true) | ASP.NET 6 Blazor Application | ASP.NET 6.0 | C# | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true)  ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/x8664.png?raw=true) | [aspnetBlazor](./aspnetBlazor) | | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/python3console.png?raw=true) | Python 3 Console Application | Python 3 | Python 3 | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true) | [python3Console](./python3Console) | @@ -25,8 +25,8 @@ Partner templates are contributions that come from [Toradex partner network](htt | TEMPLATE | DESCRIPTION | RUNTIME | LANGUAGE | HW ARCH | FOLDER | | ---------------------------------------------------------------------------------------------------- | ---------------------- | --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/slint-cpp.png?raw=true) | C++ Slint Application | Slint 1.0 | C++ | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true) | [cppSlint](./cppSlint) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/slint-rust.png?raw=true) | Rust Slint Application | Slint 1.0 | Rust | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true) | [rustSlint](./rustSlint) | +| ![](assets/img/slint-cpp.png?raw=true) | C++ Slint Application | Slint 1.0 | C++ | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true) | [cppSlint](./cppSlint) | +| ![](assets/img/slint-rust.png?raw=true) | Rust Slint Application | Slint 1.0 | Rust | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true) | [rustSlint](./rustSlint) | @@ -44,13 +44,14 @@ We encourage you to also contribute templates. The community supported templates | TEMPLATE | DESCRIPTION | RUNTIME | LANGUAGE | HW ARCH | FOLDER | CONTRIBUTOR | | ------------------------------------------------------------------------------------------------------------- | --------------------------------------- | -------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:-------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/rust-console.png?raw=true) | Rust Console Application | libc | Rust | ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm64.png?raw=true) | [rustConsole](./rustConsole) | ![](https://avatars.githubusercontent.com/u/19845403?v=4)[@skkywalker](https://www.github.com/skkywalker) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/jframe.png?raw=true) | Java Swing JFrame Application | JRE | Java | ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm64.png?raw=true) | [javaForms](./javaForms) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/nodejsts.png?raw=true) | Node.js TypeScript Application | Node.js | TypeScript | ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm64.png?raw=true) | [nodeJSTypeScript](./nodeJSTypeScript) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/electronjs.png?raw=true) | Node.js JavaScript Electron Application | Electron | JavaScript | ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm64.png?raw=true) | [nodeElectron](./nodeElectron) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/monowinforms.png?raw=true) | Mono 4.7 C# Windows Forms Application | .NET 4.7 | C# | ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm64.png?raw=true) | [monoCsharpForms](./monoCsharpForms) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/unofbdrm.png?raw=true) | .NET 6 C# Uno Platform Frame Buffer | .NET 6.0 | C# | ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm64.png?raw=true) | [dotnetUnoFrameBuffer](./dotnetUnoFrameBuffer) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/avaloniafbdrm.png?raw=true) | .NET 6 C# Avalonia Frame Buffer DRM | .NET 6.0 | C# | ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm64.png?raw=true) | [dotnetAvaloniaFrameBuffer](./dotnetAvaloniaFrameBuffer) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/avaloniagtk.png?raw=true) | .NET 6 C# Avalonia GTK MVVM | .NET 6.0 | C# | ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm64.png?raw=true) | [dotnetAvalonia](./dotnetAvalonia) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/gambasform.png?raw=true) | Gambas3 Form Project | Gambas3 | Visual Basic | ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/dev/assets/img/arm64.png?raw=true) | [gambasForms](./gambasForms) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | -| ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/python3console.png?raw=true) | Python 3 Pyside 2(Qt5) QML | Pyside 2 | Python 3 | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm64.png?raw=true) | [python3Pyside2QML](./python3Pyside2QML) | ![](https://avatars.githubusercontent.com/u/83607022?v=4) [@andreriesco](https://www.github.com/andreriesco) | +| ![](assets/img/rust-console.png?raw=true) | Rust Console Application | libc | Rust | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [rustConsole](./rustConsole) | ![](https://avatars.githubusercontent.com/u/19845403?v=4)[@skkywalker](https://www.github.com/skkywalker) | +| ![](assets/img/jframe.png?raw=true) | Java Swing JFrame Application | JRE | Java | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [javaForms](./javaForms) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | +| ![](assets/img/nodejsts.png?raw=true) | Node.js TypeScript Application | Node.js | TypeScript | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [nodeJSTypeScript](./nodeJSTypeScript) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | +| ![](assets/img/electronjs.png?raw=true) | Node.js JavaScript Electron Application | Electron | JavaScript | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [nodeElectron](./nodeElectron) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | +| ![](assets/img/monowinforms.png?raw=true) | Mono 4.7 C# Windows Forms Application | .NET 4.7 | C# | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [monoCsharpForms](./monoCsharpForms) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | +| ![](assets/img/unofbdrm.png?raw=true) | .NET 6 C# Uno Platform Frame Buffer | .NET 6.0 | C# | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [dotnetUnoFrameBuffer](./dotnetUnoFrameBuffer) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | +| ![](assets/img/avaloniafbdrm.png?raw=true) | .NET 6 C# Avalonia Frame Buffer DRM | .NET 6.0 | C# | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [dotnetAvaloniaFrameBuffer](./dotnetAvaloniaFrameBuffer) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | +| ![](assets/img/avaloniagtk.png?raw=true) | .NET 6 C# Avalonia GTK MVVM | .NET 6.0 | C# | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [dotnetAvalonia](./dotnetAvalonia) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | +| ![](assets/img/gambasform.png?raw=true) | Gambas3 Form Project | Gambas3 | Visual Basic | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [gambasForms](./gambasForms) | ![](https://avatars.githubusercontent.com/u/2633321?v=4) [@microhobby](https://www.github.com/microhobby) | +| ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/python3console.png?raw=true) | Python 3 Pyside 2(Qt5) QML | Pyside 2 | Python 3 | ![](https://github.com/toradex/vscode-torizon-templates/blob/bookworm/assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [python3Pyside2QML](./python3Pyside2QML) | ![](https://avatars.githubusercontent.com/u/83607022?v=4) [@andreriesco](https://www.github.com/andreriesco) | +![](assets/img/zig-console.png?raw=true) | Zig Console Application | no-libc | Zig | ![](assets/img/arm32.png?raw=true) ![](assets/img/arm64.png?raw=true) | [zigConsole](./zigConsole) | ![](https://avatars.githubusercontent.com/u/6756180?v=4)[@kassane](https://www.github.com/kassane) | diff --git a/assets/img/zig-console.png b/assets/img/zig-console.png new file mode 100644 index 0000000000000000000000000000000000000000..3c637500d4b48ea7a26297e1dc2f0852de458975 GIT binary patch literal 11413 zcmbulcTkf-`z{=M?@cfq^)iQ0^y0? z{78v`7T>@mZ{VMZ7Z8ZSBM5}Y&EvJ>3l|3v=uS#tilTO>3P-oiNZc1=#!1yKFvPnu zK2B~-m@!|in91B*^7{eBhiZNy@uV>4_V(oNlJNMda_aIho)f%<^@Y!?yaHDeLe(+5 zbM@S~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+}CH?1umK&Fy<`|FjuwaGGSph0&JsyZ#3aGa9?B@IpS$(Yw!Qp#uDEH`y&z0i4^cq zfr^8#Jln>`rKUvRJaWWLBeVtzEiNsm7JrSYUKsjshUoiq^ewBpjQ?VJie zyz?&AXbu{AD*iEpL7VBSXC&({oz?nS_nbAg59+aByq)dj-_QN``s zEH+P}k&Qk$O$}dPOr>3fhIRsGsISwi5t09;jOsO)T*wHdh~>?G^PDaVvt6N-ge*&z ztgCw9lPAMuz)d2OsB6h1Kfj#%J`}pTfzxu> /etc/ssh/sshd_config && \ + echo "Port ${SSH_DEBUG_PORT}" >> /etc/ssh/sshd_config && \ + su -c "env" $SSHUSERNAME > /etc/environment + +RUN rm -r /etc/ssh/ssh*key && \ + dpkg-reconfigure openssh-server + +CMD [ "/usr/sbin/sshd", "-D" ] diff --git a/zigConsole/Dockerfile.sdk b/zigConsole/Dockerfile.sdk new file mode 100644 index 000000000..3090ab386 --- /dev/null +++ b/zigConsole/Dockerfile.sdk @@ -0,0 +1,34 @@ +# ARGUMENTS -------------------------------------------------------------------- +ARG CROSS_SDK_BASE_TAG=3.0.9-bookworm + +## +# Board architecture +# arm or arm64 +## +ARG IMAGE_ARCH= + + +# BUILD ------------------------------------------------------------------------ +FROM torizon/debian-cross-toolchain-${IMAGE_ARCH}:${CROSS_SDK_BASE_TAG} + +# __deps__ +RUN apt-get -q -y update && \ + apt-get -q -y install \ + # ADD YOUR PACKAGES HERE + && \ + apt-get clean && apt-get autoremove && \ + rm -rf /var/lib/apt/lists/* +# __deps__ + +# automate for torizonPackages.json +RUN apt-get -q -y update && \ + apt-get -q -y install \ +# DO NOT REMOVE THIS LABEL: this is used for VS Code automation + # __torizon_packages_dev_start__ + # __torizon_packages_dev_end__ +# DO NOT REMOVE THIS LABEL: this is used for VS Code automation + && \ + apt-get clean && apt-get autoremove && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /app diff --git a/zigConsole/build.zig b/zigConsole/build.zig new file mode 100644 index 000000000..598dd4d20 --- /dev/null +++ b/zigConsole/build.zig @@ -0,0 +1,38 @@ +const std = @import("std"); +const Path = std.Build.LazyPath; + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const mode = switch (optimize) { + .ReleaseFast, .ReleaseSafe, .ReleaseSmall => "release", + else => "debug", + }; + const triple_target = target.linuxTriple(b.allocator) catch &.{}; + + const binary = b.addExecutable(.{ + .name = "__change__", + .root_source_file = Path.relative("src/main.zig"), + // or (implicit LazyPath struct, w/ path field) + // .root_source_file = .{ .path = "src/main.zig" }, + .target = target, + .optimize = optimize, + }); + + // Need use libc to C code build? uncomment below + // build C and/or C++ + // binary.addCSourceFile(.{ .file = Path.relative("src/main.c"), .flags = &.{ "-Wall", "-Wextra" } }); + // binary.addCSourceFiles(&.{ "foo.cc", "bar.cc" }, &.{ "-Wall", "-std=c++17" }); + // warning to mixing C and C++ code. Use same flags, but c++flags(exclusive) not working (e.g.: "-std=c++11") + + // linking + // binary.linklibC() // get libc and c-stdlib + // for C++ + // binary.linklibCpp(); // builtin llvm-libcxx/abi + libunwind (+ stl) + libc (avoid duplicate - no need linklibC()) + + // copy binary from zig-cache to zig-out/bin [default] + b.installArtifact(binary); + // overwritten: copy binary from zig-cache to zig-deploy/{triple-target}/{mode}/bin + b.resolveInstallPrefix(b.fmt("zig-deploy/{s}/{s}", .{ triple_target, mode }), .{}); +} diff --git a/zigConsole/docker-compose.yml b/zigConsole/docker-compose.yml new file mode 100644 index 000000000..3efdc7fe9 --- /dev/null +++ b/zigConsole/docker-compose.yml @@ -0,0 +1,15 @@ +version: "3.9" +services: + __container__-debug: + build: + context: . + dockerfile: Dockerfile.debug + image: ${LOCAL_REGISTRY}:5002/__container__-debug:${TAG} + ports: + - 2230:2230 + + __container__: + build: + context: . + dockerfile: Dockerfile + image: ${DOCKER_LOGIN}/__container__:${TAG} diff --git a/zigConsole/src/main.zig b/zigConsole/src/main.zig new file mode 100644 index 000000000..b30e4b97b --- /dev/null +++ b/zigConsole/src/main.zig @@ -0,0 +1,12 @@ +const std = @import("std"); +const log = std.log.scoped(.toradex); + +// override the std implementation +pub const std_options = struct { + pub const log_level = .info; +}; +pub fn main() void { + log.info("Hello {s}!\n", .{"Torizon"}); + // output: + // info(toradex): Hello Torizon! +}