Skip to content

Commit

Permalink
update(docs): prefer crate_type=cdylib
Browse files Browse the repository at this point in the history
This makes for smaller binaries  and not exporting every single
symbol under the sun.

Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
  • Loading branch information
gnosek authored and poiana committed Oct 18, 2024
1 parent acdc960 commit 8d158a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions falco_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ capabilities.
The typical way to distribute a Falco plugin is to build a shared library. To build a plugin as a shared
library, you need to:

1. Specify `crate_type = ["dylib"]` in the `[lib]` section of `Cargo.toml`,
1. Specify `crate_type = ["cdylib"]` in the `[lib]` section of `Cargo.toml`,
2. Invoke [`plugin!`] and all the macros corresponding to the capabilities your plugin implements.

The most basic `Cargo.toml` file for a dynamically linked plugin without any dependencies could be:
Expand All @@ -26,7 +26,7 @@ version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["dylib"]
crate-type = ["cdylib"]

[dependencies]
falco_plugin = "0.3.0"
Expand Down

0 comments on commit 8d158a6

Please sign in to comment.