Our great sponsors
-
TinyGo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
cross
Discontinued “Zero setup” cross compilation and “cross testing” of Rust crates [Moved to: https://github.com/cross-rs/cross] (by rust-embedded)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
That's interesting thanks!here is tiny go for working in such cases, however I am not familiar with it. https://tinygo.org/
(When you're using unsafe, you may need Loom and/or the data race detector built into miri... Miri being an analogue to LLVM's sanitizers built on top of the execution engine used for evaluating const functions at compile-time.)
...though, funny enough, if you have enough experience with Rust to not get bogged down in the details and you use cross to work around Rust's "take your time but get it right" approach to cross-building, Rust is often better at little CLI tools, purely because of how valuable it is to be able to teach the type system to check so many invariants at compile time.
If you’d like to get your hands on typing out some examples, check out https://github.com/rust-lang/rustlings :)
For example, here I've hooked into __libc_start_main as part of an injector that injects the .NET runtime into a running process' address space. I could have done this with C or C++ with a little bit less safety and some more annoying package management, but I'm not aware of any way that Go gives me such low level access. And of course firing up the Go runtime within an existing address space when its only job is to launch another runtime is a bit of a dealbreaker here as well.