forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3670f02
commit 5f8b2d3
Showing
19 changed files
with
656 additions
and
53 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
libwasmtime-platform.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "min-platform-host" | ||
version.workspace = true | ||
authors.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
wasmtime = { workspace = true, features = ['cranelift'] } | ||
libloading = "0.7" | ||
object = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
cbindgen ../../crates/runtime/src/sys/custom/capi.rs \ | ||
--lang C \ | ||
--cpp-compat > embedding/wasmtime-platform.h | ||
|
||
clang -shared -o libwasmtime-platform.so ./embedding/wasmtime-platform.c | ||
|
||
RUSTC_BOOTSTRAP_SYNTHETIC_TARGET=1 \ | ||
CARGO_PROFILE_DEV_PANIC=abort \ | ||
CARGO_PROFILE_RELEASE_PANIC=abort \ | ||
RUSTFLAGS="--cfg=wasmtime_custom_platform -Cforce-frame-pointers" \ | ||
cargo +nightly build -Zbuild-std=std,panic_abort \ | ||
--manifest-path embedding/Cargo.toml \ | ||
--target ./embedding/aarch64-unknown-unknown.json | ||
|
||
cargo run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[package] | ||
name = "embedding" | ||
version.workspace = true | ||
authors.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[dependencies] | ||
wasmtime = { workspace = true, features = ['cranelift', 'wat'] } | ||
dlmalloc = "0.2.4" | ||
anyhow = { workspace = true } | ||
|
||
[lib] | ||
crate-type = ['cdylib'] |
16 changes: 16 additions & 0 deletions
16
examples/min-platform/embedding/aarch64-unknown-unknown.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"arch": "aarch64", | ||
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", | ||
"dynamic-linking": true, | ||
"has-thread-local": true, | ||
"is-builtin": false, | ||
"llvm-target": "aarch64-unknown-linux-gnu", | ||
"max-atomic-width": 64, | ||
"os": "minwasmtime", | ||
"position-independent-executables": true, | ||
"relro-level": "full", | ||
"stack-probes": { | ||
"kind": "inline" | ||
}, | ||
"target-pointer-width": "64" | ||
} |
Oops, something went wrong.