liveBook · Manning

Resource

As explained in Server-Side WebAssembly

A resource is a non-copyable WIT value that is passed and managed through a handle.

A resource is a non-copyable WIT value managed through a handle rather than copied in and out of memory. This model suits operating-system-style objects whose ownership requires explicit management. section 2.4

Handle-managed objects

File descriptors and database connections provide familiar analogies: code passes handles to these objects instead of copying the underlying resources. section 2.4

How Server-Side WebAssembly covers it

How deep it goes
Defines handle passing and contrasts resources with copied values, stopping short of implementation details.
Examples
Uses file descriptors and database connections as analogies for handle-managed objects.
What it assumes
Builds on WIT’s copied value types and introduces resources as a separate category.
What you can do after
Evaluate/understand: Distinguish handle-managed resources from copied WIT values.
How it connects
Connects resources with WIT, handles, file descriptors, and database connections.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Server-Side WebAssembly. The section links point to the parts of the book it draws on.