Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cargokit/build_tool/lib/src/builder.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/// This is copied from Cargokit (which is the official way to use it currently)
/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin

import 'dart:io';

import 'package:collection/collection.dart';
import 'package:logging/logging.dart';
import 'package:path/path.dart' as path;
Expand Down Expand Up @@ -139,7 +141,10 @@ class RustBuilder {
CargoBuildOptions? get _buildOptions =>
environment.crateOptions.cargo[environment.configuration];

String get _toolchain => _buildOptions?.toolchain.name ?? 'stable';
String get _toolchain =>
Platform.environment['RUSTUP_TOOLCHAIN'] ??
_buildOptions?.toolchain.name ??
'stable';

/// Returns the path of directory containing build artifacts.
Future<String> build() async {
Expand Down