Giraffe
freya
Our great sponsors
Giraffe | freya | |
---|---|---|
19 | 10 | |
2,049 | 1,054 | |
1.1% | - | |
6.8 | 9.7 | |
7 days ago | about 22 hours ago | |
F# | Rust | |
Apache License 2.0 | 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.
Giraffe
-
The combined power of F# and C#
Giraffe is another interesting one to explore: https://giraffe.wiki/
Giraffe is nice because it is itself built "just" as ASP.NET Core Middleware so it plays a bit more nicely than Suave with a mixed stack of C#-defined Middleware.
It's more likely you accidentally fall back into just translating C# patterns to non-idiomatic F# with Giraffe, but it's also nicer when in that case of needing to live in both worlds and use a mixture of libraries built for C# ASP.NET projects.
-
ASP.NET Core updates in .NET 8 Preview 4 - .NET Blog
There are also some F# frameworks built on top of ASP.NET core like https://giraffe.wiki
- Confusion in learning Giraffe's HttpHandler
-
Is there any advantage to using F# instead of C#?
If you have an interest in F#, I highly recommend diving in because (1) it has a ton of things you might learn to appreciate in C#; (2) it has things C# cannot have. I do like some of the suggestions people have made regarding mixing your code bases, but I'll also say that building, say, endpoint routing in Giraffe is (to repeat myself) easy, simple, and elegant.
-
Targeting Node, Bun and Deno With F#
Bix is a micro-framework designed with F# in mind and that runs on both Deno and Bun! and in theory it also should even run in a service worker! (intercepting fetch requests) although I haven't tested that yet, it offers a general purpose handler that coupled with a set of route definitions it can bring a Giraffe/Saturn like framework to life in JavaScript runtimes which is incredibly awesome! useful? maybe not š , but awesome indeed. Let's see some code for it
-
If you were to create a Web API today from scratch how would you do it ?
Backend: Most likely it would be a toss between https://saturnframework.org or https://giraffe.wiki. They both combins the extremely good type system in F# combined with the ease of a minimal API.
-
Is it possible to run C# asp.net core MVC and f# giraffe in a single solution
I was wondering if its possible to simultaneously run a C# core MVC project in combination with https://github.com/giraffe-fsharp/Giraffe
-
Overriding JSON serializer in Giraffe
By default Giraffe, the framework which I use as a web server, uses Newtonsoft.Json to serialize results to JSON. However, for discriminated union, it generates quite a lot of JSON so I've switched to System.Text.Json which is built into newer versions of .Net Core. In combination with FSharp.SystemTextJson package allows serializing discriminated unions more gracefully. All we need is to decorate Branch type with JsonFSharpConverter(JsonUnionEncoding.BareFieldlessTags) attribute.
-
Introducing Giraffe.Htmx
Giraffe is a library that sits atop ASP.NET Core and allows developers to build web applications in a functional style; dotnet new giraffe is literally my starting point when I begin a new web application project. (Rather than write three more sentences filled with effusive praise, Iāll just leave it at that; itās great.) It also provides a view engine (that builds upon Suaveās āexperimentalā view engine) which uses an F# DSL to define HTML in a strongly-typed way. It has been incredibly efficient for a while, but with .NETās work over the past two releases at improving performance, and Giraffeās adoption of those techniques, it is lightning fast.
-
Show HN: F# web server in 3-4 lines of code
Wrapping ASP.NET Core to be easier and more idiomatic with F# seems to be a common domain. Out of curiosity, did you look at any existing projects? If so, what was lacking from them that made you decide to write WebFrame?
freya
-
Ebou Released š: A (mostly full featured) cross platform desktop Mastodon client written in Rust + Dioxus
Awesome, when it's properly release I'll give it a try with freya (https://github.com/marc2332/freya, a skia-based renderer for Dioxus I am making)
- GUI development with Rust and GTK 4
-
What is the most fully-featured rust frontend framework?
Or if you don't care about web compatibility, you can use Dioxus' state management with Freya which is more complete and renderers natively with Skia
-
XUL Layout has been removed from Firefox
There are a number of up-and-coming Rust-based frameworks in this niche:
- https://github.com/iced-rs/iced (probably the most usable today)
- https://github.com/vizia/vizia
- https://github.com/marc2332/freya
- https://github.com/linebender/xilem (currently very incomplete but exciting because it's from a team with a strong track record)
What is also exciting to me is that the Rust GUI ecosystem is in many cases building itself up with modular libraries. So while we have umpteen competing frameworks they are to a large degree all building and collaborating on the same foundations. For example, we have:
- https://github.com/rust-windowing/winit (cross-platform window creation)
- https://github.com/gfx-rs/wgpu (abstraction on top of vulkan/metal/dx12)
- https://github.com/linebender/vello (a canvas like imperative drawing API on top of wgpu)
- https://github.com/DioxusLabs/taffy (UI layout algorithms)
- https://github.com/pop-os/cosmic-text (text rendering and editing)
- https://github.com/AccessKit/accesskit (cross-platform accessibility APIs)
In many cases there a see https://blessed.rs/crates#section-graphics-subsection-gui for a more complete list of frameworks and foundational libraries)
-
Declarative UI Programming in Rust for Native Applications
https://github.com/DioxusLabs/dioxus (which has native rendering in the form of https://github.com/marc2332/freya)
-
Taffy 0.3: UI layout in Rust, now with css-grid!
There hasn't been too much progress on Blitz in the last few weeks (it will come), but there is now a new project Freya which is using a Dioxus frontend and rendering with Skia. That's currently using it's own layout system instead of Taffy though.
-
Rust GUI framework
Freya
-
What's everyone working on this week (6/2023)?
A native GUI library https://github.com/marc2332/freya
-
Looking for feedback on the next version of viewbuilder! The UI framework with a new a compose-like API
Since youāre working with Taffy and Skia, have you checked out Freya? Thereās more room for innovation in the more tightly scoped niches of this kind.
-
Making Dioxus (almost) as fast as SolidJS
Marc has also made some really good progress on a skia renderer but I don't think it is ready for production yet.
What are some alternatives?
Suave.IO - Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.
iced_taffy - Library for using Taffy layout with the Iced GUI framework. It currently provides a single Grid component for 2D grid layout.
Saturn - Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
xilem - An experimental Rust native UI framework
ASP.NET Core - ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
cosmic-text - Pure Rust multi-line text handling
Falco - A toolkit for building fast and functional-first web applications using F#.
blitz - High performance HTML and CSS renderer powered by WGPU
ASP.NET MVC
tofiks - UCI chess engine written in Go
Freya - Freya Web Stack - Meta-Package
rustapi - š RESTful Rust API Template / Boilerplate