-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10bd098
commit 6848adb
Showing
9 changed files
with
68 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Daku v1.0.0-pre.0 (draft v11) | ||
# Daku v1.0.0-pre.0 (draft v13) | ||
|
||
> Asynchronous host interface abstraction API for WebAssembly plugins, drivers, | ||
> applications, and more! | ||
|
@@ -7,26 +7,20 @@ 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](https://ardaku.org/daku) 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 | ||
|
||
- Simple | ||
- Efficient | ||
- Modular | ||
- Minimal (in API surface, and memory footprint) | ||
- Asynchronous | ||
- Stable base API | ||
- As simple and efficient as possible | ||
- Backwards Compatible | ||
- Reduced context switching | ||
- Security-first | ||
- First-class multimedia portals | ||
- Portals compatible with WASI versions via 2-way abstractions | ||
- First-class multimedia portals (WASI compatible) | ||
|
||
## License | ||
Copyright © 2022-2023 The Daku Contributors. | ||
Copyright © 2022-2024 The Daku Contributors. | ||
|
||
Licensed under any of | ||
- Apache License, Version 2.0, ([LICENSE\_APACHE] or | ||
|
@@ -38,82 +32,16 @@ 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 <[email protected]>. | ||
|
||
[LICENSE\_APACHE]: https://github.com/ardaku/daku/blob/v1/LICENSE_APACHE | ||
[LICENSE\_BOOST]: https://github.com/ardaku/daku/blob/v1/LICENSE_BOOST | ||
[LICENSE\_MIT]: https://github.com/ardaku/daku/blob/v1/LICENSE_MIT | ||
|
||
## Types | ||
|
||
### TimeZone | ||
```rust | ||
#[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 | ||
```rust | ||
#[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>, | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,6 @@ Spoken language | |
- `identifier: [byte; 2]` | ||
|
||
### Language Identifiers | ||
|
||
- `en`: English | ||
- `eo`: Esperanto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# LeapSecond | ||
|
||
## *Type*: `LeapSecond` | ||
|
||
A leap second | ||
|
||
### Fields | ||
|
||
- `year: half` Which year | ||
- `month: byte` Always the last day of the month (0-11) | ||
- `delta: byte` Direction (either -1 or +1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,6 @@ Region code | |
- `identifier: [byte; 2]` | ||
|
||
### Region Identifiers | ||
|
||
- `US`: United States | ||
- `GB`: Great Britain / UK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# TimeAdjustment | ||
|
||
## *Type*: `TimeAdjustment` | ||
|
||
A time adjustment like daylight savings time | ||
|
||
### Fields | ||
|
||
- `old: DateTime` Old time | ||
- `new: DateTime` New time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# TimeDesignation | ||
|
||
## *Type*: `TimeDesignation` | ||
|
||
Name of a timezone | ||
|
||
### Fields | ||
|
||
- `designation: int` | ||
|
||
### Designations | ||
|
||
0. UTC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# TimeZone | ||
|
||
## *Type*: `TimeZone` | ||
|
||
A timezone specification | ||
|
||
### Fields | ||
|
||
- `designation: TimeDesignation` Name of the timezone | ||
- `extension: opt[_]`: Reserved for timezone specification extensions | ||
- `offset: DateTime` Date and time of this timezone for UTC jan 1 00:00:00:000 | ||
year 0 | ||
- `adjustments: List[TimeAdjustment]` List of adjustments made in this timezone | ||
- `leap_seconds: List[LeapSecond]`: List of leap seconds |