Warning: Crux is currently in preview status. While it's possible to write programs with it today, there are many rough edges, and not every feature described here is complete. You can help by sharing your thoughts - click the feedback button below! Or join the community on Slack.
Crux is statically-typed, compiles to JavaScript, and emphasizes familiarity, productivity, and soundness.
Crux is designed to be as lightweight in small projects as it is reliable and maintainable in large projects.
What's Special?
Bidirectional Type Inference
Unlike other statically typed languages, Crux's type inference algorithm means the programmer is never forced to write type annotations on functions or variables.
Integration with npm and JavaScript
Crux code integrates directly with existing JavaScript -- import existing JS libraries or publish your package on npm.
Unlike other compile-to-JavaScript languages (e.g. Scala.js, GHCJS, Emscripten), Crux's concepts map directly to ES6, so the generated code is clean, debuggable, and has predictable performance.
Soundness
Crux is sound - never worry about missing properties or "undefined is not a function" again.
Rich Data Types
Unlike TypeScript, Crux allows non-native data types to use the same syntax and operators as native data types.
Collections are also consistent. The length of any collection is len(c)
and iteration across any iterable (set, map, slice, range) uses the same
for loop syntax.