Skip to content

Mojo FFI demos: dynamic linking methods, and a static linking proof-of-concept

Notifications You must be signed in to change notification settings

ihnorton/mojo-ffi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mojo FFI Notes

  1. Calling C libraries from Mojo
  2. Statically linking a Mojo executable against a C library (demo)
  3. Creating a shared library from Mojo, and calling it from C (demo)

In order to run 2 and 3, add scripts/ to your PATH before using the demo Makefiles (or invoke /this/path/scripts/mojoc directly). The scripts require python to be available in PATH.

(note: the scripts have not yet been updated to support macOS, but the approach should work with minor modifications)

or you can use

source setup.sh

this will make the Makefiles on 3 work properly

About

Mojo FFI demos: dynamic linking methods, and a static linking proof-of-concept

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published