.NET Runtime
actix-web
Our great sponsors
.NET Runtime | actix-web | |
---|---|---|
597 | 168 | |
13,831 | 19,925 | |
2.1% | 2.1% | |
10.0 | 9.2 | |
6 days ago | 8 days ago | |
C# | Rust | |
MIT License | Apache License 2.0 |
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.
.NET Runtime
-
The Mechanics of Silicon Valley Pump and Dump Schemes
The math of the above is really simple. Microsoft has 13,000 stars on their GitHub profile for their flagship product. SupaBase has 63,000 stars on their GitHub project for their flagship product. 27% of all software developers in the world are using .Net. SupaBase has 4.5 times as many likes as the .Net Core runtime, so they must be 4.5 times as large, right? 4.5 multiplied by 27% becomes 130%. Implying 130% of all software developers that exists on earth are using SupaBase (apparently!)
-
OpenD, a D language fork that is open to your contributions
> The amount of unsafe code used to implement C# vastly outweighs the amount in Rust's standard library.
According to bing.com chat, https://github.com/dotnet/runtime has 3.5M LOC, and https://github.com/rust-lang/rust has 6M LOC. The left panel of https://github.com/dotnet/runtime says 80% of the .NET runtime is written in C#.
This makes me wonder, do you happen to have a link for your “vastly outweighs” statement?
-
Ask HN: What's the fastest programming language with a large standard library?
Movemask keeps coming back. Rather than emulating it, it appears to be more efficient to separately handle IndexOfMatch, LastIndexOfMatch and GetMatchCount scenarios it is used for most of the time:
- https://github.com/dotnet/runtime/pull/94472/files#diff-5824... (it's closed for now but I'm hoping to get back to it at some point)
- https://github.com/jprochazk/tmi-rs/blob/ac3ce6aee8bbe038a98...
It can account for good 30% performance variance depending on the use case (on Apple's M-series cores).
.NET's standard library is very heavily vectorized, vectorization is considered in all scenarios where it is applicable, the compiler will also apply it to copies of known length and string comparisons fully eliding and unrolling Memmove and SequenceEqual calls.
The gives languages that run on top of .NET massive performance advantage in a variety of scenarios versus any other language - C++ and Rust stdlibs are far more conservatively vectorized because neither language has stable SIMD vector API and even then out of modularity constraints a lot of routines have to either rely on autovectorization which is fragile or manually vectorized with intrisics for each individual platform.
A short non-exhaustive list of examples is
- Shared SIMD helper for Aho-Corasick, Rabin-Karp and other text search algorithms https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
- Bloom filter https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
- Base64 encoding and decoding https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
- Element search (memchr and the like) https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
- UTF-8 transcoding https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
The above are examples of 1% code that ends up used by 99% of other codebase in one way or another. Regex engine, JSON serialization and parsing, substringing and etc. all use these.
Rust has had a stable SIMD vector API[1] for a long time. But, it's architecture specific. The portable API[2] isn't stable yet, but you probably can't use the portable API for some of the more exotic uses of SIMD anyway. Indeed, that's true in .NET's case too[3].
Rust does all this SIMD too. It just isn't in the standard library. But the regex crate does it. Indeed, this is where .NET got its SIMD approach for multiple substring search from in the first place[4]. ;-)
You're right that Rust's standard library is conservatively vectorized though[5]. The main thing blocking this isn't the lack of SIMD availability. It's more about how the standard library is internally structured, and the fact that things like substring search are not actually defined in `std` directly, but rather, in `core`. There are plans to fix this[6].
[1]: https://doc.rust-lang.org/std/arch/index.html
[2]: https://doc.rust-lang.org/std/simd/index.html
[3]: https://github.com/dotnet/runtime/blob/72fae0073b35a404f03c3...
[4]: https://github.com/dotnet/runtime/pull/88394#issuecomment-16...
[5]: https://github.com/BurntSushi/memchr#why-is-the-standard-lib...
-
Building a bare-metal bootable game for Raspberry Pi in C#
WasmGC is a prototype that only supports the bare minimum that is enough for languages with high level constructs only but not for something like C# which has interior object pointers (ref) and uses them heavily for performance (spans are built on top of them).
The API of WasmGC is really rudimentary.
With that said, you can track support of various WASM features by .NET here: https://github.com/dotnet/runtime/issues/94351
I don’t understand how the logic of your post works, WASM in .NET is already used in production versus something that is an early alpha? Also, on Kotlin and targeting something that is not Android - “Java Interop” that’s all I need to say.
-
Murder is a pixel art ECS game engine in C#
In .NET, GC is triggered when a user thread runs out of memory in an allocation budget and needs more, similar to what you described [0].
Generally speaking, indefinitely preventing GC from running is not possible (you always end up putting data on the heap) therefore an optimal strategy is similar to any other language - limiting allocations and reusing memory through object and array pooling. This will ensure that GC pauses are as infrequent and as short as possible. It's important to note that if there is sufficient allocation budget - the GC will not run.
This way, in a well written code the GC may only ever trigger every few hundred frames and only take a millisecond to run. In fact, OSU! has been able to get consistently good frame times even back on .NET Framework.
[0] https://github.com/dotnet/runtime/blob/main/docs/design/core...
[1] https://maoni0.medium.com/dynamically-adapting-to-applicatio...
-
c# expression hover wired behavior when debugging
Edit: The mono runtime we using is the mono with .net v7.0.9
-
.NET Blazor
Wasm-GC isn’t compatible with .NET allowing references to fields among other issues. So I doubt that it will help along
-
WASM by Example
Yes, and go upvote this .NET feature so we can make portable .NET WASM libraries: https://github.com/dotnet/runtime/issues/86162
.NET WASM performance is actually very impressive, especially with AOT enabled.
actix-web
-
Getting Started with Actix Web - The Battle-tested Rust Framework
Within actix-web, middleware is used as a medium for being able to add general functionality to a (set of) route(s) by taking the request before the handler function runs, carrying out some operations, running the actual handler function itself and then the middleware does additional processing (if required). By default, actix-web has several default middlewares that we can use, including logging, path normalisation, access external services and modifying application state (through the ServiceRequest type).
- Show HN: Play Euchre with AI Bots
- Choosing the Right Rust Web Framework: An Overview
-
Building a Rust app with Perseus
Rust is a popular system programming language, known for its robust memory safety features and exceptional performance. While Rust was originally a system programming language, its application has evolved. Now you can see Rust in different app platforms, mobile apps, and of course, in web apps — both in the frontend and backend, with frameworks like Rocket, Axum, and Actix making it even easier to build web applications with Rust.
-
Introducing SQLPage : write websites entirely in SQL
actix to handle HTTP requests
-
/r/startrek/ migrates to lemmy
Lemmy is written in Rust using Actix Web and Diesel.rs.
-
Top Rust Web Frameworks: Rocket, Actix-web, Tide, Warp, and Gotham
The actor-based web framework in Rust, Actix-web, is a game changer for developers looking for high-performance and scalable web applications. Actix-web's exceptional performance and concurrency capabilities enable developers to create robust and efficient web solutions. The framework's asynchronous request handling and non-blocking I/O provide impressive levels of concurrency, making it an excellent choice for high-traffic and demanding workload projects. Actix-web includes a plethora of features, such as middleware support and WebSocket integration, that allow developers to create cutting-edge web applications in Rust.
-
What is the current ideal choice for server-side rendered web frameworks?
I used [actix-web](https://actix.rs/) + [liquid](https://lib.rs/crates/liquid) exactly because I wanted to create a website that works with JS disabled (You may look at the ball of mud I made [here](https://github.com/magackame/neor)).
-
Announcing `h2x` A library for building high performance HTTP/2 servers
actix-web also simplify h2 primitive type in there actix-http sub-directory.
-
Hey Rustaceans! Got a question? Ask here (22/2023)!
Do you mean what framework to use to build a web server in Rust? If yes, it seems like most people use actix-web or axum; both have examples to help you get started.
What are some alternatives?
axum - Ergonomic and modular web framework built with Tokio, Tower, and Hyper
Rocket - A web framework for Rust.
Tide - Fast and friendly HTTP server framework for async Rust
tonic - A native gRPC client & server implementation with async/await support.
hyper - An HTTP library for Rust
salvo - A powerful web framework built with a simplified design.
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
Gotham - A flexible web framework that promotes stability, safety, security and speed.
warp - A super-easy, composable, web server framework for warp speeds.
Iron - An Extensible, Concurrent Web Framework for Rust
Nickel - An expressjs inspired web framework for Rust
The FastCGI Rust implementation. - Native Rust library for FastCGI