- TDP-2-027draft
Struct layout chosen by the compiler
The compiler orders a struct's fields to waste no padding; a struct whose memory C reads says
@layout(c)and keeps declaration order. Opt-in and warn-first in 2.7, the default in 3.0. - TDP-2-028draft
Diagnostics that explain
Every diagnostic points at the code that is wrong, labels where an expectation came from, guesses common intents, reports every independent error in one run, and follows one written wording guide, checked by snapshot tests.
- TDP-2-029draft
Wrapping C libraries
Make the careful way to use a C library the normal way: ownership and length contracts the compiler checks,
turf bindto write declarations from a header, safe wrappers as ordinary Turf code, sanitizers on a package's C code inturf test, and C++ and Rust libraries through the C ABI. - TDP-2-030draft
Calling Turf from other languages
Build a Turf package as a C library:
@exportfunctions,turf build --libwith a generated header and a JSON export description, a runtime that starts on first call, handles C can hold safely, which languages can call it safely, and cross-linking with per-target runtimes. - TDP-2-031draft
Python and Turf
turf-python: build a Python extension module and wheel from a Turf library, with type stubs, exceptions for Turf errors and objects for handles; and apythonpackage that lets a Turf program call Python. - TDP-2-032draft
Node.js and Turf
turf-node: build a Node-API addon and an npm package with prebuilt binaries from a Turf library, with TypeScript declarations, errors as JavaScript exceptions, typed arrays without copies, and handles released by the JavaScript collector. - TDP-2-033draft
Lua and Turf
turf-lua: Lua modules written in Turf, loadable withrequire; and aluapackage that embeds a sandboxed Lua in a Turf program for configuration, scripting and plugins, with nolongjmpever crossing a Turf frame. - TDP-3-001draft
Threads and shared state
Add threads to Turf with a share-nothing default, transferable arguments, and shared state only through library types, designed so it never needs a major version.
- TDP-3-002draft
Async and non-blocking I/O
Add tasks as a library first, then non-blocking I/O with an event loop, and TLS and UDP through a vetted C library.
- TDP-3-003draft
Calling Turf in parallel from other runtimes
On the thread-aware runtime, let a Turf library be entered by many host threads at once, safely, and give the JVM, .NET, Go and Erlang/Elixir generated bindings:
turf-jvm,turf-dotnet,turf-goandturf-beam.