Skip to content

A C kernel in Basthon ​

Big news: Basthon now speaks C! The code is compiled to WebAssembly directly in the browser, with no installation nor server, thanks to the xcc compiler.

The kernel is designed for learning:

  • no need for main: statements run directly, and everything declared stays available for what follows;
  • the last expression, without a semicolon, is shown with its type;
  • scanf works like Python's input;
  • the formats of printf and scanf, NULL pointers and array overflows are reported.

It is available in the console and in the notebook.

Play with it!

The C kernel in the console