Skip to content

Commit

Permalink
Optimize binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
ark0f committed Dec 17, 2023
1 parent 1526bf1 commit df03809
Show file tree
Hide file tree
Showing 53 changed files with 172 additions and 14 deletions.
3 changes: 3 additions & 0 deletions examples/async-init/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/async-recursion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
async-recursion.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion examples/async-recursion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

#![no_std]
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(not(feature = "std"))]
mod wasm;
3 changes: 3 additions & 0 deletions examples/async-signal-entry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/async-tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/calc-hash/in-one-block/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
4 changes: 3 additions & 1 deletion examples/calc-hash/in-one-block/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#![no_std]

#![cfg_attr(not(feature = "std"), no_std)]

use parity_scale_codec::{Decode, Encode};

#[cfg(not(feature = "std"))]
Expand Down
3 changes: 3 additions & 0 deletions examples/calc-hash/over-blocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion examples/calc-hash/over-blocks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#![no_std]

#![cfg_attr(not(feature = "std"), no_std)]

use parity_scale_codec::{Decode, Encode};
use shared::PackageId;
Expand Down
3 changes: 3 additions & 0 deletions examples/compose/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
hex.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/constructor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ repository.workspace = true
[package.metadata.wasm-dep-builder.demo]
exclude-features = ["std", "wasm-wrapper"]

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gcore.workspace = true
gstd.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/custom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
gsys.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/delayed-reservation-sender/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true

Expand Down
3 changes: 3 additions & 0 deletions examples/delayed-sender/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ repository.workspace = true
[package.metadata.wasm-dep-builder.demo]
exclude-features = ["std", "wasm-wrapper"]

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion examples/delayed-sender/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

#![no_std]
#![cfg_attr(not(feature = "std"), no_std)]

pub const DELAY: u32 = 100;

Expand Down
3 changes: 3 additions & 0 deletions examples/distributor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/futures-unordered/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/gas-burned/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true

Expand Down
3 changes: 3 additions & 0 deletions examples/incomplete-async-payloads/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/init-fail-sender/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true

Expand Down
3 changes: 3 additions & 0 deletions examples/init-wait-reply-exit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true

Expand Down
3 changes: 3 additions & 0 deletions examples/init-wait/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ repository.workspace = true
[package.metadata.wasm-dep-builder.demo]
exclude-features = ["std", "wasm-wrapper"]

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true

Expand Down
3 changes: 3 additions & 0 deletions examples/mul-by-const/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
hex.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/out-of-memory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true

Expand Down
3 changes: 3 additions & 0 deletions examples/ping/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion examples/ping/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

#![no_std]
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(not(feature = "std"))]
mod wasm;
3 changes: 3 additions & 0 deletions examples/program-factory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/program-generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
hex-literal.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion examples/program-generator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

#![no_std]
#![cfg_attr(not(feature = "std"), no_std)]

pub const CHILD_WAT: &str = r#"
(module
Expand Down
3 changes: 3 additions & 0 deletions examples/proxy-relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/proxy-reservation-with-gas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ repository.workspace = true
[package.metadata.wasm-dep-builder.demo]
exclude-features = ["std", "wasm-wrapper"]

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/read-big-state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ repository.workspace = true
[package.metadata.wasm-dep-builder.demo]
exclude-features = ["std", "wasm-wrapper"]

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/reservation-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/reserve-gas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/rwlock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd = { workspace = true, features = ["debug"] }
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/send-from-reservation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true
parity-scale-codec.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions examples/signal-entry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd = { workspace = true, features = [
"debug",
Expand Down
3 changes: 3 additions & 0 deletions examples/signal-wait/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
gstd.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion examples/signal-wait/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

#![no_std]
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(not(feature = "std"))]
mod wasm;
Loading

0 comments on commit df03809

Please sign in to comment.