Crux is sound (modulo compiler bugs - please report them), but there exists no type system that can prove the correctness of every valid program. Thus, one of the following must be true: either the type system will reject valid programs, or the type system will not catch all errors.

Therefore, it is sometimes necessary to subvert the type system. Crux provides several clearly-marked features for doing so.

_unsafe_coerce allows interpreting a value of any type as a value of any other type, something like a cast in C.

_unsafe_js allows evaluating an arbitrary string of JavaScript as any type, which is useful for defining primitive functions on top of JavaScript.

These unsafe mechanisms are used to implement higher-level, type-safe APIs, especially those built on top of existing JavaScript functionality.