# Passing a C struct into Julia

**URL:** <https://discourse.julialang.org/t/passing-a-c-struct-into-julia/43965>\
**Category:** General Usage\
**Tags:** memory-allocation, struct\
**Created:** [July 30, 2020, 11:06am UTC](https://discourse.julialang.org/t/passing-a-c-struct-into-julia/43965 "2020-07-30T11:06:28Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [February 2, 2021, 5:19pm UTC](https://discourse.julialang.org/t/passing-a-c-struct-into-julia/43965/21 "2021-02-02T17:19:54Z")

</div>

> [@barnett567](#):
>
> What I’m really missing is a set of @cfunction usage examples with arrays. Any pointers (pun indended) welcome 🙂

There’s one example of calling a `@cfunction` with an array in [GitHub - GunnarFarneback/DynamicallyLoadedEmbedding.jl: Embed Julia with dynamical loading of libjulia at runtime.](https://github.com/GunnarFarneback/DynamicallyLoadedEmbedding.jl).

Update: The relevant code is most easily located in the [PR](https://github.com/GunnarFarneback/DynamicallyLoadedEmbedding.jl/pull/3) where it was added.

[Previous page](https://discourse.julialang.org/t/passing-a-c-struct-into-julia/43965.md?page=1)
