Skip to content

[SEVERE] RustBuilder: Failed to find lib.name #103

Description

@adil192

Running a build or tests with native_toolchain_rust: 1.0.6 and super_native_extensions: 0.10.0-dev.2 gives me this error. The error doesn't occur in native_toolchain_rust: 1.0.4+0.

Judging by the source code, this is only supposed to be fine not severe.

() {
try {
return manifest.walk<String>('lib.name');
} on RustValidationException {
logger.fine(
'`lib.name` is not defined. Using `package.name` instead',
);
}
},

Perhaps the solution is to replace <String> with <String?>, since the log says type 'Null' is not a subtype of type 'String' in type cast?

Error log:

[SEVERE] RustBuilder: Failed to find lib.name in /home/runner/work/saber/saber/.pub-cache/hosted/pub.dev/super_native_extensions-0.10.0-dev.2/rust/Cargo.toml: [workspace]
[profile.release]
lto = true
panic = "abort"
opt-level = "z"
[package]
name = "super_native_extensions_native"
version = "0.1.0"
edition = "2021"
resolver = "2"
[lib]
crate-type = ["cdylib", "staticlib"]
[dependencies]
log = "0.4"
simple_logger = "2.1"
async-trait = "0.1"
rand = "0.8.5"
url = "2.2.2"
irondash_engine_context = "0.7.0-dev.0"
irondash_run_loop = "0.7.0-dev.0"
irondash_message_channel = { version = "0.9.0-dev.0", features = ["derive"] }
[build-dependencies]
serde = { version = "1.0.119", features = ["derive"] }
serde_json = "1.0.59"
anyhow = "1.0.41"
[dev-dependencies]
velcro = "0.5"
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
core-foundation = "0.9"
once_cell = "1.8.0"
core-graphics = "0.22.3"
objc2 = "0.5.2"
block2 = "0.5.1"
objc2-foundation = { version = "0.2.2", features = ["block2", "dispatch", "NSArray", "NSData", "NSDate", "NSDictionary", "NSEnumerator", "NSError", "NSFileCoordinator", "NSFilePresenter", "NSGeometry", "NSItemProvider", "NSKeyValueObserving", "NSObject", "NSProcessInfo", "NSProgress", "NSPropertyList", "NSString", "NSThread", "NSURL", "NSValue"] }
[target.'cfg(target_os = "macos")'.dependencies]
objc2-app-kit = { version = "0.2.2", features = ["block2", "NSApplication", "NSBitmapImageRep", "NSBitmapImageRep", "NSCell", "NSDragging", "NSDraggingItem", "NSDraggingSession", "NSEvent", "NSEvent", "NSFilePromiseProvider", "NSFilePromiseReceiver", "NSGraphics", "NSGraphicsContext", "NSImage", "NSImage", "NSImageRep", "NSMenu", "NSMenuItem", "NSPasteboard", "NSPasteboardItem", "NSResponder", "NSView", "NSWindow"] }
[target.'cfg(target_os = "ios")'.dependencies]
oslog = "0.2.0"
objc2-ui-kit = { version = "0.2.2", features = ["block2", "UIAction", "UIActivityIndicatorView", "UIApplication", "UIBezierPath", "UIColor", "UIContextMenuConfiguration", "UIContextMenuInteraction", "UIDeferredMenuElement", "UIDragInteraction", "UIDragItem", "UIDragPreview", "UIDragPreviewParameters", "UIDragSession", "UIDropInteraction", "UIGestureRecognizer", "UIImage", "UIImageView", "UIInteraction", "UIMenu", "UIMenuElement", "UIPanGestureRecognizer", "UIPasteboard", "UIPreviewParameters", "UIResponder", "UITargetedDragPreview", "UITargetedPreview", "UIView", "UIViewController"] }
[target.'cfg(target_os = "android")'.dependencies]
jni = "0.21.1"
once_cell = "1.8.0"
android_logger = "0.11"
[target.'cfg(target_os = "windows")'.dependencies]
byte-slice-cast = "1.2.1"
once_cell = "1.8.0"
threadpool = "1.8.1"
[target.'cfg(target_os = "windows")'.dependencies.windows]
version = "0.52.0"
features = ["implement", "Data_Xml_Dom", "Win32_Foundation", "Win32_Graphics_Gdi", "Win32_Graphics_Imaging", "Win32_Storage_FileSystem", "Win32_System_Com_Marshal", "Win32_System_Com_StructuredStorage", "Win32_System_DataExchange", "Win32_System_LibraryLoader", "Win32_System_Memory", "Win32_System_Ole", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Variant", "Win32_UI_Accessibility", "Win32_UI_HiDpi", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_Shell", "Win32_UI_TextServices", "Win32_UI_WindowsAndMessaging"]
[target.'cfg(target_os = "linux")'.dependencies]
glib-sys = "0.17.4"
gdk-sys = "0.17.0"
gtk-sys = "0.17.0"
gobject-sys = "0.17.4"
gdk = "0.17.1"
gtk = { version = "0.17.1" }
[target.'cfg(any(target_os = "linux", target_os = "windows"))'.dependencies]
mime_guess = "2.0.4"
[patch.crates-io]
mime_guess = { git = "https://github.com/knopp/mime_guess.git", branch = "super_native_extensions" }
type 'Null' is not a subtype of type 'String' in type cast
#0      TomlDocumentWrapper.walk (package:native_toolchain_rust/src/toml_parsing.dart:46:23)
#1      CargoManifestParser.parseManifest.<anonymous closure> (package:native_toolchain_rust/src/toml_parsing.dart:103:27)
#2      RustValidationException.compose (package:native_toolchain_rust/src/exception.dart:32:30)
#3      CargoManifestParser.parseManifest (package:native_toolchain_rust/src/toml_parsing.dart:100:33)
#4      CrateInfoValidator.fetchAndValidateCrateInfo.<anonymous closure> (package:native_toolchain_rust/src/crate_info_validator.dart:36:33)
#5      RustValidationException.compose (package:native_toolchain_rust/src/exception.dart:32:30)
#6      CrateInfoValidator.fetchAndValidateCrateInfo (package:native_toolchain_rust/src/crate_info_validator.dart:29:33)
#7      RustBuildRunner.run (package:native_toolchain_rust/src/build_runner.dart:76:28)
#8      RustBuilder.run (package:native_toolchain_rust/native_toolchain_rust.dart:122:7)
#9      main.<anonymous closure> (file:///home/runner/work/saber/saber/.pub-cache/hosted/pub.dev/super_native_extensions-0.10.0-dev.2/hook/build.dart:9:7)
#10     build (package:hooks/src/api/build_and_link.dart:250:18)
#11     main (file:///home/runner/work/saber/saber/.pub-cache/hosted/pub.dev/super_native_extensions-0.10.0-dev.2/hook/build.dart:5:9)
#12     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:311:33)
#13     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
flutter doctor
ahann@dellpro:~/Documents/GitHub/saber$ flutter doctor -v
[✓] Flutter (Channel stable, 3.47.1, on Fedora Linux 44 (Workstation Edition) 7.1.7-200.fc44.x86_64, locale en_GB.UTF-8) [27ms]
    • Flutter version 3.47.1 on channel stable at /home/ahann/Documents/Sources/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6655482ec0 (21 hours ago), 2026-08-19 10:07:23 -0700
    • Engine revision 5d53178869
    • Dart version 3.13.1
    • DevTools version 2.60.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging,
      enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [861ms]
    • Android SDK at /home/ahann/Android/Sdk
    • Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)
    • Platform android-37.0, build-tools 37.0.0
    • ANDROID_HOME = /home/ahann/Android/Sdk
    ! Multiple adb binaries found. This can cause conflicts and device detection issues:
        - /home/ahann/Android/Sdk/platform-tools/adb
        - /usr/bin/adb
    • Java binary at: /home/ahann/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [6ms]
    • CHROME_EXECUTABLE = /home/ahann/.local/share/flatpak/app/org.chromium.Chromium/x86_64/stable/active/export/bin/org.chromium.Chromium

[✓] Linux toolchain - develop for Linux desktop [264ms]
    • clang version 22.1.8 (Fedora 22.1.8-4.fc44)
    • cmake version 4.3.0
    • ninja version 1.13.2
    • pkg-config version 2.5.1
    • OpenGL core renderer: Mesa Intel(R) Graphics (LNL)
    • OpenGL core version: 4.6 (Core Profile) Mesa 26.2.0
    • OpenGL core shading language version: 4.60
    • OpenGL ES renderer: Mesa Intel(R) Graphics (LNL)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 26.2.0
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20
    • GL_EXT_framebuffer_blit: yes
    • GL_EXT_texture_format_BGRA8888: yes

[✓] Connected device (2 available) [227ms]
    • Linux (desktop) • linux  • linux-x64      • Fedora Linux 44 (Workstation Edition) 7.1.7-200.fc44.x86_64
    • Chrome (web)    • chrome • web-javascript • Chromium 151.0.7922.137

[✓] Network resources [326ms]
    • All expected network resources are available.

• No issues found!

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions