dart_monty_wasm 0.4.3 copy "dart_monty_wasm: ^0.4.3" to clipboard
dart_monty_wasm: ^0.4.3 copied to clipboard

Platformweb

WASM backend for dart_monty, pure Dart bindings for Monty — a restricted sandboxed Python interpreter built in Rust.

example/example.dart

// Printing to stdout is expected in an example.
// ignore_for_file: avoid_print
import 'package:dart_monty_wasm/dart_monty_wasm.dart';

/// Demonstrates direct use of the WASM bindings.
///
/// Most apps should import `dart_monty` instead — the federated plugin
/// selects the correct backend automatically. This package is intended
/// for browser environments only.
Future<void> main() async {
  final monty = MontyWasm(bindings: WasmBindingsJs());

  final result = await monty.run('2 + 2');
  print('Result: ${result.value}'); // 4

  await monty.dispose();
}
0
likes
160
points
376
downloads

Publisher

unverified uploader

Weekly Downloads

WASM backend for dart_monty, pure Dart bindings for Monty — a restricted sandboxed Python interpreter built in Rust.

Repository (GitHub)
View/report issues
Contributing

Topics

#python #sandbox #wasm #interpreter

Documentation

API reference

License

MIT (license)

Dependencies

dart_monty_platform_interface

More

Packages that depend on dart_monty_wasm