Daco Harkes

Results 402 comments of Daco Harkes
trafficstars

Note from @mkustermann: It should probably be `-o3` optimized by default always. Rationale: with transitive dependencies you want all those transitive dependencies to be `-o3`. Only when developing the package...

> maybe we should have at least an option to do -Os. In my experience the performance difference is in most cases negligible and the binary size, especially on mobile,...

> Whatever compiler flags `dart build` and `flutter build` may pass down to individual `hook/build.dart` scripts. The `BuildConfig` and `LinkConfig` don't have an arbitrary `compilerFlags` field. Maybe it should? Currently,...

Yeah, so for rust it makes maybe more sense to use profiles. Profiles are user-defined. So that means the RustBuilder probably needs a `String profile` param. That then also means...

I think for now we can just add a class to `package:native_toolchain_c`: ```dart /// Optimization level for code compilation. final class OptimizationLevel { /// The optimization level. final String _level;...

> This looks good to me, even though I'd probably prefer `-Os` to `-O3` as default. Though not a hill I'd die on. I think it's a better balance to...

I don't have a super strong opinion about the default. Users can always specify it in the `CBuilder` constructor. Happy to receive a patch with either one as default :)

I think we should do https://github.com/dart-lang/native/issues/1267#issuecomment-2225232108, preferably before FlutterconUSA. Otherwise, the next group of enthusiasts is going to be wondering why their native code is slow. Happy to receive a...

> This would certainly need some changes in `native_toolchain_rust`. I'll do my best to accommodate those. Missing pieces seem to be custom cargo arguments and static library. I'm not sure...

https://dart-review.googlesource.com/c/sdk/+/382561