#utility #ffi #system #device-name

nick-name

A Cross-Platform Rust user define device-name(nick-name) get set library

3 releases

0.1.2 Dec 15, 2023
0.1.1 Nov 27, 2023
0.1.0 Nov 27, 2023

#286 in Hardware support

Download history 9/week @ 2024-01-11 31/week @ 2024-01-18 23/week @ 2024-01-25 12/week @ 2024-02-01 13/week @ 2024-02-08 36/week @ 2024-02-15 15/week @ 2024-02-22 11/week @ 2024-02-29 17/week @ 2024-03-07 24/week @ 2024-03-14 6/week @ 2024-03-21 38/week @ 2024-03-28 23/week @ 2024-04-04

95 downloads per month

MIT/Apache-2.0/BSD-3-Clause

48KB
833 lines

Supported platforms

  • linux systems (Linux, FreeBSD, OpenBSD, NetBSD, Solaris, Redox, and so on)
  • Windows
  • Android
  • iPhone

cannot support platform yet

function

Android

  • get

iPhone

  • get

Windows, Linux, macOS

  • get
  • set

! macOS is not stable because not using native api yet

Rust target

https://doc.rust-lang.org/nightly/rustc/platform-support.html

build

look README.md on example https://github.com/nziq53/nickname/tree/main/examples/common

next

macOS

use native api be able to miri

Android

be able to miri

iPhone

be able to miri

linux

be able to miri on set func

extension function

Android

  • finish call finishAndRemoveTask()
  • get_device_api_level get api_level call VERSION.SDK_INT
  • check_permission_old check permission
  • check_permission_new check permission

github actions test on mobile

android

  • api-level 24: error: "API level 25 or higher is required"
  • api-level 30: Android SDK built for x86_64
  • api-level 33: sdk_gphone_x86_64

miri support

  • windows
  • linux(only get)

Dependencies

~0.4–12MB
~86K SLoC