|
You are here |
jgayfer.com | ||
| | | | |
www.ncameron.org
|
|
| | | | | One of the more subtle aspects of Rust is how traits can be used as types. In this blog post I will attempt a bit of a deep dive into how to use traits as types and how to choose between the different forms. Preliminary: traits are not typesA type | |
| | | | |
dehora.net
|
|
| | | | | Back in 2013, I started a series of posts on programming languages I found interesting. One of the languages I wanted to write about at that time was Rust. As often happens, life got in the way, and it's only now that I'm coming round to a long overdue post. This is one of a series of posts on programming languages and you can read more about thathere. | |
| | | | |
jmmv.dev
|
|
| | | | | Dependency injection is one of my favorite design patterns to develop highly-testable and modular code. Unfortunately, applying this pattern by taking Rust traits as arguments to public functions has unintended consequences on the visibility of private symbols. If you are not careful, most of your crate-internal APIs might need to become public just because you needed to parameterize a function with a trait. Let's look at why this happens and what we can do about it. | |
| | | | |
cfallin.org
|
|
| | | [AI summary] The article discusses the development of an Ahead-of-Time (AOT) compiler for JavaScript, leveraging precompiled inline-cache (IC) stubs. By moving runtime type binding to indirect calls, the compiler can generate static code, enabling full AOT compilation. This approach achieves significant performance improvements, with a 2.77x geometric mean speedup on various benchmarks. The article also explores further optimizations through profile-guided inlining, and compares this method with other AOT approaches like Hopc's type inference. The potential for future enhancements and the use of compiler backends derived from interpreters are also highlighted. | ||