zz
TinyGo
Our great sponsors
zz | TinyGo | |
---|---|---|
10 | 95 | |
1,604 | 14,439 | |
- | 1.5% | |
1.9 | 9.4 | |
almost 2 years ago | 2 days ago | |
Rust | Go | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
zz
- A "logical" compiler
-
Is it possible to have a superset of the C programming languages standard that is as safe as Rust?
There is this: https://github.com/zetzit/zz
-
ISO C became unusable for operating systems development
You're right that you can't define a safe subset of C without making it practical. MISRA C defines a C subset intended to help avoid C's footguns, but it still isn't actually a safe language. There are alternative approaches though:
1. Compile a safe language to C (whether a new language or an existing one)
2. Formal analysis of C, or of some practical subset of C, to prove the absence of undefined behaviour
Work has been done on both approaches.
ZZ compiles to C. [0] Dafny can compile to C++, but it seems that's not its primary target. [1][2]
There are several projects on formal analysis of C. [3][4][5][6]
[0] https://github.com/zetzit/zz
[1] https://github.com/dafny-lang/dafny
[2] https://dafny-lang.github.io/dafny/
[4] https://www.microsoft.com/en-us/research/project/vcc-a-verif...
-
Foundations of Dawn: The Untyped Concatenative Calculus
Formal methods have been used successfully for decades; it's not just a pipe dream. Perfect software should ideally be something like ultra-low-defect software, though (that's the term the AdaCore folks use).
There are also other projects that aim to make formal software development much easier [0][1] and of course there's SPARK Ada.
- ZetZ: A zymbolic verifier and tranzpiler to bare metal C Resources
-
Programming in Z3 by learning to think like a compiler
This post reminds me that I've been wanting to try out ZetZ[0]. It incorporates Z3 into a high-level programming language, and seems to do a lot of what the post talks about automatically.
-
Grids in Rust, part 2: const generics
I still want to try the ZZ language (https://github.com/zetzit/zz) someday. It compiles to C, and uses a SMT solver to prove that you don't index out-of-bounds at compile time. But I don't like how it lacks generics, uses C idioms, and compiles to C.
-
Another technique to manage memory
The zz language uses a SMT solver to check for program soundness... I haven't tried it, but that's got to be more flexible and resource-hungry.
-
We are building a new systems programming language
Especially the fact that it outputs C code. So interop is seamless.
For any systems language, interop with C is the litmus test.
With that in mind, this new language should not require 15,000 lines of standard library. A type-safe wrapper for libc should be enough...
-
Does such a language already exist ("Rust--")?
You might find ZetZ interesting!
TinyGo
- Gokrazy – Go Appliances
-
A "Tiny" APISIX Plugin
Reading through the documentation, you will understand why this plugin is called "tiny," i.e., the SDK uses the TinyGo compiler instead of the official Go compiler. You can read more about why this is the case on the SDK\'s overview page, but the TLDR version is that the Go compiler can only produce Wasm binaries that run in the browser.
-
What's Zig got that C, Rust and Go don't have? [video]
Not only you can fit Go into a kernel, there is at least two products that do so.
TamaGo, used to write the firmware used in USB armory.
https://www.withsecure.com/en/solutions/innovative-security-...
TinyGo, which even has official Arduino and ARM support, and is sponsored by Google
Ah but that isn't proper Go! Well neither is the C code that is allowed to be used in typical kernel code, almost nothing from ISO C standard library is available, and usually plenty of compiler specific language extensions are used instead.
-
Show HN: A new stdlib for Golang focusing on platform native support
Reminds me of https://tinygo.org/ - a project that brings Golang to embedded devices, browser (wasm) contexts. Do you converge or diverge from that project?
- TinyGo release 0.29 is out
-
Pico with C
You should also consider TinyGo. It can compile Go for the Pico, and is starting to get good device support.
-
Rust 1.71.0
Thankfully some folks completly ignored whatever the rest of the world thinks system programming is all about and created:
- TinyGo (https://tinygo.org/), which is acknowledged by people in the industry[0][1]
- TamaGo unikernel on USB Armory secure key (https://www.withsecure.com/de/solutions/innovative-security-...)
And then there is the question if writing compilers, assemblers, linkers is systems programming or not.
[0]-https://www.cnx-software.com/2019/08/28/tinygo-go-compiler-f...
[1]-https://twitter.com/ArmSoftwareDev/status/131680481331796787...
-
When would you (not) recommend Go over Rust?
Have you seen TinyGo? In the case of embedded system I would probably still chose C over Rust if the system didn't support dynamic memory allocation, and most embedded systems do not.
-
“C is quirky, flawed, and an enormous success” – Dennis Ritchie
>I really hate how for microcontrollers the only two choices are either C++ or Micropython
There's TinyGo as well. https://tinygo.org/
-
WebAssembly System Interface (WASI) with sockets for Go
Gist link fixed, thanks. Compared to TinyGo, Go with GOOS=wasip1 will probably generate larger artifacts (at least, for now). This is because it bundles the entire Go runtime. The benefit is that it fully supports goroutine scheduling and non-blocking I/O. TinyGo (I believe) still uses a custom asyncify pass and does not support non-blocking I/O nor basic WASI networking (e.g. https://github.com/tinygo-org/tinygo/pull/2748 never landed, but GOOS=wasip1 supports it).
What are some alternatives?
checkedc - Checked C is an extension to C that lets programmers write C code that is guaranteed by the compiler to be type-safe. The goal is to let people easily make their existing C code type-safe and eliminate entire classes of errors. Checked C does not address use-after-free errors. This repo has a wiki for Checked C, sample code, the specification, and test code.
MicroPython - MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
angr - A powerful and user-friendly binary analysis platform!
go - The Go programming language
alive2 - Automatic verification of LLVM optimizations
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
CrossHair - An analysis tool for Python that blurs the line between testing and type systems.
micropython-ulab - a numpy-like fast vector module for micropython, circuitpython, and their derivatives
micro-mitten - You might not need your garbage collector
awesome-micropython - A curated list of awesome MicroPython libraries, frameworks, software and resources.
pony-tutorial - :horse: Tutorial for the Pony programming language
PlatformIO - Your Gateway to Embedded Software Development Excellence :alien: