Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm32 target does not produce .wasm file #9371

Closed
dullbananas opened this issue Jul 13, 2021 · 3 comments
Closed

wasm32 target does not produce .wasm file #9371

dullbananas opened this issue Jul 13, 2021 · 3 comments
Labels
arch-wasm 32-bit and 64-bit WebAssembly question No questions on the issue tracker, please.

Comments

@dullbananas
Copy link

When I run:

zig build-lib src/main.zig -target wasm32-freestanding

It produces a "libmain.a" file instead of a .wasm file.

Zig version: 0.9.0-dev.453+7ef854682

@Luukdegram
Copy link
Member

You have to append -dynamic to create a dynamic library.

You can read more about this change here: https://ziglang.org/download/0.8.0/release-notes.html#WebAssembly-Support and here #8837.

@kubkon kubkon added the arch-wasm 32-bit and 64-bit WebAssembly label Jul 13, 2021
@dullbananas
Copy link
Author

dullbananas commented Jul 14, 2021

When using a build.zig file, is it possible to only generate the wasm file, without the .o and .so files?

@ikskuh
Copy link
Contributor

ikskuh commented Jul 15, 2021

When using a build.zig file, is it possible to only generate the wasm file, without the .o and .so files?

Builder.addDynamicLibrary

@Vexu Vexu closed this as completed Aug 6, 2021
@Vexu Vexu added the question No questions on the issue tracker, please. label Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm 32-bit and 64-bit WebAssembly question No questions on the issue tracker, please.
Projects
None yet
Development

No branches or pull requests

5 participants