ardaku / daku

Asynchronous host interface abstraction API for WebAssembly plugins, drivers, applications, and more!

Home Page:https://ardaku.org/daku/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Daku v1.0.0-pre.0 (draft v11)

Asynchronous host interface abstraction API for WebAssembly plugins, drivers, applications, and more!

The daku crate is designed to be used for applications that run within a host, such as a plugin in an application, or a driver in an operating system, and even a program in an operation system (similar to WASI), and more!

Since Daku is currently in the pre-release stage, things may change based on feedback but large changes are unlikely.

The daku specification is currently in draft, so some remnants of the old spec may remain in this README and other files in the repository for now.

Goals

  • Modular
  • Minimal (in API surface, and memory footprint)
  • Asynchronous
  • Stable base API
  • As simple and efficient as possible
  • Reduced context switching
  • Security-first
  • First-class multimedia portals
  • Portals compatible with WASI versions via 2-way abstractions

License

Copyright © 2022-2023 The Daku Contributors.

Licensed under any of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as described above, without any additional terms or conditions.

Help

If you want help using or contributing to this library or specification, feel free to send me an email at aldaronlau@gmail.com.

Types

TimeZone

#[repr(C, u32)]
enum TimeDesignation {
    Utc = 0,
}

#[repr(C, packed)]
struct TimeAdjustment {
    /// Time to replace
    when: DateTime,
    /// New time
    new: DateTime,
}

#[repr(C, packed)]
struct LeapSecond {
    /// Which year
    year: i16,
    /// Always the last day of the month
    month: u8,
    /// Direction: Either -1 or +1
    delta: i8,
}

#[repr(C, packed)]
struct TimeZone {
    /// Name of TimeZone (abbreviated, null terminated unless size 6)
    designation: TimeDesignation,
    /// List of adjustments made in this timezone
    deltas: List<TimeAdjustment>,
    /// Replace UTC jan 1 00:00:00:000 year 0 with Local time adjustments
    /// 
    /// This must be equivalent to all of the adjustments in `deltas` plus
    /// any daylight savings time modifications.
    offset: DateTime,
    /// List of leap seconds
    leap_seconds: List<LeapSecond>,
    /// Sum of leap seconds
    leap: i16,
    /// Is daylight savings time?
    is_dst: bool,
    /// Reserved for future use, set to 0
    reserved: u8,
}

Lang

#[repr(C, u32)]
enum Language {
    /// English United States
    EnUS = u32::from_ne_bytes(*b"enUS"),
    /// English Great Britain
    EnGB = u32::from_ne_bytes(*b"enGB"),
    /// Esperanto
    EoXX = u32::from_ne_bytes(*b"eoXX"),
}

#[repr(C, packed)]
struct Lang {
    /// List of languages in order of user preference (0 is most preferred)
    list: List<Language>,
}

About

Asynchronous host interface abstraction API for WebAssembly plugins, drivers, applications, and more!

https://ardaku.org/daku/

License:Apache License 2.0


Languages

Language:Rust 100.0%