Nano Features

Nano provides a wide range of features to aid development, all of which are completely cross-platform:

  • Core Features
    • Assertion and logging macros
    • Build macros to identify target platform
    • Fixed-size primitives for basic data types
    • Lock-free copy-on-write for extremely fast copies
    • Support for arrays, bit vectors, data blobs, dates, dictionaries,
      numbers, strings, ranges, variants, and other common data types

  • Application Development
    • Timers that can execute functors
    • Simple and efficient One-Line Undo
    • Efficient key-value cache for arbitrary objects
    • High-performance Broadcaster/Listener pattern
    • Preferences that use the native API but can encode custom objects
    • Additional "Nanite" objects to integrate Cocoa/UIKit/Qt/Win32/etc

  • Strings
    • All strings are Unicode-based
    • PCRE-based regular expressions
    • Extremely fast hash-based comparisons
    • String formatter prevents buffer overflows
    • String formatter supports custom format specifiers
    • String objects automatically select the most efficient encoding

  • Data Processing
    • Unicode conversion
    • Expat-based XML parser
    • Built-in compression (ZLib)
    • Built-in encoding (Hex, B64)
    • Built-in encryption (DES, DES3, and Blowfish)
    • Built-in digest algorithms (DJB2, Adler32, MD5, SHA1)
    • Structured byte-swapping including arrays and nested types

  • Files and Databases
    • SQLite wrapper
    • File and directory iterators
    • Memory-mapped file access
    • Portable implementation of Mac OS X "UTI" system
    • Portable implementation of Mac OS X "bundle" format
    • Portable implementation of Mac OS X ".plist" format

  • Graphics
    • Colors, transforms, and vectors
    • Points, sizes, rectangles, and polygons
    • 32 and 64-bit floating point coordinates

  • Threads
    • Native thread wrapper
    • Mutex, Read/Write, and Spin locks
    • Thread pool to load-balance batch jobs
    • Atomic integer, list, and semaphore primitives
    • Task object to drive command-line sub-processes

  • Networking
    • Asynchronous HTTP client
    • Native socket wrapper (CFSocket/IOCP)
    • Key-value message-passing client/server
    • ZeroConf-based service browsing/advertising