stdc 1.0.5
stdc: ^1.0.5 copied to clipboard
A minimal-abstraction Standard C Library implementation for Dart. Designed for C programmers to seamlessly use familiar functions like stdc.printf or stdc.sin.
1.0.5 May 6th 2026 #
- Essential Systems Boundaries & Diagnostics: Expanded
stdcwith core limit definitions, floating-point characteristics, and system diagnostics headers. <limits.h>Addition: Provided constants for standard C integer limits (INT_MAX,UINT_MAX,CHAR_BIT, etc.), mapped to traditional C 32-bit bounds forintand 64-bit forlong long.<float.h>Addition: Provided standard C floating-point characteristics (FLT_MAX,DBL_MAX,FLT_EPSILON, etc.).<assert.h>Addition: Implemented runtime assertions. Due toassertbeing a reserved keyword in Dart, the function is implemented asstdc.assert_()orstdc.cassert(), but documented as the C-equivalentassert.<errno.h>Addition: Added global error state tracking (stdc.errno) and standard error macros (EDOM,ERANGE, etc.) to support C-style error reporting.
1.0.4 #
- Massive Systems-Level Feature Expansion: Added support for three core C standard headers simultaneously (
<stdlib.h>,<stdio.h>,<time.h>), significantly expanding the library's utility for C programmers seeking a zero-abstraction environment in Dart. <stdlib.h>Addition: Implemented essential standard library utilities mapping directly to native-equivalent concepts:- String conversions:
atoi,atol,atof. - Pseudo-random number generation:
rand,srand. - Integer arithmetic:
abs,labs,llabs. - Searching and sorting:
qsort,bsearch(designed to use pure Dart's optimized algorithms while exposing the familiar C signatures with comparators).
- String conversions:
<stdio.h>Addition: Brought raw, authentic C-style I/O to Dart using directdart:iohooks where appropriate:- Formatted I/O: Added a lightweight, zero-dependency
sprintfandprintfimplementation that mimics C's format specifiers (%d,%s,%f,%x, etc.) without bloating the library. - Character and String Output:
puts,putchar. - Standard Input:
getchar,gets.
- Formatted I/O: Added a lightweight, zero-dependency
<time.h>Addition: Implemented low-level time tracking utilities mapping to system ticks and epochs:- Core timing:
time,clock. - Utility functions:
difftime,ctime.
- Core timing:
1.0.3 #
<string.h>Addition: Implemented standard C string manipulation functions (strlen,strcmp,strcpy,strcat,strstr, etc.). Mutating functions likestrcpyandstrcathave been adapted to return a new string, adhering to Dart's immutableStringnature while maintaining familiar C naming conventions.
1.0.2 #
<ctype.h>Addition: Implemented standard character classification and conversion functions (isalpha,isdigit,toupper,tolower, etc.). Designed to acceptStringinputs for ergonomic use in Dart while maintaining native performance.
1.0.1 #
- Version Reset: Reset versioning to
0.1.0to properly track early development of the library before a stable1.0.0release. - Initial Architecture Setup: Implemented the core
Stdcextension architecture, allowing a unifiedstdcnamespace across different headers. <math.h>Implemented: Added comprehensive support for C standard math functions (sin,cos,sqrt,pow,ceil,floor,abs,fabs, etc.) mapped to Dart's highly optimizeddart:math.- Examples & Tests: Created
example/stdc_example.dartandtest/stdc_test.dart. - Documentation: Added comprehensive API dartdoc comments to all functions, classes, and constants.
1.0.0 #
- Initial placeholder version from Dart template creation.