tamago
totally-safe-transmute | tamago | |
---|---|---|
17 | 13 | |
256 | 1,346 | |
- | 3.8% | |
0.0 | 7.8 | |
about 2 years ago | 9 days ago | |
Rust | Go | |
- | BSD 3-clause "New" or "Revised" License |
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.
totally-safe-transmute
-
Sudo Replacement
For example, there is this (pure safe Rust) code: https://github.com/ben0x539/totally-safe-transmute/blob/main... which accesses external resources (/proc/self/mem) in order to violate the safety guarantees.
-
A rust crate that lets you compress ASCII text to a single Unicode "character"
The first is the totally_safe_transmute crate. I mean, who wouldn't love library code that has .expect("welp") and .expect("oof") as its error handling? But that's not even the really scary part. Issue #2 ("i hate this") remains open to this day, but for obvious reasons there's no chance of resolution. This post has some context and a line-by-line explanation of how it works.
-
What do you expect from Rust in 2023?
You mean like this?
-
In C# you can transmute without `unsafe`
You can also do that in rust on linux: https://github.com/ben0x539/totally-safe-transmute/blob/master/src/lib.rs
-
Why choose Rust
I want to correct this statement: Rust can be safer, but not if a library you use contains unsound code. Unsoundness is most often caused by unsafe code, but not always (totally_safe_transmute, anyone?). There is a misconception that unsafe code blocks are always unsound and should be avoided at all costs, but they're completely fine if the safety contracts are upheld. In fact, unsafe blocks isolate the potential issues to make it easier to identify where undefined behavior may be occurring. unsafe code blocks are a feature of the language, and their usage should not be viewed as opting out of any safety the language provides, imo.
-
"# NONONONONONO DON'T YOU FUCKIN' DARE the safety features are there so that your programs aren't filled to the brim with security vulnerabilities. Unless you care A LOT(And I mean A LOT A LOT) about compile times, never use `unsafe`."
Just reimplement totally_safe_transmute in Zig. No need for unsafe.
-
I mean, it solves most library conflicts
Why transmute() when you can totally_safe_transmute()?
- Safe Transmute
-
Static Analyzer Rudra Found over 200 Memory Safety Issues in Rust Crates
Well, there is always the totally-safe-transmute.
-
// SAFETY: NO
They should use https://github.com/ben0x539/totally-safe-transmute
tamago
- Gokrazy – Go Appliances
-
OS in Go? Why Not
There's two major production-ready Go-based operating system(-ish) projects:
- Google's gVisor[1] (a re-implementation of a significant subset of the Linux syscall ABI for isolation, also mentioned in the article)
- USBArmory's Tamago[2] (a single-threaded bare-metal Go runtime for SOCs)
Both of these are security-focused with a clear trade off: sacrifice some performance for memory safe and excellent readability (and auditability). I feel like that's the sweet spot for low-level Go - projects that need memory safety but would rather trade some performance for simplicity.
[1]: https://github.com/google/gvisor
[2]: https://github.com/usbarmory/tamago
- Does Go work well as a systems language?
- Koji vam je sitan bug najviše ostao upamćen?
-
Rust 2024 the Year of Everywhere?
Of course it can, there are companies shipping products written in bare metal Go.
https://www.withsecure.com/en/solutions/innovative-security-...
https://github.com/usbarmory/tamago
-
Embedded Go finally got the first binary release
For comparison, what are the differences in goals and approach with Tamago? https://github.com/usbarmory/tamago
-
Taking a deep dive into C++ gave me more appreciation for Go's simplicity
I've been keeping an eye on TinyGo (Go compiler that targets microcontrollers and uses LLVM) and also TamaGo (allows you to run Go on bare metal, without any C dependency).
-
A native Go userland for your Raspberry Pi 3 or 4 appliances
If you want to go deeper, there is also bare-metal Go runtime for rpi (among others): https://github.com/f-secure-foundry/tamago
- TamaGo – bare metal Go for ARM SoCs
-
ISO C became unusable for operating systems development
> just proves your lack of knowledge
Tone is not needed.
For TamaGo, it seems to allow developers run their application, not build an OS on the hardware. But I have not played with it, you are right.
> TamaGo is a framework that enables compilation and execution of unencumbered Go applications on bare metal
The environment does not seem to allow building a generic operating system [1]. F-Secure ported the runtime itself to boot natively. But please correct me.
> There is no thread support
The environment you run in is specifically curated for Go applications, such as the memory layout. I'd call this an "appliance" rather than enabling Go to be used for full-fledged generic operating system implementations.
[1] https://github.com/f-secure-foundry/tamago/wiki/Internals
What are some alternatives?
tinyvec - Just, really the littlest Vec you could need. So smol.
gokrazy - turn your Go program(s) into an appliance running on the Raspberry Pi 3, Pi 4, Pi 5, Pi Zero 2 W, or amd64 PCs!
project-safe-transmute - Project group working on the "safe transmute" feature
nerves - Craft and deploy bulletproof embedded software in Elixir
DumbIdeas
usbarmory - USB armory - The open source compact secure computer
advisory-db - Security advisory database for Rust crates published through crates.io
linux - Linux kernel source tree
UnsoundCrates - Black list of all crates that promotes unsoundness
checkedc - Checked C is an extension to C that lets programmers write C code with bounds checking and improved type-safety. The goal is to let people easily make their existing C code type-safe and eliminate entire classes of errors.
base32768 - Binary-to-text encoding highly optimised for UTF-16
patch - Patches that add Embedded Go supported architectures to the reference Go compiler