owning-ref-rs
Bronze
owning-ref-rs | Bronze | |
---|---|---|
5 | 6 | |
357 | 35 | |
- | - | |
0.0 | 0.0 | |
7 months ago | 12 months ago | |
Rust | Rust | |
MIT License | 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.
owning-ref-rs
-
New C++ features in GCC 12
Increasingly feeling that Rust is like Elm: a language with novel ideas, teaching valuable lessons (a vocabulary for teaching and checking thread safety, documenting exclusive vs. shared mutability in the type system, arguably a vocabulary for teaching and checking memory safety, though that comes at a steep cost), yet so stubborn the community treats its values (avoiding shared mutability) as moral judgments of code, and the language and deliberately obstructs writing code outside of approved patterns (single ownership tree, exclusive mutability). struct{Cell...}& doesn't need to be harder to use than C++ struct{T...}*, but Rust keeps it difficult because the community views it as bad code design and wants to keep it hard. And *mut T lacks RAII unlike C++'s unique_ptr, and requires unsafe blocks in every dereference. As a result, people turn to unsound patterns like https://github.com/kimundi/owning-ref-rs, https://github.com/mcoblenz/Bronze/, and https://github.com/emu-rs/snes-apu/blob/master/src/smp.rs#L5....
It's a good language to learn. I hesitate to consider it a replacement for asm/C/C++. Writing rust is hoping that the code you're porting to rust can adapt well to the restrictions, and if not, searching for esoteric and needlessly unsafe/verbose workarounds.
-
Unsoundness in owning_ref
Note that there are other soundness issues that require more fundamental changes to be fixed.
-
Self referential return type -> (Owned, Ref<'a>)
That's a shame. I dug into owning_ref, and it looks like it has an open soundness bug as well.
Bronze
-
New C++ features in GCC 12
Increasingly feeling that Rust is like Elm: a language with novel ideas, teaching valuable lessons (a vocabulary for teaching and checking thread safety, documenting exclusive vs. shared mutability in the type system, arguably a vocabulary for teaching and checking memory safety, though that comes at a steep cost), yet so stubborn the community treats its values (avoiding shared mutability) as moral judgments of code, and the language and deliberately obstructs writing code outside of approved patterns (single ownership tree, exclusive mutability). struct{Cell...}& doesn't need to be harder to use than C++ struct{T...}*, but Rust keeps it difficult because the community views it as bad code design and wants to keep it hard. And *mut T lacks RAII unlike C++'s unique_ptr, and requires unsafe blocks in every dereference. As a result, people turn to unsound patterns like https://github.com/kimundi/owning-ref-rs, https://github.com/mcoblenz/Bronze/, and https://github.com/emu-rs/snes-apu/blob/master/src/smp.rs#L5....
It's a good language to learn. I hesitate to consider it a replacement for asm/C/C++. Writing rust is hoping that the code you're porting to rust can adapt well to the restrictions, and if not, searching for esoteric and needlessly unsafe/verbose workarounds.
-
Being Fair about Memory Safety and Performance
Except the argument is right. Rust makes certain patterns (shared mutability in console emulators, dynamic lifetimes in Wayland) tricky to wrap with a safe abstraction, tedious to access with an unsafe abstraction (unsafe blocks, Arc cloning and raw pointer methods or RefCell borrows or Cell get/set, everywhere), and easy but wrong to wrap with an unsound abstraction (again) which can produce aliased &mut. Meanwhile in C++, pointer aliasing and manual memory lifetime management is both legal and ergonomic, and no more dangerous than unsafe Rust code.
-
Does the Bronze Garbage Collector Make Rust Easier to Use?
It's not about the internals of the GC. It's about the API that it exposes to users.
The author has some ideas: https://github.com/mcoblenz/Bronze/issues/2#issuecomment-939...
-
Does the Bronze Garbage Collector Make Rust Easier to Use? A Controlled Experiment
However, in fact-checking myself, I discovered a wrinkle: Bronze's GC doesn't actually do this, and is thus unsound. And someone has already filed an issue on their GitHub repo: https://github.com/mcoblenz/Bronze/issues/2
What are some alternatives?
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
cxx20-modules-examples - C++20 modules examples
once_self_cell - Safe-to-use proc-macro-free self-referential structs in stable Rust.
alias-ptr - (Mostly) safe manually-freed shared pointers in Rust
string - Rust String type with configurable byte storage.
snes9x - Snes9x - Portable Super Nintendo Entertainment System (TM) emulator
owning-ref-unsoundness - An article explaining the unsoundness I found in owning-ref
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
snes-apu - A Super Nintendo audio unit emulator.
advisory-db - Security advisory database for Rust crates published through crates.io