Skip to content

Commit

Permalink
Update build system table
Browse files Browse the repository at this point in the history
  • Loading branch information
Expotential108 committed May 5, 2022
1 parent 8f051cf commit 3d53af2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 50 deletions.
39 changes: 21 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,27 @@ which for example excludes all 32 bit systems.

<!-- AUTO GENERATED BY libwasmvm_builds.py START -->

| OS family | Arch | Linking | Supported | Wasmer 2.2+ | Note |
| --------------- | ------- | ------- | -------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Linux (glibc) | x86_64 | shared | ✅​libwasmvm.so | ✅​libwasmvm.x86_64.so | |
| Linux (glibc) | x86_64 | static | 🚫​ | 🚫​ | Would link libwasmvm statically but glibc dynamically as static glibc linking is not recommended. Potentially interesting for Osmosis. |
| Linux (glibc) | aarch64 | shared | 🚫​ | ✅​libwasmvm.aarch64.so | |
| Linux (glibc) | aarch64 | static | 🚫​ | 🚫​ | |
| Linux (musl) | x86_64 | shared | 🚫​ | 🚫​ | Possible but not needed |
| Linux (musl) | x86_64 | static | ✅​libwasmvm_muslc.a | ✅​libwasmvm_muslc.x86_64.a | |
| Linux (musl) | aarch64 | shared | 🚫​ | 🚫​ | Possible but not needed |
| Linux (musl) | aarch64 | static | 🚫​ | ✅​libwasmvm_muslc.aarch64.a | |
| macOS | x86_64 | shared | ✅​libwasmvm.dylib | ✅​libwasmvm.dylib | Fat/universal library with multiple archs (#294) |
| macOS | x86_64 | static | 🚫​ | 🚫​ | |
| macOS | aarch64 | shared | 🚫​ | ✅​libwasmvm.dylib | Fat/universal library with multiple archs (#294) |
| macOS | aarch64 | static | 🚫​ | 🚫​ | |
| Windows (mingw) | x86_64 | shared | 🏗​wasmvm.dll | 🏗​wasmvm.dll | See #288 |
| Windows (mingw) | x86_64 | static | 🚫​ | 🚫​ | |
| Windows (mingw) | aarch64 | shared | 🚫​ | 🚫​ | |
| Windows (mingw) | aarch64 | static | 🚫​ | 🚫​ | |
| OS family | Arch | Linking | Supported | Note |
| --------------- | ------- | ------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Linux (glibc) | x86_64 | shared | ✅​libwasmvm.x86_64.so | |
| Linux (glibc) | x86_64 | static | 🚫​ | Would link libwasmvm statically but glibc dynamically as static glibc linking is not recommended. Potentially interesting for Osmosis. |
| Linux (glibc) | aarch64 | shared | ✅​libwasmvm.aarch64.so | |
| Linux (glibc) | aarch64 | static | 🚫​ | |
| Linux (musl) | x86_64 | shared | 🚫​ | Possible but not needed |
| Linux (musl) | x86_64 | static | ✅​libwasmvm_muslc.x86_64.a | |
| Linux (musl) | aarch64 | shared | 🚫​ | Possible but not needed |
| Linux (musl) | aarch64 | static | ✅​libwasmvm_muslc.aarch64.a | |
| macOS | x86_64 | shared | ✅​libwasmvm.dylib | Fat/universal library with multiple archs ([#294]) |
| macOS | x86_64 | static | 🚫​ | |
| macOS | aarch64 | shared | ✅​libwasmvm.dylib | Fat/universal library with multiple archs ([#294]) |
| macOS | aarch64 | static | 🚫​ | |
| Windows (mingw) | x86_64 | shared | 🏗​wasmvm.dll | See [#288] |
| Windows (mingw) | x86_64 | static | 🚫​ | |
| Windows (mingw) | aarch64 | shared | 🚫​ | |
| Windows (mingw) | aarch64 | static | 🚫​ | |

[#288]: https://github.com/CosmWasm/wasmvm/pull/288
[#294]: https://github.com/CosmWasm/wasmvm/pull/294

<!-- AUTO GENERATED BY libwasmvm_builds.py END -->

Expand Down
46 changes: 14 additions & 32 deletions docs/libwasmvm_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,6 @@
UNKNOWN = "🤷" + ZERO_WIDTH_SPACE
UNDER_CONSTRUCTION = "🏗" + ZERO_WIDTH_SPACE

def is_supported(os, cpu, build_type):
if cpu == "aarch64":
return UNSUPPORTED
if os == "Windows (mingw)":
if cpu == "x86_64" and build_type == "shared":
return UNDER_CONSTRUCTION + "wasmvm.dll"
else:
return UNSUPPORTED
if os == "macOS" and build_type == "static":
return UNSUPPORTED
if os == "macOS" and build_type == "shared":
return SUPPORTED + "libwasmvm.dylib"
if os == "Linux (musl)":
if build_type == "static":
return SUPPORTED + "libwasmvm_muslc.a"
if build_type == "shared":
return UNSUPPORTED
if os == "Linux (glibc)":
if build_type == "static":
return UNSUPPORTED
if build_type == "shared":
return SUPPORTED + "libwasmvm.so"
return UNKNOWN

def wasmer22_supported(os, cpu, build_type):
if os == "Windows (mingw)":
if cpu == "x86_64" and build_type == "shared":
Expand Down Expand Up @@ -65,28 +41,34 @@ def wasmer22_supported(os, cpu, build_type):

def get_note(os, cpu, build_type):
if os == "Windows (mingw)" and cpu == "x86_64" and build_type == "shared":
return "See #288"
return "See [#288]"
if os == "Linux (glibc)" and cpu == "x86_64" and build_type == "static":
return "Would link libwasmvm statically but glibc dynamically as static glibc linking is not recommended. Potentially interesting for Osmosis."
if os == "Linux (musl)" and build_type == "shared":
return "Possible but not needed"
if os == "macOS" and build_type == "shared":
return "Fat/universal library with multiple archs (#294)"
return "Fat/universal library with multiple archs ([#294])"
return ""

def get_links():
return """
[#288]: https://github.com/CosmWasm/wasmvm/pull/288
[#294]: https://github.com/CosmWasm/wasmvm/pull/294
"""

print("<!-- AUTO GENERATED BY libwasmvm_builds.py START -->")
print("| OS family | Arch | Linking | Supported | Wasmer 2.2+ | Note |")
print("| --------------- | ------- | ------- | ------------------- | ----------------------------- | ------- |")
print("| OS family | Arch | Linking | Supported | Note |")
print("| --------------- | ------- | ------- | ----------------------------- | ------- |")

for os in oss:
for cpu in cpus:
for build_type in build_types:
s1 = is_supported(os, cpu, build_type)
s2 = wasmer22_supported(os, cpu, build_type)
s = wasmer22_supported(os, cpu, build_type)
note = get_note(os, cpu, build_type)
print(
"| {:<15} | {:<7} | {:<7} | {:<19} | {:<29} | {} |".format(
os, cpu, build_type, s1, s2, note
"| {:<15} | {:<7} | {:<7} | {:<29} | {} |".format(
os, cpu, build_type, s, note
)
)
print(get_links())
print("<!-- AUTO GENERATED BY libwasmvm_builds.py END -->")

0 comments on commit 3d53af2

Please sign in to comment.