🌐WebAssemblyZiggitContent type: Discussion

Exports from imported but unused files are missing (opens in new tab)

While playing with WebAssembly, I noticed that if I export a function in a file (called b.zig), and I import this file from my main file (called a.zig), then the function from b.zig is exported only if I use some other things from b.zig. I made a minimal example here : a.zig b.zig The compilation gave me as WASM file. If the manual export is commented or not, I get this from wasm-objdump -x: without_manual_export.wasm with_manual_export.wasm You can see that in the first case there is no valu...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help