パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.6.1

nativeapi

nativeapi 用の Dart バインディング - ネイティブシステム API へのスムーズかつ統合的なアクセスを提供します。

AndroidiOSLinuxmacOSWindows
30日間ダウンロード
7.5万
いいね数
36
Pub ポイント
160

パッケージをインストール

flutter pub add nativeapi

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

NativeAPI は、複数のプラットフォームでネイティブシステムAPIにシームレスかつ統合的にアクセスできるDartバインディングを提供します。Flutterアプリケーションがファイルシステム、ハードウェアセンサー、デバイス管理などの基盤となるオペレーティングシステム機能と直接やり取りできるようにし、プラットフォーム固有の複雑さを抽象化します。プラットフォーム固有のコードを書かずに低レベルのシステム統合を実現したい開発者向けに設計されており、Android、iOS、Linux、macOS、Windowsで一貫した動作を保証します。クロスプラットフォーム互換性を維持しながら、深いシステム連携が必要なアプリに最適です。

用途

  • ネイティブファイルシステムへのアクセス
  • ハードウェアセンサーのデータを読み取る
  • デバイスの権限の管理
  • OSレベルのサービスとの統合
  • クロスプラットフォームシステム操作

主な機能

  • プラットフォーム間での統一 API
  • 低レベルなシステムアクセス
  • クロスプラットフォームの一貫性
  • 最小限のボイラープレート
  • 公式の Dart バインディング

適している対象

  • システムレベルのアプリ開発
  • クロスプラットフォーム用ユーティリティ
  • パフォーマンスが重要なアプリケーション
  • DevOps ツール
  • 組み込みまたはIoTアプリケーション

注意事項

  • プラットフォーム固有の設定が必要です
  • 昇格された権限が必要になる場合があります
  • 限定されたドキュメント
  • プラットフォーム固有のバグの可能性
  • UIが重いアプリには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

nativeapi

Unified access to native system APIs — windows, tray icons, menus, displays, keyboard, dialogs, storage and more — from Dart/Flutter, Rust, C#, JavaScript/TypeScript, Python and Go, all built on one C++ core.

Android iOS Linux macOS Windows
✅ ✅ ✅ ✅ ✅

🚧 Work in Progress: the API is under active development.

This repository is the home of every binding: the Dart, Rust, C#, JS, Python and Go bindings, the code generator, the design specs and the shared tooling live here directly, and the C++ core (nativeapi-core) is checked out as a git submodule. A core change and its regenerated bindings (core → codegen → bindings) are made and tracked together.

Bindings

Binding Packages Status
Dart / Flutter nativeapi, cnativeapi on pub.dev; nativeapi_flutter (not yet published) published
Rust nativeapi, cnativeapi on crates.io published
C# NativeAPI not yet on NuGet; build from source
JavaScript / TypeScript nativeapi (Node-API addon for Node.js, Deno and Bun) not yet on npm
Python nativeapi (ctypes, Python 3.10+) prototype, not yet on PyPI
Go github.com/libnativeapi/nativeapi/bindings/go (cgo, Go 1.22+) build from source

Each binding's README covers installation and usage.

History

This repository was nativeapi-flutter, then nativeapi-workspace, and is now nativeapi; the old names redirect here, and its history, issues and stars carry over. The histories of the former workspace, nativeapi-rust and nativeapi-csharp repositories are merged in, so the Rust and C# bindings keep their full history under bindings/. The old nativeapi-rust and nativeapi-csharp repositories are archived.

Layout

Path Description
core submodule: the C++ core library (nativeapi-core)
bindings/dart Dart binding (packages nativeapi, cnativeapi, nativeapi_flutter)
bindings/rust Rust binding (crates nativeapi, cnativeapi)
bindings/csharp C# binding
bindings/js JavaScript / TypeScript binding (Node-API addon)
bindings/python Python binding (ctypes)
bindings/go Go binding (cgo)
examples example apps of every binding, prefixed by binding: flutter_*, rust_*, csharp_*, js_*, python_*, go_*, …
tools/codegen the C ABI and binding generators
specs design rules for the core's public API

Getting started

git clone --recursive https://github.com/libnativeapi/nativeapi.git

Already cloned without --recursive?

git submodule update --init --recursive

The root pubspec.yaml is the pub workspace (and melos) root for the Dart packages and the Flutter examples, and the root Cargo.toml is the cargo workspace for the Rust crates and examples, so flutter pub get and cargo build run from the repository root. The C# solution is bindings/csharp/NativeAPI.slnx.

Code generation

tools/codegen generates the C ABI and all language bindings from the C++ headers in core/. Run it via the wrapper script:

./codegen         # full run: C ABI, then all bindings
./codegen check   # verify generated files are up to date (CI mode)
./codegen readme  # copy the shared README sections (tools/readme/) into every README
./codegen sync    # after a core change: regenerate everything, rerun
                  #   bindgen/ffigen, and commit core, then this repo
                  #   (add --push to also push, -m "..." for the core message)

See tools/codegen/README.md for details.

Common tasks

make status   # working-tree status of this repo and the core submodule
make sync     # fast-forward core to origin/main
make bump     # stage the updated core pointer for commit

Work on the bindings, the tooling and the specs is committed here directly. Work inside core is committed and pushed from that subdirectory as if it were a standalone clone; this repository then records the updated pointer once the combination is known to be compatible.

Issues

Releases

Each binding is released from a tag of its own: v<version> publishes the Dart packages to pub.dev (dart-release.yml), rust-v<version> publishes the crates to crates.io (rust-release.yml). The C#, JS, Python and Go bindings are not published yet.

License

MIT

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

ランキング