C3 0.8.6: library fetching from repositories, smaller safe-mode binaries, stricter rules
C3 0.8.6 is now available. Its two main features are a revamped library fetch command and a new target for packaging libraries made from source. The release also cuts the size of safe-mode[1] binaries by one third.
C3 libraries are .c3l files, which are zip archives with C3 sources, headers, prebuilt binaries for each target and a manifest[2] file (manifest.json). The new source-lib target packs C3 source files into a .c3l file. Libraries are fetched with c3c fetch from repositories that support versions, and each download is checked against its sha256 checksum[3], which can also be pinned in a project's dependencies. A repository only needs three paths that answer GET requests, so any static file host can serve one.
In safe mode, the checks for array bounds, null dereferences and similar failures now share panic functions[4] that are created on demand and reused, which made binaries 30% or more smaller. The panic function signature has changed, so custom panic handlers must be updated. The cast rules were also tightened: for example, 'ulong x = -1' is now an error. Initializing the same member twice in one initializer and using 'else if' without braces are now compile errors too.
Read the original c3-lang.orgDiscussion
Sources
-
C3 Programming Language
C3 0.8.6 released: Library fetching, 30% smaller safe-mode binaries, and stricter type rules


