Skip to content

Commit 42ac2b9

Browse files
committed
Reinclude the c source via a submodule
1 parent 04f71c8 commit 42ac2b9

32 files changed

+15
-10352
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "wasm3-sys/wasm3"]
2+
path = wasm3-sys/wasm3
3+
url = https://github.com/wasm3/wasm3

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# wasm3-rs
1+
# wasm3-rs
22

3-
![Build](https://github.com/Veykril/wasm3-rs/workflows/Rust/badge.svg?branch=master) ![Tokei](https://tokei.rs/b1/github/veykril/wasm3-rs)
3+
![Build](https://github.com/wasm3/wasm3-rs/workflows/Rust/badge.svg?branch=master) ![Tokei](https://tokei.rs/b1/github/wasm3/wasm3-rs)
44
[![Crates.io](https://img.shields.io/crates/v/wasm3.svg)](https://crates.io/crates/wasm3)
55
[![Docs.rs](https://docs.rs/wasm3/badge.svg)](https://docs.rs/wasm3)
66

@@ -39,6 +39,13 @@ fn main() {
3939
This crate currently does not make use of the cmake project of wasm3, meaning cmake is not required to built this for the time being.
4040
It does however require [Clang 9](https://releases.llvm.org/download.html#9.0.0) to be installed as well as [Bindgen](https://github.com/rust-lang/rust-bindgen), should the `build-bindgen` feature not be set.
4141

42+
The wasm3 c source is included via a submodule, so before building the submodule has to be initialized, this can be done via:
43+
```sh
44+
git submodule update --init
45+
```
46+
47+
Then to build the project run:
48+
4249
```sh
4350
cargo install bindgen
4451
cargo build --release

wasm3-sys/build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::fmt::Write as _;
44
use std::fs;
55
use std::path::{Path, PathBuf};
66

7-
static WASM3_SOURCE: &str = "wasm3";
7+
static WASM3_SOURCE: &str = "wasm3/source";
88
const WHITELIST_REGEX_FUNCTION: &str = "([A-Z]|m3_).*";
99
const WHITELIST_REGEX_TYPE: &str = "(?:I|c_)?[Mm]3.*";
1010
const WHITELIST_REGEX_VAR: &str = WHITELIST_REGEX_TYPE;
@@ -74,7 +74,7 @@ fn gen_bindings() {
7474
}
7575
))
7676
.arg("-Dd_m3LogOutput=0")
77-
.arg("-Iwasm3");
77+
.arg("-Iwasm3/source");
7878
let status = bindgen.status().expect("Unable to generate bindings");
7979
if !status.success() {
8080
panic!("Failed to run bindgen: {:?}", status);

wasm3-sys/wasm3

Submodule wasm3 added at aecaa2c

0 commit comments

Comments
 (0)