Skip to content

Commit b91dd01

Browse files
authored
ensure dlopen symbol table uses forward slashes (#93)
* ensure `dlopen` symbol table uses forward slashes On Windows, we were using back slashes, which meant `dlopen` failed to resolve all but trivial paths at runtime. Signed-off-by: Joel Dice <joel.dice@fermyon.com> * bump version to 0.13.4 Signed-off-by: Joel Dice <joel.dice@fermyon.com> --------- Signed-off-by: Joel Dice <joel.dice@fermyon.com>
1 parent c6c8447 commit b91dd01

File tree

10 files changed

+19
-18
lines changed

10 files changed

+19
-18
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "componentize-py"
3-
version = "0.13.3"
3+
version = "0.13.4"
44
edition = "2021"
55
exclude = ["cpython"]
66

examples/cli/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ run a Python-based component targetting the [wasi-cli] `command` world.
1010
## Prerequisites
1111

1212
* `Wasmtime` 18.0.0 or later
13-
* `componentize-py` 0.13.3
13+
* `componentize-py` 0.13.4
1414

1515
Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If
1616
you don't have `cargo`, you can download and install from
1717
https://github.com/bytecodealliance/wasmtime/releases/tag/v18.0.0.
1818

1919
```
2020
cargo install --version 18.0.0 wasmtime-cli
21-
pip install componentize-py==0.13.3
21+
pip install componentize-py==0.13.4
2222
```
2323

2424
## Running the demo

examples/http/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ run a Python-based component targetting the [wasi-http] `proxy` world.
1010
## Prerequisites
1111

1212
* `Wasmtime` 18.0.0 or later
13-
* `componentize-py` 0.13.3
13+
* `componentize-py` 0.13.4
1414

1515
Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If
1616
you don't have `cargo`, you can download and install from
1717
https://github.com/bytecodealliance/wasmtime/releases/tag/v18.0.0.
1818

1919
```
2020
cargo install --version 18.0.0 wasmtime-cli
21-
pip install componentize-py==0.13.3
21+
pip install componentize-py==0.13.4
2222
```
2323

2424
## Running the demo

examples/matrix-math/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ within a guest component.
1111
## Prerequisites
1212

1313
* `wasmtime` 18.0.0 or later
14-
* `componentize-py` 0.13.3
14+
* `componentize-py` 0.13.4
1515
* `NumPy`, built for WASI
1616

1717
Note that we use an unofficial build of NumPy since the upstream project does
@@ -23,7 +23,7 @@ https://github.com/bytecodealliance/wasmtime/releases/tag/v18.0.0.
2323

2424
```
2525
cargo install --version 18.0.0 wasmtime-cli
26-
pip install componentize-py==0.13.3
26+
pip install componentize-py==0.13.4
2727
curl -OL https://github.com/dicej/wasi-wheels/releases/download/v0.0.1/numpy-wasi.tar.gz
2828
tar xf numpy-wasi.tar.gz
2929
```

examples/sandbox/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ sandboxed Python code snippets from within a Python app.
88
## Prerequisites
99

1010
* `wasmtime-py` 18.0.0 or later
11-
* `componentize-py` 0.13.3
11+
* `componentize-py` 0.13.4
1212

1313
```
14-
pip install componentize-py==0.13.3 wasmtime==18.0.2
14+
pip install componentize-py==0.13.4 wasmtime==18.0.2
1515
```
1616

1717
## Running the demo

examples/tcp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ making an outbound TCP request using `wasi-sockets`.
1111
## Prerequisites
1212

1313
* `Wasmtime` 18.0.0 or later
14-
* `componentize-py` 0.13.3
14+
* `componentize-py` 0.13.4
1515

1616
Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If
1717
you don't have `cargo`, you can download and install from
1818
https://github.com/bytecodealliance/wasmtime/releases/tag/v18.0.0.
1919

2020
```
2121
cargo install --version 18.0.0 wasmtime-cli
22-
pip install componentize-py==0.13.3
22+
pip install componentize-py==0.13.4
2323
```
2424

2525
## Running the demo

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ features = ["pyo3/extension-module"]
77

88
[project]
99
name = "componentize-py"
10-
version = "0.13.3"
10+
version = "0.13.4"
1111
description = "Tool to package Python applications as WebAssembly components"
1212
readme = "README.md"
1313
license = { file = "LICENSE" }

src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ pub async fn componentize(
461461
.strip_prefix(path)
462462
.unwrap()
463463
.to_str()
464-
.context("non-UTF-8 path")?;
464+
.context("non-UTF-8 path")?
465+
.replace('\\', "/");
465466

466467
libraries.push(Library {
467468
name: format!("/{index}/{path}"),
@@ -915,9 +916,9 @@ fn search_directory(
915916
// subdirectory to be the true owner of the file. This is important later, when we derive a
916917
// package name by stripping the root directory from the file path.
917918
if root > existing.root {
918-
existing.module = module.clone();
919-
existing.root = root.to_owned();
920-
existing.path = path.parent().unwrap().to_owned();
919+
module.clone_into(&mut existing.module);
920+
root.clone_into(&mut existing.root);
921+
path.parent().unwrap().clone_into(&mut existing.path);
921922
}
922923
push = false;
923924
break;

src/summary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ impl<'a> Summary<'a> {
13981398
.join("\n ");
13991399

14001400
if fields.is_empty() {
1401-
fields = "pass".to_owned()
1401+
"pass".to_owned().clone_into(&mut fields)
14021402
}
14031403

14041404
let docs = docstring(world_module, docs, 1, None);

0 commit comments

Comments
 (0)