rustc_codegen_clr
RustPython
rustc_codegen_clr | RustPython | |
---|---|---|
8 | 96 | |
1,182 | 17,972 | |
- | 2.0% | |
9.7 | 9.7 | |
2 days ago | 5 days ago | |
Rust | Rust | |
MIT License | MIT 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.
rustc_codegen_clr
-
Rust to .NET compiler: Statically Sized, dynamically sized, and other
For clarity, that portion after the : is the blog post title, the prefix was added to the submission, so they're kind of disjoint
One will also want to temper their expectations per https://github.com/FractalFir/rustc_codegen_clr#current-stat... (MIT & Apache 2)
-
The search for easier safe systems programming
I don't have something that could be of Crafting Interpreters level on hand, but the general suggestion given to this question on DotNetEvolution discord by Roslyn team members was to start with the spec itself: https://ecma-international.org/publications-and-standards/st...
This might be a bit of a learning curve if you don't have experience with writing compilers like that though.
There are other materials that might prove useful should you go down this path:
- A series of blog posts of a student who is writing a Rust to .NET compiler which you could follow along: https://fractalfir.github.io/generated_html/home.html The project itself: https://github.com/FractalFir/rustc_codegen_clr
- A video series on writing a compiler for .NET from scratch: https://www.youtube.com/watch?v=wgHIkdUQbp0&list=PLRAdsfhKI4... Notes: https://github.com/terrajobst/minsk/tree/master/docs
As for CLR via C#, while it has certain facts that remained the same, the ecosystem has changed a lot since then, you really want to target the latest LTS to get best experience and performance.
p.s.: if it's any consolation, the promise in CLR via C# of JIT having the advantage of dynamically profiling code execution and compiling to profile-guided version, tuned to the exact hardware and environment is finally fulfilled, many years later :)
-
Rust to .NET compiler – Progress update
The author answers the "why" in the FAQ https://github.com/FractalFir/rustc_codegen_clr?tab=readme-o.... I didn't find it very convincing but I'm sure the author will learn a lot of neat things along the way.
- Rust in .NET Projects
- RustPython
-
The Rust compiler backend for .NET can now compile std with (numerous) errors, and supports allocation (Box, Vec, String, etc.)
After adding support for statics and many bug fixes related to pointers/slices, my compiler backend targeting .NET can finally build a barely working version of the standard library. It can be loaded into the .NET runtime, allocate memory (e.g. for a Box, Vec or String), push elements to Vec's and String's (currently without relocations). There are also some other parts of the standard library that already work, but I want to stress that the project is still fairly early into development (I started working on it late August), and you should expect most things in std to not work at all. Things working is the exception, not the rule. This newest set of commits allows you to use a small subset of the standard library, within code running inside the .NET runtime. | Here is some Rust code that I wrote to demo the ability to use the Rust std within the .NET runtime:
-
.NET backend for Rust now compiles 1000 functions within core.
This is a small update about my rustc backend, which is supposed to allow compilation of Rust code into .NET assemblies. This would allow you to use Rust crates in C#, and C# libraries in Rust.
-
Need help modeling some type constraints
I am currently working on a rust codegen targeting .NET. One of the features I currently work on is a .NET interop layer, mycorrhiza, and I am having some trouble modeling certain type constraints. There are 2 ways to store a reference to a GC type in Rust: 1. By a handle - this type has some cost associated with it, but can be stored anywhere (heap, stack). 2. By a raw reference - raw references may only live on the stack. They can be copied, and behave almost exactly like a normal rust type (with exceptions related to transmutes and enums), as long as they are stored on the stack.
RustPython
-
Encapsulation in Rust and Python
Integrating Rust into Python, Edward Wright, 2021-04-12 Examples for making rustpython run actual python code Calling Rust from Python using PyO3 Writing Python inside your Rust code — Part 1, 2020-04-17 RustPython, RustPython Rust for Python developers: Using Rust to optimize your Python code PyO3 (Rust bindings for Python) Musing About Pythonic Design Patterns In Rust, Teddy Rendahl, 2023-07-14
- FLaNK Stack Weekly 12 February 2024
-
RustPython
No.
…and this one is no exception -> https://github.com/RustPython/RustPython/issues/1940
Packages that rely on c dependencies like numpy, etc. only work if you write a custom implementation by hand; the “normal” package flat out doesn’t (and cannot) work.
- Show HN: RustPython for BeOS with W2c2
-
Rust is replacing C as the Python back end
The title would be accurate if this project (https://rustpython.github.io/) was becoming the official version of Python.
- RustPython: An open source Python 3 interpreter written in Rust
-
Rewrite Sympy in rust
If you absolutely need something comparable to Sympy, then one option might be to figure out how to best call Sympy from Rust. e.g. - RustPython, although it seems like Sympy isn't supported yet - Pyodide, and figuring out how to run it outside of a web browser. Probably also not very easy. - PyPy, and having a pretty simple Python binary for every platform - ...
-
Our Plan for Python 3.13
I'm actually rooting for RustPython to reach a level of maturity that we'd just be able to ship apis and stuff with it.... https://github.com/RustPython/RustPython
-
Python 11
Good question and it also actual for: python 3.12, RustPython and xonsh binary.
-
This Week In Python
RustPython – A Python Interpreter written in Rust
What are some alternatives?
ffidji - 🐶 FFIDJI is a tool to automatically generate bindings between languages, like calling Rust code from C# for instance.
CPython - The Python programming language
pavex - An easy-to-use Rust framework for building robust and performant APIs
pyodide - Pyodide is a Python distribution for the browser and Node.js based on WebAssembly
wrapped_mono - Wrapper around mono library. Allows easy loading and interop between code written for the .NET framework and Rust.
tauri - Build smaller, faster, and more secure desktop applications with a web frontend.
openEcommerce - .NET 6, ASP.NET Core 6, Entity Framework Core 6, C# 10, Angular 14, CQRS, Clean Architecture,SOLID, DDD.
rust-numpy - PyO3-based Rust bindings of the NumPy C-API
kalem.rs - Fegeya Kalem.rs, Rust implementation of Kalem, work-in-progress.
PyO3 - Rust bindings for the Python interpreter
extism - The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.
Rhai - Rhai - An embedded scripting language for Rust.