Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hermit-rs
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACS
Public
HermitOS
hermit-rs
Commits
385d2068
Verified
Commit
385d2068
authored
7 months ago
by
Martin Kröning
Browse files
Options
Downloads
Patches
Plain Diff
fix(wasmtime/build.rs): unpin wasm toolchain
This reverts commit
3a82ed6e
.
parent
c7dbe475
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/ci.yml
+6
-10
6 additions, 10 deletions
.github/workflows/ci.yml
examples/wasmtime/build.rs
+4
-41
4 additions, 41 deletions
examples/wasmtime/build.rs
with
10 additions
and
51 deletions
.github/workflows/ci.yml
+
6
−
10
View file @
385d2068
...
...
@@ -20,12 +20,10 @@ jobs:
-
uses
:
dtolnay/rust-toolchain@nightly
with
:
components
:
rust-src
-
uses
:
dtolnay/rust-toolchain@master
with
:
toolchain
:
nightly-2024-07-31
targets
:
wasm32-wasip1
-
uses
:
mkroening/rust-toolchain-toml@main
-
run
:
rustup component add clippy llvm-tools
-
run
:
|
rustup component add clippy llvm-tools
rustup target add wasm32-wasip1
-
name
:
Clippy
run
:
|
cargo clippy --all-targets
...
...
@@ -53,12 +51,10 @@ jobs:
-
uses
:
dtolnay/rust-toolchain@nightly
with
:
components
:
rust-src
-
uses
:
dtolnay/rust-toolchain@master
with
:
toolchain
:
nightly-2024-07-31
targets
:
wasm32-wasip1
-
uses
:
mkroening/rust-toolchain-toml@main
-
run
:
rustup component add llvm-tools
-
run
:
|
rustup component add llvm-tools
rustup target add wasm32-wasip1
-
name
:
Check docs
run
:
cargo doc --no-deps --document-private-items
...
...
This diff is collapsed.
Click to expand it.
examples/wasmtime/build.rs
+
4
−
41
View file @
385d2068
use
std
::
path
::
PathBuf
;
use
std
::
process
::
Command
;
use
std
::{
env
,
io
};
fn
main
()
->
io
::
Result
<
()
>
{
let
mut
cargo
=
cargo
();
let
cargo
=
env
::
var_os
(
"CARGO"
)
.unwrap
();
let
out_dir
=
env
::
var_os
(
"OUT_DIR"
)
.unwrap
();
let
package
=
if
cfg!
(
feature
=
"ci"
)
{
...
...
@@ -12,8 +11,7 @@ fn main() -> io::Result<()> {
"wasm-test"
};
cargo
.arg
(
"+nightly-2024-07-31"
)
let
status
=
Command
::
new
(
cargo
)
.arg
(
"build"
)
.arg
(
"-Zunstable-options"
)
.arg
(
"--target=wasm32-wasip1"
)
...
...
@@ -21,44 +19,9 @@ fn main() -> io::Result<()> {
.arg
(
"--release"
)
.arg
(
"--target-dir=target"
)
.arg
(
"--artifact-dir"
)
.arg
(
&
out_dir
)
;
let
status
=
cargo
.status
()
?
;
.arg
(
&
out_dir
)
.status
()
?
;
assert!
(
status
.success
());
Ok
(())
}
pub
fn
cargo
()
->
Command
{
sanitize
(
"cargo"
)
}
fn
sanitize
(
cmd
:
&
str
)
->
Command
{
let
cmd
=
{
let
exe
=
format!
(
"{cmd}{}"
,
env
::
consts
::
EXE_SUFFIX
);
// On windows, the userspace toolchain ends up in front of the rustup proxy in $PATH.
// To reach the rustup proxy nonetheless, we explicitly query $CARGO_HOME.
let
mut
cargo_home
=
PathBuf
::
from
(
env
::
var_os
(
"CARGO_HOME"
)
.unwrap
());
cargo_home
.push
(
"bin"
);
cargo_home
.push
(
&
exe
);
if
cargo_home
.exists
()
{
cargo_home
}
else
{
PathBuf
::
from
(
exe
)
}
};
let
mut
cmd
=
Command
::
new
(
cmd
);
// Remove rust-toolchain-specific environment variables from kernel cargo
cmd
.env_remove
(
"LD_LIBRARY_PATH"
);
env
::
vars
()
.filter
(|(
key
,
_value
)|
{
key
.starts_with
(
"CARGO"
)
&&
!
key
.starts_with
(
"CARGO_HOME"
)
||
key
.starts_with
(
"RUST"
)
&&
!
key
.starts_with
(
"RUSTUP_HOME"
)
})
.for_each
(|(
key
,
_value
)|
{
cmd
.env_remove
(
&
key
);
});
cmd
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment