Skip to content

piyopiyoex/hello_atomvm_nif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello AtomVM NIF

A tiny AtomVM NIF written in C, called from an Elixir app on ESP32-S3.

What’s in this repo

  • nifs/
    ESP-IDF component that registers a NIF: Elixir.SampleApp.Hello:hello/0 (returns 1234).

  • examples/hello_nif_elixir/
    Elixir app that calls SampleApp.Hello.hello/0 and prints the result.

How it works

  1. Add (or symlink) this repo under AtomVM’s ESP32 components directory: AtomVM/src/platforms/esp32/components/

  2. Build + flash AtomVM firmware with the component included.

  3. Build the Elixir app (mix atomvm.packbeam) and flash the generated sample_app.avm.

Expected output

Starting application...
NIF said: 1234
Return value: ok

This repo is meant to be a minimal reference for “custom NIF in AtomVM firmware + call it from Elixir”.

About

最小 NIF を動かしてみる

Resources

Stars

Watchers

Forks