Registry / other / sway-core

sway-core

JSON →
library0.70.2rscratesunverified

Core language library for the Sway smart contract language.

# Cargo.toml [dependencies] sway-core = "0.70.2"
INSTALL
IMPORT
SIG · SWAY-CORE
S
sway-core
otherrustv0.70.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse
use sway_core::parse;

Parses Sway source code into an AST.

use sway_core::parse; fn main() { let source = "script; fn main() {}"; let result = parse(source); println!("{:?}", result); }
Debug
Known issues
gotchaRequires the `sway-types` crate for type definitions.
fix
Add `sway-types` to your dependencies.
affects: >=0.70.0
Upgrade
Version history
0.70.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
sway-core — cargo add sway-core · libregistry