Jump to content

rtrbt

Administrators
  • Gesamte Inhalte

    1.525
  • Benutzer seit

  • Letzter Besuch

  • Tagessiege

    146

Alle erstellten Inhalte von rtrbt

  1. Hi, As of yesterday, a beta version of the rust bindings is available. Please tinker around with them and post any bugs, suggestions and other feedback here. The current version of the bindings is attached to this post, including example sources and an example project, which enumerates connected devices. The bindings can also be installed using Cargo by listing tinkerforge = "2.0" in the [dependencies] secion of a project's Cargo.toml. The bindings require a nightly version of the rust compiler, or the current beta release (version 1.31), which will be released as stable on the 7th of december, according to the road map. The beta can be installed with rustup install beta and then can be used with cargo +beta build. Also it is possible to set the beta as the default compiler with rustup default beta, which allows compiling without additional arguments. Nearly all get and set functions and callback registrations are asynchronous, as they return a wrapper around a Receiver, that converts received bytes into structured data. More information can be found in the binding's readme and here. The documentation on the Tinkerforge home page is not visible yet, as it is still work in progress. Have a lot of fun! Erik tinkerforge_rust_bindings_2_0_3.zip tf_rust_example.zip
  2. Moin, Seit gestern ist eine Beta-Version der Rust-Bindings verfügbar. Experimentiert damit, wir freuen uns auf Feedback, Bugs und mehr. Die aktuellen Bindings, sowie Beispiele im examples-Ordner, sind angehangen. Außerdem habe ich ein Beispielprojekt angehangen, das mit den Bindings alle angeschlossenen Bricks und Bricklets auflistet. Die Bindings können aber auch als Crate von Cargo installiert werden, wenn in der Cargo.toml tinkerforge = "2.0" unter den [dependencies] aufgeführt wird. Unterstützt werden nightly-Versionen des Rust-Compilers oder die aktuelle Beta 1.31, die laut der Roadmap ab 07.12. stabil sein wird. Diese kann mit rustup install beta installiert werden. Der Beta-Compiler kann dann mit cargo +beta build verwendet werden. Alternativ kann die Beta mit rustup default beta als Standardcompiler gesetzt werden, dann funkioniert cargo build ohne zusätzliche Argumente. Die Rust-Bindings funktionieren etwas anders als die meisten anderen Bindings, da fast alle Aufrufe nicht blockieren. Get/Set-Funktionen und Callback-Registrierungen liefern einen Wrapper um einen Receiver zurück, der die empfangenen Bytes in strukturierte Daten umwandelt. Weitere Details finden sich hier, sowie im Readme der Bindings. Die Dokumentation für die Tinkerforge-Seite ist noch in Arbeit und deshalb nicht sichtbar. Viel Spaß! Erik tinkerforge_rust_bindings_2_0_3.zip tf_rust_example.zip
×
×
  • Neu erstellen...