{"id":14976970,"url":"https://github.com/nyantasticuwu/nstd","last_synced_at":"2025-10-27T21:32:05.086Z","repository":{"id":43715204,"uuid":"398712003","full_name":"NyantasticUwU/nstd","owner":"NyantasticUwU","description":"Cross platform CFFI based library. (Prototype)","archived":false,"fork":false,"pushed_at":"2022-04-19T19:37:06.000Z","size":1425,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T09:10:52.752Z","etag":null,"topics":["api","c","cross-platform","embedded","ffi","framework","library","linux","macos","open-source","rust","windows"],"latest_commit_sha":null,"homepage":"https://docs.rs/nstd/latest/nstd/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NyantasticUwU.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-22T04:16:52.000Z","updated_at":"2023-02-16T08:34:03.000Z","dependencies_parsed_at":"2022-09-11T23:21:10.051Z","dependency_job_id":null,"html_url":"https://github.com/NyantasticUwU/nstd","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyantasticUwU%2Fnstd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyantasticUwU%2Fnstd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyantasticUwU%2Fnstd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyantasticUwU%2Fnstd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NyantasticUwU","download_url":"https://codeload.github.com/NyantasticUwU/nstd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238561693,"owners_count":19492766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","c","cross-platform","embedded","ffi","framework","library","linux","macos","open-source","rust","windows"],"created_at":"2024-09-24T13:54:46.505Z","updated_at":"2025-10-27T21:31:59.739Z","avatar_url":"https://github.com/NyantasticUwU.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![crates.io](https://img.shields.io/crates/v/nstd)](https://crates.io/crates/nstd)\n\n# About\nNSTD is a library that is meant to be cross-platform, and fairly safe (any function that can fail\nwill return an error code indicating if it has or hasn't) while having a plethora of features and\nfunctionality. The goal is to have one API for any platform, any language, and any use case.\n\n# Platform support\nThe `core` module can be used ***ANYWHERE***. It doesn't rely on ***ANY*** other libraries,\nincluding standard libraries (except for the headers `stddef.h` and `stdint.h`). Other modules will\nwork on *most* platforms and have been tested to build for Windows, macOS, Linux, and Redox.\n\n# Module overview\n- `nstd` - Cross platform CFFI based library.\n    - `alloc` - Heap allocation.\n        - `allocator` - Custom vtable struct for memory allocation.\n        - `heap` - Similar to Rust's Box.\n    - `audio` - Audio I/O.\n        - `def` - Common audio-related types.\n        - `device` - An audio I/O device handle.\n        - `host` - A platform's audio host.\n        - `player` - An audio player.\n        - `queue` - A queue for audio streams.\n        - `stream` - An audio I/O stream.\n    - `collections` - Collection types.\n        - `bit_mask` - Customizable bit mask with a small memory footprint.\n        - `rc` - Shared memory through a reference counter.\n        - `stack` - A growable and shrinkable stack array type.\n    - `core` - Contains modules that don't require an operating system to be used.\n        - `char_types` - Functions specific to character types.\n        - `cstr` - C string examination.\n        - `def` - Commonly used typedefs.\n        - `float_types` - Functions specific to floating point types.\n        - `int_types` - Functions specific to integer types.\n        - `math` - Low level math.\n        - `platform` - Platform identification.\n        - `pointer` - Pointer type.\n        - `range` - Range types.\n        - `slice` - View into a memory.\n        - `str` - UTF-8 string slice type.\n    - `env` - Environment specific functionality and identification.\n    - `events` - Event loops.\n        - `def` - Common types that are used by the event system.\n        - `device_id` - Type used to identify a device.\n        - `window_id` - Type used to identify a window.\n    - `fs` - File system.\n        - `file` - File I/O.\n    - `gl` - Low level graphics library.\n        - `buffer` - GPU VRAM buffers.\n        - `command` - Device commands.\n            - `buffer` - GPU Command buffers.\n            - `encoder` - GPU Command encoders.\n        - `def` - Commonly used graphics related types.\n        - `device` - Module for working with graphics devices.\n            - `handle` - A handle to a graphics device.\n            - `info` - Information about a graphics device.\n        - `instance` - An instance of `wgpu`.\n        - `render` - Rendering.\n            - `pass` - Contains functions for working with a render pass.\n            - `pipeline` - A rendering pipeline.\n        - `shader` - GPU shader programs.\n            - `module` - Shader modules.\n        - `state` - The graphics library's state machine.\n        - `surface` - Interaction with the display's surface.\n            - `config` - The surface's configuration.\n            - `texture` - Surface textures.\n        - `texture` - Module for working with textures.\n            - `format` - A texture's data format.\n            - `view` - Texture views.\n    - `gui` - Graphical user interface library.\n        - `display` - A display/monitor handle.\n        - `window` - Windows and forms.\n    - `image` - Raw image data IO.\n    - `input` - Keyboard/Mouse input.\n        - `key` - Keyboard types.\n        - `mouse` - Mouse types.\n    - `io` - Standard I/O.\n        - `input_stream` - Input stream type.\n        - `io_stream` - Stream type for both input and output.\n        - `output_stream` - Output stream type.\n        - `stderr` - The standard error stream.\n        - `stdin` - The standard input stream.\n        - `stdout` - The standard output stream.\n        - `stream` - Base stream type.\n    - `math` - High level math.\n    - `net` - Networking.\n        - `tcp` - TCP networking.\n        - `udp` - UDP networking.\n    - `os` - Operating system specific functionality.\n        - `linux` - OS support for Linux.\n            - `alloc` - Low level memory allocation for Linux.\n        - `windows` - OS support for Windows.\n            - `alloc` - Low level memory allocation for Windows.\n                - `heap` - Windows heap management.\n            - `def` - Commonly used Windows typedefs.\n            - `io` - Windows standard I/O.\n            - `thread` - Thread support for Windows.\n    - `proc` - Process management.\n    - `rand` - Random value generation.\n    - `string` - Dynamically sized UTF-8 encoded string.\n    - `thread` - Threading API.\n    - `time` - Library for getting system times.\n    - `vec` - A dynamically sized array.\n\n# How to build\n```\ncargo build --release --features \"\"\n```\nWhere after \"--features\", inside the quotation marks, you would list each module seperated by spaces\nand prefixed with \"nstd_\", though the `nstd_os` module is a bit different, and has it's own\nfeatures such as `nstd_os_alloc` which can be enabled seperately, `nstd_os` is not required.\n`nstd_core` is built by default. For building nstd as a C library, you should also use the \"clib\"\nfeature, to build the module for C ABI.\n\nExample:\n```\ncargo build --release --features \"clib nstd_alloc nstd_os nstd_os_io nstd_string\"\n```\nAlternatively you can also use\n```\ncargo build --release --all-features\n```\nto build with all modules.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyantasticuwu%2Fnstd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyantasticuwu%2Fnstd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyantasticuwu%2Fnstd/lists"}