Workspace and crates
fusion-framework repository layout — fusion-core, bindings, and package artifacts
Repository map
The fusion-framework repository is a Cargo workspace. Language packages publish from this monorepo; the CLI lives in a separate repository (fusion-tool).
| Path | Role | Published artifact |
|---|---|---|
crates/fusion-core/ | Shared Rust engine (Hyper + Tokio) | Library used by all bindings |
crates/fusion-py/ | PyO3 extension + Python package | PyPI fusion-framework |
crates/fusion-node/ | N-API addon + JS façade | npm fusion-framework |
crates/fusion-ffi/ | C ABI (cdylib / staticlib) | Native library for C# |
bindings/csharp/FusionFramework/ | Managed C# binding | NuGet Fusion-Framework |
examples/ | Runnable samples per language | — |
scripts/set-version.sh | Cross-manifest version bump | — |
Current workspace package version: 1.2.6.
Dependency graph
fusion-core
├── fusion-py (PyO3)
├── fusion-node (N-API)
└── fusion-ffi (C ABI)
└── C# FusionFramework (P/Invoke)Shared semantics (route tokens, coercion, envelopes, settings JSON, pagination, status/header constants, Hyper server) belong in fusion-core. Bindings mirror behavior with idiomatic syntax — they must not invent divergent HTTP semantics.
What belongs where
| Change type | Prefer |
|---|---|
| Path tokens, naming, status codes, settings keys, server behavior | fusion-core |
| Decorators, reflection, OpenAPI UI wiring, async host loops | Language binding |
Scaffold templates, fusion init layout | fusion-tool (separate repo) |
Core modules (selected)
| Module | Responsibility |
|---|---|
App | Router + settings; route / listen |
Router | Method + path matching ({name}, [name]) |
Request / Response | Parsed HTTP values and response builders |
Settings | Load fusion.<env>.json, env placeholders |
naming | [module] / [action] expansion |
dispatch | Argument binding + response envelopes |
pagination | page / page_size helpers |
server | Hyper listen loop, fingerprint headers |
Build from source (overview)
# Workspace
cargo check --workspace
cargo test -p fusion-core
# Python
cd crates/fusion-py && maturin develop
# Node
cd crates/fusion-node && npm install && npm run build:debug
# FFI / C#
cargo build -p fusion-ffi
dotnet build bindings/csharp/FusionFramework/FusionFramework.csprojPublishing is driven by GitHub Actions on version tags (vX.Y.Z) for PyPI, npm, and NuGet. See .github/PUBLISHING.md in the framework repository.