Supercharge Elixir with Native Zig Functionality

Поделиться
HTML-код
  • Опубликовано: 9 фев 2025
  • In this video, you'll learn how to write a simple Zig function and build it into a NIF (Native Implemented Function) for use within your Elixir applications.
    We'll cover:
    Writing a basic Zig function: Learn the fundamentals of writing a simple, efficient function in the Zig programming language.
    Building the NIF: Discover how to properly structure your Zig project, including the inclusion of necessary Erlang library C headers for seamless integration with the BEAM.
    Installing the NIF in Elixir: Learn the step-by-step process of installing your custom-built Zig NIF into your Elixir application.
    This video will provide you with a practical foundation for leveraging the power of Zig to extend the capabilities of your Elixir applications and achieve significant performance gains.
    Also, the magical Erlang CLI command to fetch your erl library path is below:
    ```
    erl -eval 'io:format("~s", [lists:concat ([code:root_dir(), "/erts=", erlang:system_info(version), "/include"])])' -s init stop -noshell
    ```

Комментарии • 5

  • @codestirring
    @codestirring 12 дней назад +1

    Love it.

  • @hammer_code
    @hammer_code 11 дней назад +2

    One of the my top todo weekend projects is to write a Zig Nif, this is super informative thank you!

  • @chrboesch
    @chrboesch 8 дней назад

    Cool!

  • @shahryartavakkoli
    @shahryartavakkoli 11 дней назад +1

    Thank you for the video, sorry can I ask what is your screen recorder and editor? Thanks

    • @sinclair.software
      @sinclair.software  11 дней назад +1

      @@shahryartavakkoli I use Screen.Studio for recording and then Davinci Resolve for any final cuts 👍