Skip to content

Commit c3b9846

Browse files
authored
Remove Rust crate from examples (#469)
1 parent 673ec9c commit c3b9846

File tree

9 files changed

+2
-56
lines changed

9 files changed

+2
-56
lines changed

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
resolver = "2"
33
members = ["ext"]
44
exclude = [
5-
"examples/rust-crate",
65
"spec/fixtures/component-types",
76
"spec/fixtures/wasi-debug",
87
"spec/fixtures/wasi-deterministic",
98
]
109

1110
[profile.release]
1211
codegen-units = 1 # more llvm optimizations
13-
debug = 2 # make perfomance engineers happy
14-
lto = "thin" # cross-crate inlining
12+
debug = 2 # make perfomance engineers happy
13+
lto = "thin" # cross-crate inlining

examples/rust-crate/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/rust-crate/Cargo.toml

Lines changed: 0 additions & 14 deletions
This file was deleted.

examples/rust-crate/src/lib.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.

ext/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ruby_gte_3_0)'] }
1212

1313
[features]
1414
default = ["tokio", "all-arch", "winch"]
15-
embed = ["magnus/embed"]
1615
tokio = ["dep:tokio", "dep:async-timer"]
1716
all-arch = ["wasmtime/all-arch"]
18-
ruby-api = []
1917
winch = ["wasmtime/winch"]
2018

2119
[dependencies]

ext/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@ use magnus::{Error, Ruby};
33
mod helpers;
44
mod ruby_api;
55

6-
#[cfg(feature = "ruby-api")]
7-
pub use ruby_api::*;
8-
9-
#[cfg(not(feature = "ruby-api"))]
106
pub(crate) use ruby_api::*;
117

12-
#[cfg(not(feature = "ruby-api"))] // Let the upstream crate handle this
138
rb_sys::set_global_tracking_allocator!();
149

1510
#[magnus::init]

lib/wasmtime/component.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# To prevent double loading of this file when `ruby-api` is enabled
2-
return if defined?(Wasmtime::Component::Result)
3-
41
module Wasmtime
52
module Component
63
# Represents a component model's +result<O, E>+ type.

lib/wasmtime/error.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# frozen_string_literal: true
22

3-
# To prevent double loading of this file when `ruby-api` is enabled
4-
return if defined?(Wasmtime::Error)
5-
63
module Wasmtime
74
class Error < StandardError; end
85

rakelib/examples.rake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@ namespace :examples do
1212

1313
task all: task_name
1414
end
15-
16-
desc "Run rust-crate/"
17-
task :rust_crate do
18-
Dir.chdir("examples/rust-crate") do
19-
sh "cargo test"
20-
end
21-
end
22-
23-
task all: :rust_crate
2415
end
2516

2617
desc "Run all the examples"

0 commit comments

Comments
 (0)