Apache License 2.0

项目介绍

fabulous-dev/Fabulous 是一个托管在 GitHub 上的开源项目,主要使用 F# 编写,采用 Apache License 2.0 许可证,目前获得 1.3k 个 Star、122 次 Fork。

仓库全名
fabulous-dev/Fabulous
开源许可证
Apache License 2.0
Star 数
1.3k
Fork 数
122
未关闭 Issue
8

README 摘要

Declarative, functional applications for .NET using F#. Fabulous combines F#, declarative UI, and Model-View-Update (MVU) to build mobile and desktop applications with explicit state transitions and testable application logic. Fabulous provides the application architecture and declarative DSL. Choose a UI backend for rendering: .NET MAUI with Fabulous.MauiControls Avalonia with Fabulous.Avalonia Core, both backends,…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Fabulous 用什么语言开发?

主要使用 F# 编写,采用 Apache License 2.0 许可证,目前有 1.3k 个 Star。

Fabulous 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 Fabulous 的源码?

可以直接克隆仓库:git clone https://github.com/fabulous-dev/Fabulous.git,默认分支为 main;安装与运行步骤见仓库 README。

Fabulous 最近还在维护吗?

仓库最近一次更新为 5 天前,当前有 8 个未关闭 Issue;Star 数为 1.3k,可作为社区活跃度的参考。

简要分析

热度分
1590
价值分
821
活跃状态
活跃

语言占比

C#
CSS
F#
HTML
JavaScript
Python
SCSS
Shell

Release

README

Fabulous

Declarative, functional applications for .NET using F#.

Build and test Documentation NuGet version NuGet downloads Discord

Fabulous combines F#, declarative UI, and Model-View-Update (MVU) to build mobile and desktop applications with explicit state transitions and testable application logic.

Fabulous provides the application architecture and declarative DSL. Choose a UI backend for rendering:

  • .NET MAUI with Fabulous.MauiControls
  • Avalonia with Fabulous.Avalonia

Core, both backends, extensions, templates, samples, tests, documentation, packaging, and CI are maintained together in this repository.

Documentation

For questions and community support, join the Fabulous Discord server.

Example

An MVU application keeps state and transitions separate from its declarative view:

type Model = { Count: int }

type Msg =
    | Increment
    | Decrement

let init () = { Count = 0 }

let update msg model =
    match msg with
    | Increment -> { model with Count = model.Count + 1 }
    | Decrement -> { model with Count = model.Count - 1 }

let view model =
    Application(
        ContentPage(
            "Counter",
            VStack(spacing = 16.) {
                Label($"Count is {model.Count}")
                Button("Increment", Increment)
                Button("Decrement", Decrement)
            }
        )
    )

Fabulous reconciles successive widget descriptions with the native UI. Application state remains ordinary F# data, making update functions straightforward to test.

Repository layout

src/neutral/       Fabulous.Core, tests, and benchmarks
src/maui/          .NET MAUI backend and extensions
src/avalonia/      Avalonia backend and extensions
samples/           MAUI and Avalonia applications
templates/         dotnet new template packages
docs/              Authored and API documentation
website/           GitHub Pages site
eng/               Migration and release tooling

Fabulous.sln is the consolidated build and package solution. The package ID remains Fabulous; its core assembly is named Fabulous.Core.dll.

Build and test

Prerequisites are a supported .NET SDK and any workloads required by the platform projects you build.

dotnet restore Fabulous.sln
dotnet test Fabulous.sln -c Release

CI additionally validates formatting, package creation, Avalonia headless UI tests with rendered screenshot artifacts, generated templates, a Windows MAUI sample, WinUI compatibility, and documentation deployment. Successful pull-request runs receive timeline links to their package and screenshot artifacts.

Packages and releases

All Fabulous packages use the unified 10.0.x version line and are released from .github/workflows/release.yml. To publish, move the completed notes from Unreleased into a new top-level ## [10.0.x] - YYYY-MM-DD section, add a fresh Unreleased section, and push it to main. Every main push treats the top release section as pending while its matching tag is absent. After the full Build and test workflow succeeds, the release workflow publishes packages, creates the matching tag, and creates a GitHub release. A newer main push cancels an in-progress attempt and retries the untagged version from the newer commit. NuGet publishing uses GitHub OIDC trusted publishing; no long-lived NuGet API key is stored in the repository.

Contributing

Issues and pull requests are welcome. Start with CONTRIBUTING.md, and discuss substantial API changes in an issue before implementation.

License

Fabulous is licensed under the Apache License 2.0.

评论

暂无评论