Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
390 changes: 390 additions & 0 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
[workspace]
resolver = "3"
members = ["cmd/*", "examples/*"]

[patch.crates-io]
# # meanwhile, had to fork to add a feature flag for timers
# argmin = { git = "https://github.com/sd2k/argmin", branch = "timer-feature" }
# argmin-math = { git = "https://github.com/sd2k/argmin", branch = "timer-feature" }

# # Depends on rv PR and release (see below).
# changepoint = { git = "https://github.com/sd2k/changepoint", branch = "remove-rayon" }
# # See PR at https://github.com/promised-ai/rv/pull/48.
rv = { git = "https://github.com/sd2k/rv", branch = "bump-rand-dependency" }

# # See PR at https://github.com/statrs-dev/statrs/pull/331.
# statrs = { git = "https://github.com/RobertJacobsonCDC/statrs", branch = "update_rand_to_09" }

# # Depends on cap-rand PR/release (see below).
# wasmtime = { git = "https://github.com/sd2k/wasmtime", branch = "bump-rand" }
# wasmtime-wasi = { git = "https://github.com/sd2k/wasmtime", branch = "bump-rand" }
# wasmtime-wasi-io = { git = "https://github.com/sd2k/wasmtime", branch = "bump-rand" }
# # See PR at https://github.com/bytecodealliance/cap-std/pull/394
# cap-rand = { git = "https://github.com/sd2k/cap-std", branch = "bump-rand" }
5 changes: 3 additions & 2 deletions cmd/gravity/src/codegen/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<'a> Bindings<'a> {
pub fn generate(&mut self) {
let (imports, chains) = self.generate_imports();
self.generate_factory(&imports, chains);
self.generate_exports(&imports.instance_name);
self.generate_exports(&imports.instance_name, &imports);
}

/// Generates the imports for the bindings.
Expand Down Expand Up @@ -89,12 +89,13 @@ impl<'a> Bindings<'a> {
///
/// Note: for now this only generates functions; types and interfaces are
/// still TODO
fn generate_exports(&mut self, instance: &GoIdentifier) {
fn generate_exports(&mut self, instance: &GoIdentifier, analyzed_imports: &AnalyzedImports) {
let config = ExportConfig {
instance,
world: self.world,
resolve: self.resolve,
sizes: self.sizes,
analyzed_imports,
};
ExportGenerator::new(config).format_into(&mut self.out)
}
Expand Down
Loading