Skip to main content

Crate wasm

Crate wasm 

Source
Expand description

Xila WebAssembly runtime and guest API (wasm).

This crate exposes two feature-selected surfaces:

  • Guest API (guest / default_guest features, target wasm32-wasip1): The #![no_std] guest interface linked by Xila WebAssembly applications. It re-exports fd_control for custom VFS descriptor control commands over wasi_snapshot_preview1 and, when the graphics feature is enabled, the generated LVGL widget, window, style, layout, file-picker, and event functions backed by the host::xila_graphics_call import, along with EventCode and EVENT_CLOSE_REQUESTED.
  • Host runtime (host feature): The wasmi-based WebAssembly virtual machine executable (WasmDevice), WASI Preview 1 host imports (WasiContext, add_wasi_to_linker), linear memory pointer translation (translation), and host-side LVGL graphics call dispatch (graphics).

Re-exports§

pub use crate::FunctionCall;
pub use crate::EVENT_CLOSE_REQUESTED;
pub use crate::EventCode;

Modules§

prelude

Structs§

Area
CalendarDate
ChartCursor
ChartSeries
Color
Color16
Color32
Color16a
ColorHsv
Display
Font
Group
Layer
Matrix
Object
Point
PointPrecise
ScaleSection

Enums§

Align
AnimEnable
ArcMode
BarMode
BarOrientation
BaseDir
BlendMode
BorderSide
ButtonmatrixCtrl
ChartAxis
ChartType
Mirrors LVGL’s lv_chart_type_t; the host forwards the value unchanged.
ChartUpdateMode
ColorFormat
Dir
EventCode
FilePickerMode
System file picker selection policy. Selection never creates or truncates a file.
FilePickerStatus
A result remains available until the caller deletes the picker object.
FlexAlign
FlexFlow
FunctionCall
Auto-generated file for Xila bindings WASM module Do not edit manually.
GradDir
GridAlign
LabelLongMode
LvglResult
MenuModeHeader
MenuModeRootBackButton
ObjectFlag
ObjectPointTransformFlag
RollerMode
ScaleMode
ScreenLoadAnim
ScrollSnap
ScrollbarMode
SliderMode
SliderOrientation
SpanMode
SpanOverflow
StyleRes
StyleStateCmp
TableCellCtrl
TextAlign
TextDecor
TextFlag
c_void
Equivalent to C’s void type when used as a pointer.

Constants§

COORD_MAX
COORD_MIN
COORD_TYPE_MASK
COORD_TYPE_PX
COORD_TYPE_PX_NEG
COORD_TYPE_SHIFT
COORD_TYPE_SPEC
EVENT_CLOSE_REQUESTED
Xila window close request, separate from LVGL’s standard events.
FLEX_COLUMN
FLEX_REVERSE
FLEX_WRAP
PART_ANY
PART_CURSOR
PART_CUSTOM_FIRST
PART_INDICATOR
PART_ITEMS
PART_KNOB
PART_MAIN
PART_SCROLLBAR
PART_SELECTED
STATE_ALT
STATE_ANY
STATE_CHECKED
STATE_DEFAULT
STATE_DISABLED
STATE_EDITED
STATE_FOCUSED
STATE_FOCUS_KEY
STATE_HOVERED
STATE_PRESSED
STATE_SCROLLED
STATE_USER_1
STATE_USER_2
STATE_USER_3
STATE_USER_4

Functions§

arc_create⚠
Safety
as_usize
badge_create⚠
Safety
bar_create⚠
Safety
button_create⚠
Safety
buttonmatrix_create⚠
Safety
buttonmatrix_get_selected_button⚠
Safety
buttonmatrix_set_map⚠
Safety
calendar_create⚠
Safety
calendar_get_shown_date⚠
Safety
calendar_set_highlights⚠
Safety
calendar_set_month_shown⚠
Safety
calendar_set_today⚠
Safety
card_create⚠
Safety
chart_add_series_slot⚠
Safety
chart_create⚠
Safety
chart_get_value⚠
Safety
chart_set_axis_range⚠
Safety
chart_set_point_count⚠
Safety
chart_set_type⚠
Safety
chart_set_values⚠
Safety
checkbox_create⚠
Safety
checkbox_set_text⚠
Safety
coord_get_pct
coord_is_pct
coord_is_px
coord_is_spec
coord_plain
coord_set_spec
coord_type
dropdown_close⚠
Safety
dropdown_create⚠
Safety
dropdown_get_highlight⚠
Safety
dropdown_get_option_count⚠
Safety
dropdown_get_selected⚠
Safety
dropdown_get_selected_string⚠
Safety
dropdown_is_open_state⚠
Safety
dropdown_open⚠
Safety
dropdown_set_options⚠
Safety
dropdown_set_selected⚠
Safety
dropdown_set_selected_highlight⚠
Safety
fd_control⚠
Runs a file-system-specific control command on an open descriptor.
file_picker_create⚠
Safety
file_picker_get_path⚠
Safety
file_picker_get_status⚠
Safety
file_picker_reset⚠
Safety
grid_fr⚠
Safety
indexed_canvas_create⚠
Safety
indexed_canvas_set_pixels⚠
Safety
keyboard_create⚠
Safety
keyboard_set_textarea⚠
Safety
label_create⚠
Safety
label_set_text⚠
Safety
led_create⚠
Safety
led_off⚠
Safety
led_on⚠
Safety
led_set_brightness⚠
Safety
led_toggle⚠
Safety
line_create⚠
Safety
line_set_points⚠
Safety
line_set_y_invert⚠
Safety
list_add_text⚠
Safety
list_add_text_button⚠
Safety
list_create⚠
Safety
list_set_button_text⚠
Safety
max
min
object_add_flag⚠
Safety
object_add_state⚠
Safety
object_align⚠
Safety
object_create⚠
Safety
object_delete⚠
Safety
object_get_height⚠
Safety
object_get_state⚠
Safety
object_get_width⚠
Safety
object_get_x⚠
Safety
object_get_y⚠
Safety
object_remove_flag⚠
Safety
object_remove_state⚠
Safety
object_set_background⚠
Safety
object_set_border⚠
Safety
object_set_flex_align⚠
Safety
object_set_flex_flow⚠
Safety
object_set_flex_grow⚠
Safety
object_set_font⚠
Safety
object_set_grid_align⚠
Safety
object_set_grid_cell⚠
Safety
object_set_grid_dsc_array⚠
Safety
object_set_height⚠
Safety
object_set_layout⚠
Safety
object_set_min_max_size⚠
Safety
object_set_padding⚠
Safety
object_set_pos⚠
Safety
object_set_radius⚠
Safety
object_set_size⚠
Safety
object_set_surface⚠
Safety
object_set_text_align⚠
Safety
object_set_text_color⚠
Safety
object_set_theme_error⚠
Safety
object_set_theme_variant⚠
Safety
object_set_width⚠
Safety
object_update_layout⚠
Safety
pct
percentage⚠
Safety
range_get_start_value⚠
Safety
range_get_value⚠
Safety
range_set_mode⚠
Safety
range_set_orientation⚠
Safety
range_set_range⚠
Safety
range_set_value⚠
Safety
roller_create⚠
Safety
roller_get_option_count⚠
Safety
roller_get_selected⚠
Safety
roller_get_selected_string⚠
Safety
roller_set_options⚠
Safety
roller_set_selected⚠
Safety
roller_set_visible_row_count⚠
Safety
size_content
slider_create⚠
Safety
spinbox_create⚠
Safety
spinbox_decrement⚠
Safety
spinbox_get_value⚠
Safety
spinbox_increment⚠
Safety
spinbox_set_digit_format⚠
Safety
spinbox_set_range⚠
Safety
spinbox_set_rollover⚠
Safety
spinbox_set_step⚠
Safety
spinbox_set_value⚠
Safety
spinner_create⚠
Safety
spinner_get_animation_duration⚠
Safety
spinner_get_arc_sweep⚠
Safety
spinner_set_animation⚠
Safety
switch_create⚠
Safety
tabview_add_tab⚠
Safety
tabview_create⚠
Safety
tabview_get_tab_active⚠
Safety
textarea_create⚠
Safety
textarea_get_text⚠
Safety
textarea_get_text_length⚠
Safety
textarea_set_max_length⚠
Safety
textarea_set_one_line⚠
Safety
textarea_set_text⚠
Safety
tileview_add_tile⚠
Safety
tileview_create⚠
Safety
tileview_get_tile_active⚠
Safety
tileview_set_tile⚠
Safety
window_create⚠
Safety
window_pop_event⚠
Safety
window_pop_pointer_event⚠
Safety
window_set_icon⚠
Safety
xila_graphics_arc_create
xila_graphics_badge_create
xila_graphics_bar_create
xila_graphics_button_create
xila_graphics_buttonmatrix_create
xila_graphics_buttonmatrix_get_selected_button
xila_graphics_buttonmatrix_set_map
xila_graphics_calendar_create
xila_graphics_calendar_get_shown_date
xila_graphics_calendar_set_highlights
xila_graphics_calendar_set_month_shown
xila_graphics_calendar_set_today
xila_graphics_call⚠
xila_graphics_card_create
xila_graphics_chart_add_series_slot
xila_graphics_chart_create
xila_graphics_chart_get_value
xila_graphics_chart_set_axis_range
xila_graphics_chart_set_point_count
xila_graphics_chart_set_type
xila_graphics_chart_set_values
xila_graphics_checkbox_create
xila_graphics_checkbox_set_text
xila_graphics_dropdown_close
xila_graphics_dropdown_create
xila_graphics_dropdown_get_highlight
xila_graphics_dropdown_get_option_count
xila_graphics_dropdown_get_selected
xila_graphics_dropdown_get_selected_string
xila_graphics_dropdown_is_open_state
xila_graphics_dropdown_open
xila_graphics_dropdown_set_options
xila_graphics_dropdown_set_selected
xila_graphics_dropdown_set_selected_highlight
xila_graphics_file_picker_create
xila_graphics_file_picker_get_path
xila_graphics_file_picker_get_status
xila_graphics_file_picker_reset
xila_graphics_grid_fr
xila_graphics_indexed_canvas_create
xila_graphics_indexed_canvas_set_pixels
xila_graphics_keyboard_create
xila_graphics_keyboard_set_textarea
xila_graphics_label_create
xila_graphics_label_set_text
xila_graphics_led_create
xila_graphics_led_off
xila_graphics_led_on
xila_graphics_led_set_brightness
xila_graphics_led_toggle
xila_graphics_line_create
xila_graphics_line_set_points
xila_graphics_line_set_y_invert
xila_graphics_list_add_text
xila_graphics_list_add_text_button
xila_graphics_list_create
xila_graphics_list_set_button_text
xila_graphics_object_add_flag
xila_graphics_object_add_state
xila_graphics_object_align
xila_graphics_object_create
xila_graphics_object_delete
xila_graphics_object_get_height
xila_graphics_object_get_state
xila_graphics_object_get_width
xila_graphics_object_get_x
xila_graphics_object_get_y
xila_graphics_object_remove_flag
xila_graphics_object_remove_state
xila_graphics_object_set_background
xila_graphics_object_set_border
xila_graphics_object_set_flex_align
xila_graphics_object_set_flex_flow
xila_graphics_object_set_flex_grow
xila_graphics_object_set_font
xila_graphics_object_set_grid_align
xila_graphics_object_set_grid_cell
xila_graphics_object_set_grid_dsc_array
xila_graphics_object_set_height
xila_graphics_object_set_layout
xila_graphics_object_set_min_max_size
xila_graphics_object_set_padding
xila_graphics_object_set_pos
xila_graphics_object_set_radius
xila_graphics_object_set_size
xila_graphics_object_set_surface
xila_graphics_object_set_text_align
xila_graphics_object_set_text_color
xila_graphics_object_set_theme_error
xila_graphics_object_set_theme_variant
xila_graphics_object_set_width
xila_graphics_object_update_layout
xila_graphics_percentage
xila_graphics_range_get_start_value
xila_graphics_range_get_value
xila_graphics_range_set_mode
xila_graphics_range_set_orientation
xila_graphics_range_set_range
xila_graphics_range_set_value
xila_graphics_roller_create
xila_graphics_roller_get_option_count
xila_graphics_roller_get_selected
xila_graphics_roller_get_selected_string
xila_graphics_roller_set_options
xila_graphics_roller_set_selected
xila_graphics_roller_set_visible_row_count
xila_graphics_slider_create
xila_graphics_spinbox_create
xila_graphics_spinbox_decrement
xila_graphics_spinbox_get_value
xila_graphics_spinbox_increment
xila_graphics_spinbox_set_digit_format
xila_graphics_spinbox_set_range
xila_graphics_spinbox_set_rollover
xila_graphics_spinbox_set_step
xila_graphics_spinbox_set_value
xila_graphics_spinner_create
xila_graphics_spinner_get_animation_duration
xila_graphics_spinner_get_arc_sweep
xila_graphics_spinner_set_animation
xila_graphics_switch_create
xila_graphics_tabview_add_tab
xila_graphics_tabview_create
xila_graphics_tabview_get_tab_active
xila_graphics_textarea_create
xila_graphics_textarea_get_text
xila_graphics_textarea_get_text_length
xila_graphics_textarea_set_max_length
xila_graphics_textarea_set_one_line
xila_graphics_textarea_set_text
xila_graphics_tileview_add_tile
xila_graphics_tileview_create
xila_graphics_tileview_get_tile_active
xila_graphics_tileview_set_tile
xila_graphics_window_create
xila_graphics_window_pop_event
xila_graphics_window_pop_pointer_event
xila_graphics_window_set_icon

Type Aliases§

Anim
BlurQuality
Error
LvObject
ObjectClass
ObjectHandle
Opa
Part
Result
State
Style
StyleProp
StyleSelector
TextLeadingTrim
ValuePrecise

Unions§

StyleValue