rython 0.1.3 copy "rython: ^0.1.3" to clipboard
rython: ^0.1.3 copied to clipboard

Executing Python scripts in Flutter with Rust

Rython #

Executing Python scripts in Flutter with Rust

Quick start #

Installing Rust

Rust Official Doc: https://www.rust-lang.org/tools/install

Using Rython

  1. Install Flutter (you can't use a package manager such as snap).
  2. Add a dependency to the project: flutter pub add rython.
import 'package:flutter/material.dart';
import 'package:rython/rython.dart';

Future<void> main() async {
  await Rython.init();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
            appBar: AppBar(title: const Text('Rython')),
            body: Center(
                child: Column(children: [
              const Text('Run Python :'),
              Text('Result Eval : ${eval(script: "1 + 1")}')
            ]))));
  }
}
0
likes
140
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

Executing Python scripts in Flutter with Rust

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_rust_bridge, plugin_platform_interface

More

Packages that depend on rython