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.
- 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
Copyright © 2022-2023 The Daku Contributors.
Licensed under any of
- Apache License, Version 2.0, (LICENSE_APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- Boost Software License, Version 1.0, (LICENSE_BOOST or https://www.boost.org/LICENSE_1_0.txt)
- MIT License, (LICENSE_MIT or https://mit-license.org/)
at your option.
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.
If you want help using or contributing to this library or specification, feel free to send me an email at aldaronlau@gmail.com.
#[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,
}
#[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>,
}