Skip to content

Instantly share code, notes, and snippets.

@rayinla
Last active April 16, 2018 14:24
Show Gist options
  • Save rayinla/11f0c3b3e500d62651520184adcba8c0 to your computer and use it in GitHub Desktop.
Save rayinla/11f0c3b3e500d62651520184adcba8c0 to your computer and use it in GitHub Desktop.
const int64 = ref.types.int64;
const rust = ffi.Library(path.join('C:/Sites/factorial/target/release/factorial.dll'),{
factorialize: [int64, [int64]],
});
rust.factorialize(5); // -> 120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment