neutron-star-rt 0.2.1

The minimal runtime required for smart contracts built on the Qtum Neutron platform
Documentation
  • Coverage
  • 0%
    0 out of 9 items documented0 out of 9 items with examples
  • Size
  • Source code size: 12.75 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 139.65 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • qtumproject/neutron-star-rt
    1 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Earlz

Neutron-star-rt

This is the minimal runtime and low level routines required to use the Qtum Neutron x86 platform. This includes using proper linking setup and several assembly routines for system calls and initialization.

To compile:

./assemble.sh # requires yasm to be installed
xargo build --target i486-neutron

The following functions should be defined by users of this crate:

#[no_mangle]
pub extern "C" fn __init_neutron() {}

This is used internally by the neutron-star crate and is called before the main function is called.

fn on_call() -> u32;
fn on_create() -> u32;

These two functions must be defined by the using crate and are executed when the contract is called or initially created, respectively.

Caveats

Static initializers probably do not work.

This requires a nightly build currently to use because of the custom target needed for the core crate.