Expand description
Converters between DcString / DcList and various text formats (DcText, Dcal, UTF-8).
Re-exports§
pub use wasm_capabilities::MAX_PURE_WASM_NESTING_DEPTH;pub use wasm_capabilities::encode_capability_error_record;pub use wasm_capabilities::encode_dc_string_literal;pub use wasm_capabilities::eval_pure_graph_capability_request;pub use wasm_capabilities::run_wasm_session_pure_with_graph_capabilities;pub use ascii::AsciiSettings;pub use ascii::AsciiUnmappablePolicy;pub use ascii::ascii_safe_subset_to_dcmstring;pub use ascii::ascii_safe_subset_to_dcmstring_with_settings;pub use ascii::ascii_to_dcmstring;pub use ascii::ascii_to_dcmstring_with_settings;pub use ascii::dcmstring_to_ascii;pub use ascii::dcmstring_to_ascii_safe_subset;pub use ascii::dcmstring_to_ascii_safe_subset_with_settings;pub use ascii::dcmstring_to_ascii_with_settings;pub use dcal::dcal_to_dclist;pub use dcal::dclist_to_dcal;pub use dctext::DcList;pub use dctext::dcarray_to_dclist;pub use dctext::dcarray_to_dcstring;pub use dctext::dcarray_to_dctext;pub use dctext::dclist_to_dcarray;pub use dctext::dclist_to_dctext;pub use dctext::dclist_to_dcutf;pub use dctext::dcstring_to_dcarray;pub use dctext::dcstring_to_dctext;pub use dctext::dctext_to_dcarray;pub use dctext::dctext_to_dclist;pub use dctext::dctext_to_dcstring;pub use dctext::dctext_to_dctf;pub use dctext::dctext_to_dcutf;pub use dctext::dctf_to_dctext;pub use dctext::dcutf_to_dclist;pub use dctext::dcutf_to_dctext;pub use dctext::format_blob_preview;pub use dcts::dcarray_to_dcts;pub use dcts::dcstring_to_dcts;pub use dcts::dcts_to_dcarray;pub use dcts::dcts_to_dclist;pub use dcts::dcts_to_dcstring;pub use dcts::dcts_to_dcutf;pub use dcts::dcutf_to_dcts;pub use transform::apply_dc_transformation;pub use transform::apply_dc_transformations;pub use transform::transform_dclist_unicode_to_short_dc;pub use utf8::DcListUtf8Settings;pub use utf8::dclist_from_utf8;pub use utf8::dclist_to_utf8;pub use utf8::utf8_to_dclist;pub use wasm::DC_WASM_MAILBOX_HEADER_LEN;pub use wasm::DC_WASM_MAILBOX_INPUT_LEN;pub use wasm::DC_WASM_MAILBOX_INPUT_PTR;pub use wasm::DC_WASM_MAILBOX_MOST_RECENT_NODE_ID;pub use wasm::DC_WASM_MAILBOX_OUTPUT_LEN;pub use wasm::DC_WASM_MAILBOX_OUTPUT_PTR;pub use wasm::DEFAULT_MAX_WASM_INSTRUCTIONS_PER_STEP;pub use wasm::DEFAULT_MAX_WASM_MEMORY_PAGES;pub use wasm::DEFAULT_MAX_WASM_SESSION_OUTPUT_BYTES;pub use wasm::DEFAULT_MAX_WASM_STEP_OUTPUT_BYTES;pub use wasm::DEFAULT_MAX_WASM_TABLE_ELEMENTS;pub use wasm::DcWasmResourceLimits;pub use wasm::DcWasmSession;pub use wasm::InstrumentedWasmModule;pub use wasm::WasmResourceInterruption;pub use wasm::WasmStepOutcome;pub use wasm::WasmStepStatus;pub use wasm::assemble_wasm_instructions;pub use wasm::dcmstring_to_wasm;pub use wasm::dcmstring_to_wasm_with_resolver;pub use wasm::dcstring_to_wasm;pub use wasm::dcstring_to_wasm_with_resolver;pub use wasm::instrument_wasm_module_bytes;pub use wasm::run_dc_wasm_pure_conversion;pub use wasm::run_dc_wasm_pure_conversion_with_resolver;pub use wasm::run_graph_wasm_tokens_on_dc_slice;pub use wasm::run_graph_wasm_tokens_on_dc_slice_with_quota;pub use wat::wat_to_dclist;pub use wat::wat_to_dcmstring;pub use wat::wat_to_dcmstring_with_resolver;pub use wat::wat_to_dcstring;pub use wat::wat_to_wasm;pub use wat::wat_to_wasm_with_resolver;
Modules§
- ascii
- Bidirectional converters between
DcMstringand 7-bit ASCII documents, including the ASCII Safe Subset (printable ASCII with CRLF line endings). - dcal
- Implementation of Format 340 (Dcal: Dc ASCII List).
- dctext
- Implements DcText and related formats DcList and DcUTF. These formats are
encodings for sequences of integer global graph IDs (which are long Dcs).
Format looks like (w/o backticks):
Unicode (UTF-8) text @123@miesu@214748364@@L662@whereUnicode textis actual unicode text, and between each pair of @ signs, is a DcId. A DcId can be any int 128 bits (u128) in decimal, and it may have anLprefix. Output format is sort of UTF-8 text. For normal Unicode input characters, the output character is the same. For DcIds less than or equal to 1114111 (the largest Unicode character, I believe), the output character is the corresponding “generalized UTF-8”, the numeric value encoded in the same underlying algorithm as UTF-8. For DcIds greater than 1114111 and not prefixed with an L, the output character is the decimal DcId represented by extending the usual algorithm of UTF-8 encoding, but for those larger numbers. For DcIds prefixed with an L, the output is equivalent to @1114408@ (short Dc 296) followed by a Dc number for the number that followed the L (the L is just a shorthand for that 1114408 Dc). That is to say, it’s not a true Unicode encoding, it’s simply using an extension of the algorithm underlying UTF-8 as a convenient encoding of ints. Currently, DcList is used as the internal format for pivoting between other formats, but DcUtf might make more sense eventually for space efficiency. - dcts
- Implementation of Format 461 (Dcts: DcText short).
- eite
- Conversion between EITE formats (
IntegerList, SEMS, Ascii,AsciiSafeSubset) andDcMstring. - transform
- Document Character (
DcList/DcMstring) transformations (UnicodeToShortDc,SemanticToText,CodeToText). - utf8
- Conversions between
DcList(&[u128]) and UTF-8 (&[u8]). - wasm
- Zero-table assembler from Dc-WASM (
Dc 1927 "Begin WASM program"..Dc 1928 "End WASM program"andwasm_routine) to standard binary WebAssembly (.wasm). - wasm_
capabilities - Pure host capability handlers for
Dc 1939(Minimal query of system graph) andDc 1940(Execute pure WASM program) under the sharedDcWasmSessionOption B suspension ABI. - wasm_
quota - Portable, runtime-independent WebAssembly compute-quota instrumentation and shared task-level resource accounting.
- wasm_
to_ rust - Host offline WebAssembly-to-safe-Rust substitute transpiler with exact V2
structural-checkpoint metering (
V2CheckpointPlanner) parity. - wat
- Converter from WebAssembly Text Format (
.wat) to.WASMDocument Character streams (DcMstring,DcString,DcList) and binary.wasmmodules.
Functions§
- dclist_
to_ dcts - Serializes a sequence of Document Character IDs (
&[u128]) to Dcts format bytes using default options. - wat_
to_ dc_ shorthand_ string - Converts WebAssembly Text Format (
.wat) source into a space-separated Dc shorthand string. - wat_
to_ dc_ shorthands - Converts WebAssembly Text Format (
.wat) source into a canonical.WASMDocument Character shorthand sequence (Dc 1927 "Begin WASM program"..Dc 1928 "End WASM program").