eacc7e8b87
This was needed so that it could be called from Dart as well as flutter_main/C++. It turns out flutter_main does not run on the "ui thread", so when Dart was calling into the updater it would panic due to thinking the updater (which was using a thread local) was not yet initialized. Also added the log-panics crate on Android so that panics appear in adb logcat.
20 lines
678 B
TOML
20 lines
678 B
TOML
# See https://github.com/eqrion/cbindgen/blob/master/docs.md#cbindgentoml
|
|
# for detailed documentation of every option here.
|
|
language = "C"
|
|
include_guard = "updater_h"
|
|
autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */"
|
|
cpp_compat = true
|
|
line_length = 80
|
|
|
|
# I don't know if these are required to export the shorebird_ symbols
|
|
# since I've hit multiple levels of export trouble in libflutter.so.
|
|
# But I'm leaving them here for now.
|
|
after_includes = """
|
|
#ifdef _WIN32
|
|
#define SHOREBIRD_EXPORT __declspec(dllexport)
|
|
#else
|
|
#define SHOREBIRD_EXPORT __attribute__((visibility("default")))
|
|
#endif
|
|
"""
|
|
[fn]
|
|
prefix = "SHOREBIRD_EXPORT" |