Skip to content

Commit

Permalink
Compile to Wasm (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
samestep authored Sep 26, 2023
1 parent ac8fa7f commit 1c8d33a
Show file tree
Hide file tree
Showing 9 changed files with 1,786 additions and 36 deletions.
33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions crates/interp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ impl Val {
/// This is meant to be used to pull all the types from a callee into a broader context. The
/// `generics` are the IDs of all the types provided as generic type parameters for the callee. The
/// `types are the IDs of all the types that have been pulled in so far.
///
/// The interpreter is meant to be used with no generic "free variables," and does not do any scope
/// checking, so all scopes are replaced with a block ID of zero.
fn resolve(typemap: &mut IndexSet<Ty>, generics: &[id::Ty], types: &[id::Ty], ty: &Ty) -> id::Ty {
let resolved = match ty {
Ty::Generic { id } => return generics[id.generic()],
Expand Down
11 changes: 11 additions & 0 deletions crates/wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "rose-wasm"
version = "0.3.2"
publish = false
edition = "2021"

[dependencies]
by_address = "1"
indexmap = "2"
rose = { path = "../core" }
wasm-encoder = "0.33"
Loading

0 comments on commit 1c8d33a

Please sign in to comment.