Releases: slick-lab/native.cr
Releases · slick-lab/native.cr
0.1.4
fixed all macros issues
v0.1.1
Full Changelog: v0.1.0...v0.1.1
release v0.1.
First Public Release
native.cr is a framework for building native mobile applications using the Crystal language. Write your app logic once in Crystal. Deploy to Android. Run on desktop during development.
Features
Core Framework
- Native::App base class with state preservation
- UI components: View, Text, Button, Image, Column, Row, Container
- Styling system with colors, fonts, themes, edge insets, corner radius
- Touch events and gesture handling
- Animation system with curves (linear, ease-in, ease-out, bounce, elastic)
- Math utilities: Vector2, Vector3, Rect, Matrix3, Color
Platform Support
- Android: Full support via JNI + NDK
- Desktop: Development preview via SDL2
- iOS: Coming soon (requires Mac with Xcode)
Modules
- Network (HTTP client, WebSocket)
- Storage (Preferences, FileStorage, SQLite)
- Audio (Sound playback, Music streaming, Recording)
- Camera (Photo capture, Video recording, Preview)
- Notifications (Local and push notifications)
- Permissions (Runtime permission handling)
- Biometric (Fingerprint, Face ID)
- Payments (In-app purchases)
- Game Loop (Fixed, Variable, Adaptive timestep)
- Location (GPS, Geocoding)
- Sensors (Accelerometer, Gyroscope, Magnetometer, Light, Proximity)
- Connectivity (Network status, WiFi, Cellular)
- Image Picker (Camera, Gallery)
- Clipboard (Copy, Paste)
- Share (Text, URL, Image)
UI Components (15+)
- TextView, EditText, Button, ImageView
- ProgressBar, SeekBar, Switch, CheckBox, RadioButton
- Spinner, RecyclerView, WebView, CardView
- LinearLayout, ScrollView, Icon
CLI Commands
native.cr create- Create new projectnative.cr build android- Build APKnative.cr reload- Desktop preview with fast restartnative.cr doctor- Check toolchain installation
Installation
Add to your shard.yml:
dependencies:
native:
github: slick-lab/native.cr
version: ~> 0.1.0Then run:
shards installQuick Start
# Create a new project
native.cr create my_app
cd my_app
# Build for Android
native.cr build android
# Desktop preview
native.cr reload src/main.crExample
include Native
class MyApp < Native::App
@[Preserve]
property count : Int32 = 0
def setup : Nil
@label = Text.new
@label.text = "Tap: 0"
@label.text_size = 24
button = Button.new
button.text = "Tap Me"
button.on_click = ->{ increment }
column = Column.new
column.spacing = 20
column.add_child(@label)
column.add_child(button)
@root = column
end
def increment : Nil
@count += 1
@label.text = "Tap: #{@count}"
end
end
Native::App.start(MyApp)Requirements
- Crystal 1.20+
- Android NDK r25+ (for Android builds)
- Android SDK (for APK packaging)
Documentation
Acknowledgments
- Crystal Language Team
- Android NDK Team
- SDL2 Community
- Open Source Contributors
License
MIT
Built with frustration. Released with love.
v0.1.0-beta
Full Changelog: v0.0.99...v0.1.0-beta
v0.0.99
__
Full Changelog: v0.0.98...v0.0.99
Release v0.0.98
Changed
- Complete rewrite of state preservation system
- Removed JSON::Serializable to fix macro conflicts
- New .native file format for state storage (key=type:value)
- Added automatic macro inheritance (users no longer need to call
preserve) - Fixed
CRYSTAL_PATHissues in Termux builds - Improved error handling in state save/load
- Added
--releaseflag for production builds
Fixed
undefined constant UI::Textresolvedexpected argument #1 to be IO, not JSON::Builderresolvedcan't find file 'prelude'error fixed with CRYSTAL_PATH docs- State preservation now works without macro conflicts
Breaking Changes
- State file format changed from JSON to .native (text-based key=value)
- Users must update any custom state handling code
Installation
dependencies:
native:
github: slick-lab/native.cr
version: ~> 0.0.98Release v0.0.97
Recent Changes
- Fixed Android engine compilation on Termux
- Added prebuilt Android libraries (libnative_cr.so, libnative_cr_engine.so)
- Added android_entry.cr with fun crystal_android_main for C interop
- Fixed APP_CMD_INIT_WINDOW and APP_CMD_TERM_WINDOW constants
- Added ndk-sysroot and libglvnd-dev packages for Termux builds
- Fixed app.cr export handling for Android target
- Improved build.cr with NDK detection and prebuilt library copying
- Added postinstall script to download prebuilt Android libraries
- Added .so files to GitHub Releases for distribution
- Fixed CRYSTAL_PATH for Termux environment
- Added gitignore for Android and iOS build artifacts
Known Issues
- Android build requires NDK installed and ANDROID_NDK environment variable set
- iOS build requires macOS with Xcode
- Desktop preview only works on Linux/macOS
- Camera module untested on real devices
Installation
Add to shard.yml:
dependencies:
native:
github: slick-lab/native.cr
version: ~> 0.0.97