Optional libuv poll backend extension for CrossByte.
CrossByte core keeps its built-in Haxe/hxcpp poll backend as the fallback. This package installs a libuv-backed implementation through CrossByte's internal poll backend seam.
import crossbyte.libuv.LibuvPoll;
class Main {
public static function main():Void {
if (!LibuvPoll.install()) {
throw "crossbyte-libuv was not compiled with native libuv support";
}
// Create/use CrossByte after installing the backend.
}
}Native support is opt-in:
haxe -cp path/to/crossbyte/src -lib crossbyte-libuv -D crossbyte_libuv_native --cpp export/app -main MainThe native build expects libuv headers and libraries to be available to hxcpp.
On Unix-like systems this usually means libuv1-dev or equivalent and -luv.
On Windows, provide libuv through your toolchain or define/link paths in your
hxcpp environment.
Without -D crossbyte_libuv_native, the package still type-checks and
LibuvPoll.install() returns false.
From this repo, point haxelib at your local CrossByte checkout:
haxelib git crossbyte-libuv https://github.com/DimensionscapeOrg/crossbyte-libuv.git main
haxelib install utest
haxe test.hxmlNative smoke build:
haxe native-test.hxml -D crossbyte_libuv_native