daku/
lib.rs

1//! Rust crate to interface with the [Daku API](https://github.com/ardaku/daku).
2//! This crate only works on wasm32 platforms supporting the daku api.
3//!
4//! # Concurrency model of Daku
5//! Daku doesn't use the concept of threads or shared memory.  You can spawn
6//! isolated tasks with the API, which can then communicate exclusively over
7//! channels.  If a task becomes unresponsive (too long between calls to
8//! [`sys::ar()`]), then it will be killed.  For CPU intensive tasks, use
9//! `spawn_blocking` (FIXME).
10
11#![no_std]
12#![doc(
13    html_logo_url = "https://ardaku.github.io/mm/logo.svg",
14    html_favicon_url = "https://ardaku.github.io/mm/icon.svg",
15    html_root_url = "https://docs.rs/daku"
16)]
17#![warn(
18    anonymous_parameters,
19    missing_copy_implementations,
20    missing_debug_implementations,
21    missing_docs,
22    nonstandard_style,
23    rust_2018_idioms,
24    single_use_lifetimes,
25    trivial_casts,
26    trivial_numeric_casts,
27    unreachable_pub,
28    unused_extern_crates,
29    unused_qualifications,
30    variant_size_differences
31)]
32
33// FIXME Don't require target os
34#[cfg(not(all(
35    target_arch = "wasm32",
36    target_endian = "little",
37    target_env = "",
38    target_family = "wasm",
39    target_os = "daku",
40    target_pointer_width = "32",
41    target_vendor = "unknown",
42)))]
43compile_error!("Target is not wasm32-daku");
44
45extern crate alloc;
46
47pub mod api;
48pub mod cmd;
49pub mod run;
50pub mod sys;
51pub mod tls;
52
53mod portal;
54
55// FIXME: Remove
56// pub mod cpu_info;