Skip to content

DimensionscapeOrg/crossbyte-libuv

Repository files navigation

crossbyte-libuv

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.

Usage

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 Main

The 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.

Local Development

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.hxml

Native smoke build:

haxe native-test.hxml -D crossbyte_libuv_native

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors