A modern desktop application framework based on web technologies.
Dependencies
moon run --target native cli/lepus -- doctormoon run --target native examples/hellomoon run --target native examples/dialogmoon run --target native cli/lepus -- init my-app///|
async fn main {
let main_window = @lepus.WindowConfig::new(
title="Hello Lepus",
html=(
#|<!doctype html>
#|<html><body><h1>Hello Lepus</h1></body></html>,
),
)
@lepus.App(main_window).run()
}///|
async fn main {
let main_window = @lepus.WindowConfig::new(
title="Dialog Example",
html=@lepus_plugin_support.example_html("dialog", "Dialog Plugin Example"),
)
@lepus.App(main_window, plugins=[@lepus_plugin_dialog.plugin()]).run()
}///|
async fn main {
let window = @lepus.WindowConfig::new(
title="Custom Window",
frameless=true,
transparent=true,
title_bar_style=1, // hidden
title_bar_overlay=true, // overlay controls
html="<div class='lepus-titlebar'>Drag me</div>",
)
@lepus.App(window).run()
}.
├── cli/lepus/ # CLI implementation
├── examples/ # runnable native examples
├── plugins/ # official plugin packages
├── webview/ # WebView runtime and bridge
├── lepus.mbt # top-level Lepus API
├── moon.pkg # root package definition
└── moon.modmoon check
moon test --target native -p lepus-apps/lepus/webview
moon info && moon fmtmoon run --target native cli/lepus -- --help#alias(new, deprecated="Use `MemorySource()` instead")
fn MemorySource::MemorySource(files : Array[MemoryFile], entry? : String) -> MemorySource#alias(new, deprecated="Use `Window()` instead")
fn Window::Window(title? : String, width? : Int, height? : Int, debug? : Int, devtools? : Bool, frameless? : Bool, resizable? : Bool, always_on_top? : Bool, transparent? : Bool, title_bar_style? : TitleBarStyle, title_bar_overlay? : Bool, traffic_light_position? : (Int, Int), source? : Source, plugins? : Array[Plugin]) -> Windowpub struct WindowConfig {
title : String
width : Int
height : Int
debug : Int
devtools : Bool
frameless : Bool
resizable : Bool
always_on_top : Bool
transparent : Bool
title_bar_style : TitleBarStyle
title_bar_overlay : Bool
traffic_light_position : (Int, Int)
source : Source?
} derive(Eq, Hash, ToJson, Debug, FromJson)fn WindowConfig::new(title? : String, width? : Int, height? : Int, debug? : Int, devtools? : Bool, frameless? : Bool, resizable? : Bool, always_on_top? : Bool, transparent? : Bool, title_bar_style? : TitleBarStyle, title_bar_overlay? : Bool, traffic_light_position? : (Int, Int), source? : Source) -> WindowConfigInstall
Download zipA modern desktop application framework based on web technologies.
Dependencies