Cargo Features

[dependencies]
hai_core = { version = "0.7.0", default-features = false, features = ["desktop", "js_runtime", "quickjs", "v8", "video", "web", "huozi"] }
default = desktop, js_runtime, quickjs

These default features are set whenever hai_core is added without default-features = false somewhere in the dependency tree.

desktop default

Enables tokio, desktop of hai_pal

js_runtime default

Affects node::Node.update_properties, node::Node.as_command, plugin::Plugin.as_command, utils::convert, utils::dispatch_event, dispatch_event::dispatch_event, dispatch_event::dispatch_event

quickjs default = hai_runtime

Enables quickjs of hai_macros

Affects convert::JSValue, convert::from_js, convert::to_js, dispatch_event::dispatch_event

v8 = hai_js_runtime

Enables v8 of hai_macros

Affects convert::JSValue, convert::from_js, convert::to_js, dispatch_event::dispatch_event

video

Enables ffmpeg-rs

web

Enables pollster ^0.2.5, serde-wasm-bindgen ^0.4, wasm-bindgen, and web-sys, web of hai_pal and webgl of wgpu ^0.19.1

wgpu:

Enables the GLES backend on Wasm

* ⚠️ WIP: Currently will also enable GLES dependencies on any other targets.

Affects convert::JSValue, convert::from_js, convert::to_js

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

huozi implicit feature

Enables huozi ^0.5

huozi:

A simple typography engine for CJK languages, especially designed for game rich-text

hai_js_runtime v8?
hai_runtime quickjs