rust/library/std/src
Tomoaki Kawada da9ca41c31 Add SOLID targets
SOLID[1] is an embedded development platform provided by Kyoto
Microcomputer Co., Ltd. This commit introduces a basic Tier 3 support
for SOLID.

# New Targets

The following targets are added:

 - `aarch64-kmc-solid_asp3`
 - `armv7a-kmc-solid_asp3-eabi`
 - `armv7a-kmc-solid_asp3-eabihf`

SOLID's target software system can be divided into two parts: an
RTOS kernel, which is responsible for threading and synchronization,
and Core Services, which provides filesystems, networking, and other
things. The RTOS kernel is a μITRON4.0[2][3]-derived kernel based on
the open-source TOPPERS RTOS kernels[4]. For uniprocessor systems
(more precisely, systems where only one processor core is allocated for
SOLID), this will be the TOPPERS/ASP3 kernel. As μITRON is
traditionally only specified at the source-code level, the ABI is
unique to each implementation, which is why `asp3` is included in the
target names.

More targets could be added later, as we support other base kernels
(there are at least three at the point of writing) and are interested
in supporting other processor architectures in the future.

# C Compiler

Although SOLID provides its own supported C/C++ build toolchain, GNU Arm
Embedded Toolchain seems to work for the purpose of building Rust.

# Unresolved Questions

A μITRON4 kernel can support `Thread::unpark` natively, but it's not
used by this commit's implementation because the underlying kernel
feature is also used to implement `Condvar`, and it's unclear whether
`std` should guarantee that parking tokens are not clobbered by other
synchronization primitives.

# Unsupported or Unimplemented Features

Most features are implemented. The following features are not
implemented due to the lack of native support:

- `fs::File::{file_attr, truncate, duplicate, set_permissions}`
- `fs::{symlink, link, canonicalize}`
- Process creation
- Command-line arguments

Backtrace generation is not really a good fit for embedded targets, so
it's intentionally left unimplemented. Unwinding is functional, however.

## Dynamic Linking

Dynamic linking is not supported. The target platform supports dynamic
linking, but enabling this in Rust causes several problems.

 - The linker invocation used to build the shared object of `std` is
   too long for the platform-provided linker to handle.

 - A linker script with specific requirements is required for the
   compiled shared object to be actually loadable.

As such, we decided to disable dynamic linking for now. Regardless, the
users can try to create shared objects by manually invoking the linker.

## Executable

Building an executable is not supported as the notion of "executable
files" isn't well-defined for these targets.

[1] https://solid.kmckk.com/SOLID/
[2] http://ertl.jp/ITRON/SPEC/mitron4-e.html
[3] https://en.wikipedia.org/wiki/ITRON_project
[4] https://toppers.jp/
2021-09-28 11:31:47 +09:00
..
backtrace Add Frames iterator for Backtrace 2021-01-23 11:56:33 -06:00
collections Fix typo in docs for iterators 2021-09-09 19:21:56 -07:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f32 More lerp tests, altering lerp docs 2021-06-13 14:00:15 -04:00
f64 More lerp tests, altering lerp docs 2021-06-13 14:00:15 -04:00
ffi docs(std): add docs for cof_from_cstr impls 2021-09-15 09:14:20 -07:00
fs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
io Rollup merge of #88667 - kraktus:patch-1, r=dtolnay 2021-09-10 08:23:21 -07:00
lazy Upgrade wasm32 image to Ubuntu 20.04 2021-02-06 13:05:56 +01:00
net Rollup merge of #88339 - piegamesde:master, r=joshtriplett 2021-09-17 14:09:45 +09:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Add SOLID targets 2021-09-28 11:31:47 +09:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path Auto merge of #85166 - mbhall88:file-prefix, r=dtolnay 2021-08-22 05:19:48 +00:00
prelude Move asm! and global_asm! to core::arch 2021-07-18 18:30:58 -04:00
process Test that env_clear works on Windows 2021-06-24 09:32:24 +01:00
sync Update library/std/src/sync/mpsc/shared.rs 2021-09-22 20:20:33 +02:00
sys Add SOLID targets 2021-09-28 11:31:47 +09:00
sys_common add TcpStream::set_linger and TcpStream::linger 2021-08-30 13:42:52 -04:00
thread removed references to parent/child from std::thread documentation 2021-08-07 11:33:18 -04:00
time use AtomicU64::fetch_update instead of handrolled RMW-loop 2021-09-17 18:54:24 +02:00
alloc.rs Rename rterr to rtprintpanic 2021-05-19 15:52:09 +02:00
ascii.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
backtrace.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
env.rs library/std/env: Add 'm68k' to comment on ARCH constant 2021-09-17 15:07:14 +00:00
error.rs Impl Error for FromSecsError without foreign type 2021-09-21 18:02:18 +10:00
f32.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
f64.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
fs.rs Add comments about impls for File, TcpStream, ChildStdin, etc. 2021-08-19 12:02:40 -07:00
keyword_docs.rs Fix typo in break docs 2021-09-16 14:51:14 +03:00
lazy.rs Constified Default implementations 2021-08-17 07:15:54 +00:00
lib.rs Rollup merge of #89017 - the8472:fix-u64-time-monotonizer, r=kennytm 2021-09-19 17:31:32 +09:00
macros.rs bump bootstrap compiler to 1.55 2021-08-01 11:19:24 -04:00
num.rs Add Saturating type (based on Wrapping type) 2021-08-10 19:27:01 +02:00
panic.rs Allow panic!("{}", computed_str) in const fn. 2021-09-15 21:56:43 +01:00
panicking.rs Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
path.rs Auto merge of #85166 - mbhall88:file-prefix, r=dtolnay 2021-08-22 05:19:48 +00:00
primitive_docs.rs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
process.rs Add comments about impls for File, TcpStream, ChildStdin, etc. 2021-08-19 12:02:40 -07:00
rt.rs Auto merge of #88988 - Mark-Simulacrum:avoid-into-ok, r=nagisa 2021-09-18 09:15:40 +00:00
time.rs Add SOLID targets 2021-09-28 11:31:47 +09:00