Files
gelectron/crates/gelectron-core/src/lib.rs
T
miles 86c19b0012 feat: add Gelectron compatibility layer for Electron modules
- Introduced contextBridge module for exposing APIs to the main world.
- Added dialog module for handling open, save, and message dialogs.
- Created index module as a drop-in replacement for Electron's main API.
- Implemented ipcMain and ipcRenderer modules for inter-process communication.
- Developed menu and menu item modules for creating application menus.
- Added nativeImage module for handling images in various formats.
- Implemented notification module for displaying system notifications.
- Created preload-loader for injecting preload scripts into the renderer process.
- Developed runtime module for running Electron apps in a Node.js environment.
- Added safe-storage module for basic string encryption and decryption.
- Implemented shell module for opening external URLs and managing file paths.
- Created tray module for managing system tray icons and menus.
- Developed webContents utilities for interacting with browser windows.
2026-07-26 17:12:47 -05:00

51 lines
929 B
Rust

use napi_derive::napi;
mod app;
mod browser_window;
mod context_bridge;
mod dialog;
mod event_loop;
mod ipc;
mod menu;
mod native_image;
mod notification;
mod protocol;
mod safe_storage;
mod servo_host;
mod shell;
mod tray;
mod web_contents;
pub use app::*;
pub use browser_window::*;
pub use context_bridge::*;
pub use dialog::*;
pub use event_loop::*;
pub use ipc::*;
pub use menu::*;
pub use native_image::*;
pub use notification::*;
pub use protocol::*;
pub use safe_storage::*;
pub use servo_host::*;
pub use shell::*;
pub use tray::*;
pub use web_contents::*;
#[napi]
pub fn init() -> String {
env_logger::init();
log::info!("gelectron-core v{} initialized", env!("CARGO_PKG_VERSION"));
format!("gelectron-core v{}", env!("CARGO_PKG_VERSION"))
}
#[napi]
pub fn get_platform() -> String {
std::env::consts::OS.to_string()
}
#[napi]
pub fn get_arch() -> String {
std::env::consts::ARCH.to_string()
}