Thanks to visit codestin.com
Credit goes to github.com

Skip to content

queer/singyeong_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

신경 plugin

A library that provides the plugin API for 신경. This library is not useful on its own, and must be used alongside a 신경 instance.

An example plugin can be found here: https://github.com/queer/singyeong-test-plugin

Installation

Get it on Hex.

def deps do
  [
    {:singyeong_plugin, "~> 0.1.0"}
  ]
end

Creating a plugin

Simply implement the Singyeong.Plugin behaviour in your plugin module. An example of how to do this can be found here: https://github.com/queer/singyeong-test-plugin/blob/master/lib/singyeong_plugin_test.ex

Once your plugin is ready, run the following commands:

$ mix compile
$ mix singyeong.package

and a zip file containing your plugin will be created. To use the plugin you created, simply create a plugins/ directory at your 신경 instance's root directory, and copy the plugin zip into that directory.

Native code

신경 plugins officially support NIFs implemented with Rustler. Other NIF libraries are unsupported and may break at any time, or simply never work.

Note that Rustler-based NIFs require some extra steps to be properly 신경-compatible:

  1. Your NIF module should have use Singyeong.Plugin.Rustler, crate: "crate_name" instead of use Rustler, otp_app: :my_app, crate: "crate_name".
  2. That's it! (Note: this may change in the future)

.gitignore

The following files should be added to your .gitignore:

  • /work
  • /*.zip

If using (Rustler) natives:

  • /priv/native
  • /native/*/target
  • /native/*/.cargo

About

신경 plugin API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages