Browse Source

Set up machinery

pull/1278/head
Jakub Konka 5 years ago
commit
6f6c6499c6
  1. 2
      .gitignore
  2. 3
      .gitmodules
  3. 11
      Cargo.toml
  4. 1
      crates/WASI
  5. 14
      crates/generate/Cargo.toml
  6. 13
      crates/generate/src/lib.rs
  7. 2
      src/lib.rs

2
.gitignore

@ -0,0 +1,2 @@
/target
**/*.rs.bk

3
.gitmodules

@ -0,0 +1,3 @@
[submodule "crates/WASI"]
path = crates/WASI
url = https://github.com/webassembly/wasi.git

11
Cargo.toml

@ -0,0 +1,11 @@
[package]
name = "wig-new"
version = "0.1.0"
authors = ["Jakub Konka <jakub.konka@golem.network>"]
edition = "2018"
[dependencies]
generate = { path = "crates/generate" }
[workspace]
members = ["crates/generate"]

1
crates/WASI

@ -0,0 +1 @@
Subproject commit 77629f34429c1bc65af797dac687fd47fc73df4b

14
crates/generate/Cargo.toml

@ -0,0 +1,14 @@
[package]
name = "generate"
version = "0.1.0"
authors = ["Jakub Konka <jakub.konka@golem.network>"]
edition = "2018"
[lib]
proc-macro = true
[dependencies]
witx = { path = "../WASI/tools/witx" }
quote = "1.0"
proc-macro2 = "1.0"
heck = "0.3"

13
crates/generate/src/lib.rs

@ -0,0 +1,13 @@
extern crate proc_macro;
use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
#[proc_macro]
pub fn from_witx(args: TokenStream) -> TokenStream {
TokenStream::new()
// TokenStream::from(raw_types::gen(
// TokenStream2::from(args),
// raw_types::Mode::Host,
// ))
}

2
src/lib.rs

@ -0,0 +1,2 @@
generate::from_witx!();
Loading…
Cancel
Save