tinyrlibc

Crates.iotinyrlibc
lib.rstinyrlibc
version0.4.0
sourcesrc
created_at2019-09-01 22:53:10.260004
updated_at2024-03-22 20:36:50.49712
descriptionTiny, incomplete C library for bare-metal targets, written in Stable (but Unsafe) Rust
homepage
repositoryhttps://github.com/rust-embedded-community/tinyrlibc
max_upload_size
id161466
size64,295
all (github:rust-embedded-community:all)

documentation

README

Tiny Rust libc

Introduction

This is a tiny libc implementation, mostly (but not entirely) written in the Rust programming language. It is useful for bare-metal embedded Rust applications that need a C library (maybe because of some third-party library written in C they want to use) but don't want to link against a full newlib, or who tried but had trouble with both newlib and compiler_builtins defining symbols like memset.

This crate basically came about so that the nrfxlib binary interface library for the nRF9160 would work with Rust.

Implemented so far

  • abs
  • strol
  • atoi
  • isspace
  • isdigit
  • isalpha
  • isupper
  • strcmp
  • strncmp
  • strncasecmp
  • strcpy
  • strncpy
  • strlen
  • strtol
  • strtoll
  • strtoul
  • strtoull
  • strtoimax
  • strtoumax
  • strstr
  • strchr
  • snprintf
  • vsnprintf
  • alloc (optional)
    • malloc
    • calloc
    • realloc
    • free
  • signal (optional)
    • signal
    • raise
    • abort

Non-standard helper functions

  • itoa
  • utoa

To Do

  • Anything else nrfxlib needs
  • Anything anyone is prepared to submit

Licence

As this is going to be a bunch of bits taken from all over the place (some newlib, some relibc, etc), each function has its own file and each file has its own licence. Any new licences should be appended to the LICENCE.md file.

Commit count: 62

cargo fmt