Skip to content

Instantly share code, notes, and snippets.

@actondev
Created August 5, 2020 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save actondev/41067d7028051b7795b7f05c2d0f033b to your computer and use it in GitHub Desktop.
Save actondev/41067d7028051b7795b7f05c2d0f033b to your computer and use it in GitHub Desktop.
s7 wasm example
#include "s7.h"
#include <stdio.h>
void _s7_print_stderr(s7_scheme *sc, uint8_t c, s7_pointer port) {
printf("%c", c);
}
int main() {
printf("hello, world!\n");
s7_scheme* sc = s7_init();
s7_set_current_output_port(sc, s7_open_output_function(sc, _s7_print_stderr));
s7_eval_c_string(sc, "(format #t \"result is ~A\n\" (+ 1 2 3))");
return 0;
}
@iainctduncan
Copy link

Fantastic! Can't wait to try. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment